View Full Version : Simple javascript not working in IE!!

01-24-2006, 04:35 PM

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')




and the HTML:

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

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....



01-24-2006, 04:43 PM
<option value ="Victorian">Victorian</option>


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

Bill Posters
01-24-2006, 04:44 PM
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.

01-24-2006, 04:50 PM
:mad: 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 :thumbsup:

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum