Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts

    failing form elements

    This always fails on IE (and opera)... any ideas?
    However, it works on Mozilla and NS.

    Code:
    i=0;
    document.forms["userdefform"].elements["currency"].options[i] =
    new Option("United States Dollars", "usa");
    ++i;
    document.forms["userdefform"].elements["currency"].options[i] =
    new Option("Euro", "euro");
    ++i;
    document.forms["userdefform"].elements["currency"].options[i] =
    new Option("Canadan Dollars", "canada");
    ++i;
    document.forms["userdefform"].elements["currency"].options[i] =
    new Option("United Kingdom Pounds", "uk");
    my form says (something similar to):

    Code:
    <form name="userdefform">
    <select name="currency">
    </select>
    </form>
    ... Keep in mind i am using Mandrake.
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    then i guess it is the combination of mandrake/ie, because your code works great in winxp/ie

    and why a new thread and not continue the other one about this same subject?
    I am the luckiest man in the world

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Yes, you should have continued this thread.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'm testing IE on windows. As if WINE could run IE on mandrake!
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    is there any error message thrown?
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts
    none.


    if you wanna preview what im doing:
    www.netfuse.com.au/hotel.php
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Could be a MIME-type problem. Try setting the ContentType to "text/javascript" in the currency.php. Put also an alert inside the init_currency() function to verify that it is being called.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #8
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I find the Option constructor to be buggy -- try document.createElement instead.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Brisbane, Australia
    Posts
    181
    Thanks
    1
    Thanked 0 Times in 0 Posts
    After finding the cause of 3 days of worry, I would like to emphasise the use of the </script> tag in all your javascript code...


    GOD IM AN IDIOT!


    Mozilla and NS dont care.
    However IE, Konqueror and Opera chuck the sh**s!

    -Bash

    [Note to moderators: im trying not to swear. be nice]
    -mR_eGo
    _______________________
    Programming since
    3 years old.

  • #10
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hehe, ya. Those can help, can't they?
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


  •  

    Posting Permissions

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