Jump to content

[SOLVED] works in IE but not FF


laPistola

Recommended Posts

function subCho() {
var sS = document.getElementById('subject');
var sSt = sS.options[sS.selectedIndex].text;
if (sSt=="Quote") {
	document.getElementById('rangeRow').innerHTML = '<td align="right"><label for="range">Range:</label></td><td> </td><td><select name="range" id="range"><option>AJAX</option></select> <label for="personallised">Personallised stationary?</label> <input type="checkbox" name="personallised" id="personallised" /></td>';
	remAdd();
} else if (sSt=="Sample Request") {
	document.getElementById('rangeRow').innerHTML = '<td align="right"><label for="range">Range:</label></td><td> </td><td><select name="range" id="range"><option>AJAX</option></select></td>';
	document.getElementById('ad1').innerHTML = '<td align="right"><label for="address1">Address:</label></td><td> </td><td><input name="address1" type="text" id="address1" size="30" /></td>';
	document.getElementById('ad2').innerHTML = '<td align="right"><label for="address2"> </label></td><td> </td><td><input name="address2" type="text" id="address2" size="30" /></td>';
	document.getElementById('ad3').innerHTML = '<td align="right"><label for="address3">City:</label></td><td> </td><td><input name="address3" type="text" id="address3" size="30" /></td>';
	document.getElementById('pc').innerHTML = '<td align="right"><label for="postcode">Postcode:</label></td><td> </td><td><input name="postcode" type="text" id="postcode" size="10" /></td>';
} else {
	document.getElementById('rangeRow').innerHTML = ' ';
	remAdd();
}
}
function remAdd() {
document.getElementById('ad1').innerHTML = '';
document.getElementById('ad2').innerHTML = '';
document.getElementById('ad3').innerHTML = '';
document.getElementById('pc').innerHTML = '';
}

 

targets

 

<tr height="0%" id="rangeRow"> </tr>
      <tr height="0%" id="ad1"> </tr>
      <tr height="0%" id="ad2"> </tr>
      <tr height="0%" id="ad3"> </tr>
      <tr height="0%" id="pc"> </tr>

 

The above code works fine in FireFox 3 but in IE 7 it just says there is error on the page in the status bar at the bottom.

 

This code below works great

 

function otherBox() {
var oS = document.getElementById('hear');
var oSt = oS.options[oS.selectedIndex].text;
if (oSt=='Other') {
	document.getElementById('oB').innerHTML = '<label for="other">if other:</label> <input type="text" name="other" id="other" />';
} else {
	document.getElementById('oB').innerHTML = ' ';
}
}

 

Targeting

 

<em id="oB"> </em>

 

What the code does is dependant on a drop down menu selection it show different fields.

 

Any idea why its not working in IE ??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.