Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Replacing some content in a web page

    I need to replace some content in a web page with new content, without leaving the page.

    When opening the following page, there are two rectangles, one being small and the one large:

    http://www.pinyinology.com/listing/quoteHZ.html

    When clicking the small rectangle in above page, the two rectangles will be replaced by the two in following page:

    http://www.pinyinology.com/listing/quotePY.html

    I understand that the two sets of rectangles may need to be coded in one page. I put them in two different ones in order to present my ideas clearly.

    I know little about javascript. But from my limited knowledge, I know this can be accomplished with javascript. Thanks for your help.

    fuliiopen

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,982
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    Your links are invalid - page cannot be displayed.

  • #3
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks a lot for the reply. I don't encounter any problem opening the links. Wondering whether there is another way to send links to a group member. I have sincere desire to do that.

    Thanks again.


    http://www.pinyinology.com/listing/quoteHZ.html

    http://www.pinyinology.com/listing/quotePY.html

    fuliopen

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,436
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts

    Try something like this...

    Code:
    <html>
    <head>
    <title>Ideographs</title>
    <style style='text/css'>
    body {margin:50px 80px; background:#ffd; font-size:120%;}
    .biaoZhun {cursor:default;}
    sup {font-size:75%; color:red; font-weight:600;}
    .quote {word-spacing:-1px;}
    .words {border:4px blue solid; padding-left:10px; padding-right:10px;}
    .goTo {position:relative; left:25px; border:2px red solid; width:150px; padding:4px; margin-bottom:25px;}
    #convert {text-decoration:none;}
    </style>
    </head>
    <body>
    <h1>Converting Ideographs to Romanization</h1>
    <p>
    &lt;discussion is here. &gt;
    </p>
    <div id="IDEO">
    <div class='goTo'>
    <a href="#" onclick="document.getElementById('PY').style.display='block';
                         document.getElementById('IDEO').style.display='none';">
        Convert to PinYin
    </a>
    </div>
    <div class='words'>
      新中国站在每个人民的面前,我们应该迎接它。
    <p> 
      新中国航船的桅顶已经冒出地平线了,我们应该拍掌欢迎它。 
    举起你的双手吧,新中国是我们的。
    </p>
    </div>
    </div><!--end of IDEO-->
    <div id="PY" style="display: none;">
    <div class='goTo'>
    <a href="#" onclick="document.getElementById('PY').style.display='none';
                         document.getElementById('IDEO').style.display='block';">
        Back to Ideographs
    </a>
    </div>
    <div class='words'>
    <p class='quote'>
    </span><span class="biaoZhun" title='xin&sup1;'>xin<sup>1</sup> </span> 
    </span><span class="biaoZhun" title='zhong&sup1;'>zhong<sup>1</sup> </span>
    </span><span class="biaoZhun" title='guo&sup2;'>guo<sup>2</sup> </span>
    </span><span class="biaoZhun" title='zhan⁴'>zhan<sup>4</sup> </span> 
    </span><span class="biaoZhun" title='zai⁴'>zai<sup>4</sup> </span>
    ... etc. ...
    </div>
    </div><!--end of PY-->
    <p>
    &lt;discussion is here. &gt;
    </p>
    </body>
    </html>

  • #5
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,982
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    Quote Originally Posted by fuliopen View Post
    Thanks a lot for the reply. I don't encounter any problem opening the links. Wondering whether there is another way to send links to a group member. I have sincere desire to do that.

    Thanks again.


    http://www.pinyinology.com/listing/quoteHZ.html

    http://www.pinyinology.com/listing/quotePY.html

    fuliopen
    The two links still return Page Cannot Be Displayed for me. Is it because they are in Chinese?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •