MobTown Posted July 8, 2008 Share Posted July 8, 2008 Ok... I'll start with a couple of apologies, as I am not sure where this post is supposed to go, secondly this is probably the simplest thing in the world, yet it is still giving me trouble. So basically I want to print some form elements but they have java script functions attached to them. Now they only work if the quotations, (" and ') are kept in the same place, however by leaving them in this makes the ( print" code here "; ) mess up. Does anyone know how to work around it. My code can be seen below. print" <button onclick="addPTag(document.getElementById('text'),'B')">[b]B[/b]</button> <button onclick="addPTag(document.getElementById('text'),'I')">[i]I[/i]</button> <button onclick="addPTag(document.getElementById('text'),'U')"><u>U</u></button> "; Once again I apologise if this is simple, and or in the wrong place. Quote Link to comment Share on other sites More sharing options...
Tonka Posted July 8, 2008 Share Posted July 8, 2008 Re: Please Help. This should work for you print <<<EOF <button onclick="addPTag(document.getElementById('text'),'B')">[b]B[/b]</button> <button onclick="addPTag(document.getElementById('text'),'I')">[i]I[/i]</button> <button onclick="addPTag(document.getElementById('text'),'U')"><u>U</u></button> EOF; Quote Link to comment Share on other sites More sharing options...
MobTown Posted July 8, 2008 Author Share Posted July 8, 2008 Re: Please Help. Thanks Tonka (+1), i knew it was going to be something simple... just couldn't quite put my finger on it. Quote Link to comment Share on other sites More sharing options...
Tonka Posted July 8, 2008 Share Posted July 8, 2008 Re: Please Help. No problem, glad to help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.