Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Does anybody know what this is called?
Old 08-09-2006, 03:39 PM Does anybody know what this is called?
Junior Talker

Posts: 3
Trades: 0
Hello
I recently published this question to the php forum, as I believed the script I needed to identify was .php. However I have since been informed that it is in fact javaScript.
I am developing my first website and I came across something that I would like to implement. They appear to be hidden text boxes. An example can be found here: Forex Calendar @ Forex Factory
If you click on 'read' you will see what I am talking about. I would like to learn how to scrip these hidden boxes but I have no idea what the technical name is for this method so I can't do any research. If anybody could shed some light it would be much appreciated.
Thanks
Dave
__________________

Please login or register to view this content. Registration is FREE
davidt_28 is offline
Reply With Quote
View Public Profile Visit davidt_28's homepage!
 
 
Register now for full access!
Old 08-10-2006, 08:52 AM Re: Does anybody know what this is called?
Ultra Talker

Posts: 256
Location: Auckland, New Zealand
Trades: 0
Here's an example of how to do something similar:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-NZ">
  <head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
    <title>Javascript Hide/Unhide Elements</title>
    <script type="text/javascript">
    /*<![CDATA[*/
      function toggleMessage(obj) {
        var sibling = null;
        if(obj.nextSibling.nodeType == 3)
          sibling = obj.nextSibling.nextSibling;
        else
          sibling = obj.nextSibling;
        sibling.style.display = (sibling.style.display == 'block') ? 'none' : 'block';
        return false;
      }
    /*]]>*/
    </script>
  </head>
  <body>
    <div>
      [<a href="" title="If it fails you might want to send them to a page at least?" onclick="javascript:toggleMessage(this);">Read More…</a>]
      <p style="display: none;">This was not displaying but as you have clicked the link, it now appears.</p>
    </div>
  </body>
</html>
I didn't look at how that site above does it, but it shouldn't be too different, but it could work on element ids, this just works on the sibling elements, works for IE and FF.

Cheers,

MC
__________________
#------------------------------signature---------------------------------------------------------------------------------#
Quote:
I am well recognised for what I don't do than what I do. Chores are just one of those things.
mastercomputers is offline
Reply With Quote
View Public Profile Visit mastercomputers's homepage!
 
Reply     « Reply to Does anybody know what this is called?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23417 seconds with 12 queries