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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple javascript not working in IE!!

    Hi,

    im just trying a simple bit javascript, it works in Firefox, but not IE!

    heres the code :

    -------------------------

    <script language="JavaScript" type='text/javascript'>

    function selector() {

    if (document.form.style.value =='Victorian' && document.form.model.value =='DwarfWall')
    (document.form.table.value = 'table1')

    }

    </script>

    -------------------------

    and the HTML:

    -------------------------
    <form name="form" method="post" action="">
    <select name="style">
    <option selected>Select a Style...</option>
    <option>Victorian</option>
    </select>
    <select name="model" onChange="javascript:selector()" >
    <option selected>Choose a Model</option>
    <option>DwarfWall</option>
    </select>
    <input name="table" type="text">
    </form>
    -------------------------

    Iv been tearing my hair out for ages over this, searched the web and i still cant fix it! i need it to work in IE aswell....

    thanks

    don
    Last edited by don_black; 01-24-2006 at 04:42 PM.

  • #2
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <option value ="Victorian">Victorian</option>

    and

    <option value ="DwarfWall">DwarfWall</option>

  • #3
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    It's likely that style is a reserved word (used by the DOM), so you shouldn't use it as an id, name or class.

  • #4
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i knew it would be something dead simple..... thats just a lil bit out of a 800 line script..... and firefox was loving it but IE wasnt

    thanks very much for the fast responses


  •  

    Posting Permissions

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