PDA

View Full Version : Adding html to java within the script?



bsheets
03-24-2006, 06:20 AM
Hi all, Firstly, I'm no js expert. Now, I have "outsourced" parts of the web pages are appear on many pages - in this case, the menu bar.

So, I've added document.writeln( before each html section (and closed them). Works fine as is. I want to incorporate the Any Link Drop Down Menu script but it seems to only work if the menu bar is html in the actual page info. And placing the two either separately or together doesn't seem to work. ") expected" or "syntax error" is what comes out. Any ideas?

Thanks,
E

simonf
03-24-2006, 07:28 AM
do you have a link to the page where you have the problem, so we can see what is going on??

bsheets
03-24-2006, 11:30 PM
Sure, www.misssparkle.com/2006. The menubar, of course, isn't visible though.

e

Twey
03-25-2006, 11:00 AM
As suspected, you've failed to escape some quotes:
document.writeln('<a href="/2006/me.html" style="FONT-SIZE: 16px" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, \'150px\')" onMouseout="delayhidemenu()">');

bsheets
03-26-2006, 07:12 AM
It works, it works, it works! Woo hoo! Thank you so much!!!!