GetElementById working in FF but not in IE. WHY?
Coupon Codes, Rebates & Free Shipping Codes
PCmover - $15 Off with Coupon Code S6ch2
muvee Reveal takes your photos, video and music
and automatically creates your own highly polished
personal muvee.
Visit the Nuance store today
Download a Free Trial of Acronis True Image 2009
Visit the CA US Store!
10% Off - 1 YR - Trend Micro Internet
Security 2009 - Coupon Code: TrendIS.
Get 10% off any purchase at MacSpeech.com
when you use the coupon code DICTATE10!
Get PowerDirector 7 Ultra from Cyberlink - optimized
for Intel Core i7
I have a table cell with a picture as its background, and a checkbox. Once the checkbox is selected, change the background.
Here is the cell
TD COLSPAN="2" VALIGN="middle" ALIGN="center" ID="meetandgreet" style=" background-image:url(SELECTED/meet.jpg); background-repeat: no-repeat;" NOWRAP><INPUT TYPE="checkbox" ID="meet" VALUE="Include Meet & Greet" onchange="flipimg('meetandgreet', 'meet', 'meetselected.jpg', 'meet.jpg')"></TD>
Here is my JavaScript >
function flipimg(idcell, idfield, imgNameOn, imgNameOff)
{
if(document.getElementById(idfield)....
{
document.getElementById(idcell).st... = "url(SELECTED/" + imgNameOn + ") no-repeat";
}
else
{
document.getElementById(idcell).st... = "url(SELECTED/" + imgNameOff + ") no-repeat";
}
}
This works perfectly in FireFox for me but refuses to do anything in IE.
GetElementById working in FF but not in IE. WHY?download windows media player
IE has pathetic JavaScript support. You might want to check another method. Also try validating your script. In Firefox, get the Web Developer and Firebug addons and then you'll have some good JS debugging tools.
More Related Questions and Answers ...
The information post by website user , we not guarantee correctness.
