Referencing a javascrip variable in html within PHP
Posted: Wed Sep 24, 2008 4:38 am
Hi Guys,
Help !
I am trying to pass a variable in a function from php/html to javascript,
$loginsummary .= "
<table>
<tr>
<td><input name='user' type='text' id='user' value='' onChange='doit('hello')' /></td>
The problem seems to be with how many apostrophes is before 'hello' the function works if I remove the hello part so it is fine calling it, i just need to be able to set a variable.
Kind Regards,
C
Help !
I am trying to pass a variable in a function from php/html to javascript,
$loginsummary .= "
<table>
<tr>
<td><input name='user' type='text' id='user' value='' onChange='doit('hello')' /></td>
The problem seems to be with how many apostrophes is before 'hello' the function works if I remove the hello part so it is fine calling it, i just need to be able to set a variable.
Kind Regards,
C