What do you call this Script?

  • kanexpo2
  • Graduate
  • Graduate
  • No Avatar
  • Joined: 19 Oct 2006
  • Posts: 101
  • Status: Offline

Post May 10th, 2008, 3:55 pm

hi,
i am trying to find the name for this script which enables you to hide stuff, and when you click on it, the webpage extends and shows the hidden stuff.

example: http://www.adriantnt.com/products/comments_script/

At the bottom, when you click on "Click here to add a comment" it shows you the form without reloading the page.

In what language is this done and what is the name of it?

Thanks for your help
kan
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 10th, 2008, 3:55 pm

  • Bogey
  • Ounce of 'Zu'
  • Web Master
  • User avatar
  • Joined: 14 Jul 2005
  • Posts: 4671
  • Loc: Ozzu
  • Status: Offline

Post May 10th, 2008, 8:29 pm

If you view line 230 of the source on that page you notice that they are using Javascript. The javascript that they are using is being included in the head.
My Developing Blog (7)
Wedevoy.com - In Development... should be done in about a week or so
  • JISForums
  • Born
  • Born
  • No Avatar
  • Joined: 11 May 2008
  • Posts: 4
  • Status: Offline

Post May 11th, 2008, 5:17 am

<script language="JavaScript" type="text/javascript" src="/scripts/swfobject.js"></script>
<script language="JavaScript" type="text/javascript" src="/scripts/AC_RunActiveContent.js"></script>
<script type="text/javascript" src="/scripts/java_drop_down_menu/menu.js"></script>
<script type="text/javascript">
cssdropdown.startchrome("my_menu")
</script>

ITS JAVASCRIPT!!!
  • markusPHP
  • Beginner
  • Beginner
  • User avatar
  • Joined: 23 Mar 2008
  • Posts: 44
  • Loc: york, england
  • Status: Offline

Post May 14th, 2008, 10:44 am

It's a simple toggle of an elements 'display' attribute with javascript.

  1.  
  2. <script type="text/javascript">
  3. function toggle_content(id)
  4. {
  5.     if (document.getElementById(id).style.display == 'none')
  6.     {
  7.         document.getElementById(id).style.display = '';
  8.     }
  9.     else
  10.     {
  11.         document.getElementById(id).style.display = 'none';
  12.     }
  13. }
  14. </script>
  15.  
  16. <a href="javascript&#058; toggle_content('hello');">Toggle!</a>
  17. <div id="hello" style="display: none">hello!</div>
  18.  

Post Information

  • Total Posts in this topic: 4 posts
  • Moderators: joebert, katana
  • Users browsing this forum: No registered users and 75 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2008. Driven by phpBB © 2001-2008 phpBB Group.

 
 
 
 

Need a pre-made web design for your website?

Check out our templates here: Ozzu Templates


400+ FREE Website Templates. Download Now!