...

View Full Version : Won't work . InnerHTML



UrbanTwitch
10-17-2008, 01:58 AM
<script type="text/javascript">
<!--
if(location.href.match('Post&CODE=00&f=13'))
{
document.getElementsByName('Post')[0].innerHTML += "Name:
Age:
Genger:
Sexual Orientation:
Political Preferance:
How'd you find us:"
}
//-->
</script>

That will not work. I tried replacing the Age, Gender, Name, etc with like "ghweghwegwe" and it worked.
Do I need a \n or multiple lines of document.getElementsByName? Or wha?\

Thanks!

rangana
10-17-2008, 04:10 AM
See if adding highlighted helps:


document.getElementsByName('Post')[0].innerHTML +="Name:<br>\
Age:<br>\
Genger:<br>\
Sexual Orientation:<br>\
Political Preferance:<br>\
How'd you find us:"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum