Hi all and thanks for reading. I have a simple script that works in IE and Safari, but not FF. Basically when I click a button I want an image to appear dynamically via JS. This is what i've got (watered down)
**JS function called Contact**
var loadingImg = document.createElement("img");
loadingImg.setAttribute("src", "/images/contact-playing.jpg");
loadingImg.setAttribute("width", "492");
loadingImg.setAttribute("height", "153");
loadingImg.setAttribute("alt", "Playing In My Studio");
document.getElementById("ContactFormDiv").insertBefore(loadingImg, ContactForm);
**HTML**
<div id="ContactFormDiv">
<p id="hope">Test</p>
<form action="javascript:Contact();" method="post" name="ContactForm" id="ContactForm">
<input name="name" id="name" type="text" maxlength="50" tabindex="1" value="" />
<input name="email" id="email" type="text" maxlength="50" tabindex="2" value="" />
<textarea name="comments" id="comments" cols="50" rows="10" tabindex="3"></textarea>
<input type="hidden" name="frmVid" id="frmVid" value="<?php echo $frmVid;?>" />
<input type="hidden" name="frmTitle" id="frmTitle" value="<?php echo $frmTitle;?>" />
<input class="submit" type="submit" name="submit" value="Submit" tabindex="4" />
</form>
</div> <!-- Closes the ContactFormDiv div -->
So if i'm correct it should insert the image before the form with the id of contactform. it works in IE and safari but not FF, any ideas?
Thanks,
Anthony