Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 7th, 2004, 07:30 PM
Authorized User
 
Join Date: Jun 2003
Location: Melbourne, Victoria, Australia.
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tdaustin Send a message via Yahoo to tdaustin
Default Popup Menu Help No. 2

Hi Everyone,

I recently asked about the select boxes overriding the popup menu.

I have run into another problem.

I have the popup menu code in a external file. I use it for many pages, how ever only a couple of pages use the select boxes and need to write a if statement in my showMenu function to only apply the hiding of the select box if on the perticular page. Because the popup menu will fall over unless its a valid field to hide.

eg.

Code:
function FW_showMenu(menu, x, y, child) {

    document.forms.form2.projects.style.display='none';

Normal popup code****
How do you write a If statement in javascript that if the page is MainProjects.asp put code
Code:
document.forms.form2.projects.style.display='none';
else skip it.

Thanks in advance

Tim

TDA
__________________
TDA
Reply With Quote
  #2 (permalink)  
Old July 7th, 2004, 07:34 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Something like this?

if(window.location.indexOf("MainProjects.asp") > -1)
{
   document.forms.form2.projects.style.display='none' ;
}

BTW don't forget to un-hide the <select> when the menu closes! :-)

HTH,

Snib

<><
Reply With Quote
  #3 (permalink)  
Old July 8th, 2004, 07:11 PM
Authorized User
 
Join Date: Jun 2003
Location: Melbourne, Victoria, Australia.
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tdaustin Send a message via Yahoo to tdaustin
Default

Thanks heaps,

all works perfectly

Tim:D

TDA
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to hide combo box behind the popup menu? mohini ASP.NET 1.x and 2.0 Application Design 4 March 22nd, 2006 12:22 AM
Popup Menu rweide Javascript 5 June 24th, 2005 03:28 PM
Cascading popup menu rodmcleay VB How-To 0 March 3rd, 2004 10:47 PM
Access' file popup menu Exodus Access VBA 2 December 29th, 2003 09:28 AM



All times are GMT -4. The time now is 12:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.