Need a little help

Started by
0 comments, last by ApochPiQ 18 years, 11 months ago
I can't figure out why this function won't work. The php variable is valid, and when I take away the font-size changing part it works. How can I change the font size through this?

<script language=html>
function mover() {
document.getElementById(<?php echo $isp ?>).style.color="red";
document.getElementById(<?php echo $isp ?>).style.font-size="18";

}

</script>

Advertisement
You may need the parameter to getElementById() to be in quotes:

<script language=html>function mover() {document.getElementById("<?php echo $isp ?>").style.color="red";document.getElementById("<?php echo $isp ?>").style.font-size="18";}</script>



Also be sure there's actually elements that exist in the document with that ID [wink]

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement