[SOLVED] String wrappers besides single and double quote
Posted: Thu Jul 05, 2007 7:18 pm
feyd | Please use
The above code does not as shown 
The problem is that I don't have any way to wrap the word 'username' inside my onClick.
Any ideas for a way around this?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I've written a PHP function that takes in HTML code as its parameter.
In a file I pass in some code that displays a login form and I use javascript and essentially I run out of ways to parse quotes:Code: Select all
<?php
function_name("
Login here: <a href='javascript:createPopup(\"
<!-- various html tags here -->
<input type=submit onClick=login(document.getElementsByTagName("username").item(0).value) value=login />
\")>login</a>
");
?>The problem is that I don't have any way to wrap the word 'username' inside my onClick.
Any ideas for a way around this?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]