RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1323 | Replies: 2
Reply
Join Date: Feb 2007
Posts: 53
Reputation: edouard89 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
edouard89's Avatar
edouard89 edouard89 is offline Offline
Junior Poster in Training

Page change event.

  #1  
May 23rd, 2007
I have this function that depending on the value passed will do what ever.

  function menu(n){
    switch(n)
    {
      case 0:
        document.getElementById('sub2').style.display = 'none';
        document.getElementById('sub3').style.display = 'inline';
        menu1();
        break;
      case 1:
        document.getElementById('sub3').style.display = 'none';
        document.getElementById('sub2').style.display = 'inline';
        menu2();
        break;
    }      
  }

I also have an Image that when clicked will go to a different page. Is there an event that I can use to trigger this function after the page changes?

Thanks, Edouard.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,640
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 118
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Page change event.

  #2  
May 24th, 2007
Use the onload event somewhere in the NEW document, and put the script in it too.

I hope the script doesn't refer to the document you just left.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Feb 2007
Posts: 53
Reputation: edouard89 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
edouard89's Avatar
edouard89 edouard89 is offline Offline
Junior Poster in Training

Re: Page change event.

  #3  
May 24th, 2007
OK thanks I did that works great.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:36 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC