Results 1 to 5 of 5

 

Thread: Help needed with javascript dropdown lists

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Sep 2005
    Location
    Northern Ireland
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Hello

    I've been trying for four days straight to fix a problem with the dropdown lists on my page, and I feel like I'm going insane!

    On each page there are nine drop down lists on the right hand side, showing mobile phone models. I have called each list a different FORM NAME, eg. NokiaModels, SamsungModels. Here is an example:

    Code:
    <form name="NokiaModels">
    <p align="center">
    <img border="0" src="images/nokia.jpg" alt="Nokia Mobile Phone Deals" width="88" height="19"></a><br>
    <select style="font-size: 12px; color: #333399; font-family: Verdana; background-color: #ffffff" name="menu" onChange="location=document.NokiaModels.menu.options[document.NokiaModels.menu.selectedIndex].value;" size="1">
    <option>Pick A Model</option>
    <option value="1100.html">1100</option>
    <option value="7250.html">7250</option>
    <option value="6600.html">6600</option>
    </select>
    </form>
    All the other nine drop down lists are exactly the same. However, the above Nokia list falls over when I select something from the list. I get the following error code:

    Line: 291
    Char: 1
    Error: 'document.NokiaModels.menu' is null or not an object
    Code: 0
    The interesting thing is.... even if I remove the above drop down list, and move one below (ie. Samsung Models) into its place... then THAT drop down list seems to give the same error! I've also tried renaming them and but I cannot seem to find the reason for the first drop-down list always throwing up this problem.

    Anyone any ideas on this? I've tried searching this forum and the web but with no luck!

    Thanks,
    Keith

  2. #2
    Blue Man Group

    Status
    Offline
    Join Date
    Aug 2003
    Location
    In the middle somewhere
    Posts
    463
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Keith,

    Can you post the code for all the 9 drop down lists in your page or the page itself. I'm going out now but if nobody has solved it for you by the time I get back I will look at it for you.

    Cheers,

    stevey
    stevey

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Sep 2005
    Location
    Northern Ireland
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Stevey,

    Thanks very much for your help with this - I have sent you a PM with the full code.

    Keith

  4. #4
    Blue Man Group

    Status
    Offline
    Join Date
    Aug 2003
    Location
    In the middle somewhere
    Posts
    463
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Keith,

    Cheers for the code. Your problem is you haven't included the closing </form> tag for your other form object named "form1" at the top of your page. Once you implement this you'll find it's all working fine.

    As the yanks say, "Have a nice day!"

    Cheers,

    stevey
    stevey

  5. #5
    Registered User

    Status
    Offline
    Join Date
    Sep 2005
    Location
    Northern Ireland
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Stevey,

    As I say while jumping up and down... "You da man!"

    Geez one little tag was all that was needed... thank you so much! I can finally finish the rest of the site now!!

    Keith



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. using php to print TD javascript code
    By J Nas in forum Programming
    Replies: 2
    Last Post: 17-03-05, 03:01 PM
  2. Email lists for Butlins
    By mkyrklund in forum Affiliate Marketing Lounge
    Replies: 0
    Last Post: 21-10-04, 04:09 PM
  3. Javascript - users switching it off !!
    By SpendaPenny in forum Affiliate Marketing Lounge
    Replies: 17
    Last Post: 09-10-04, 01:21 AM
  4. Javascript to HTML Solution
    By scifind in forum Programming
    Replies: 2
    Last Post: 04-12-03, 09:40 PM
  5. If you use flash, quicktime or avis on your website - read this
    By drivetowin in forum Affiliate Marketing Lounge
    Replies: 0
    Last Post: 08-11-03, 05:00 PM

Bookmarks

Posting Permissions

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

Content Relevant URLs by vBSEO 3.5.0 RC2