Page 1 of 1

HELP PLEASE!!!

Posted: Mon Feb 21, 2011 9:04 am
by DCorker
Hi Guys,

I am new to PHP and need some help urgently.

I have the below code and I cant seem to get the Java working.

Print "<td><a href='#' onmouseover='drc('test','test'); return true;' onmouseout='nd(); return true;'>
".$info['venue'] . "</a></td>";

I have it working on another page and I have an overlay.js included in the above page.

Thanks

Re: HELP PLEASE!!!

Posted: Mon Feb 21, 2011 9:42 am
by Darhazer
the problem is in the HTML itself:

Code: Select all

onmouseover='drc('test','test'); return true;'
have to be

Code: Select all

onmouseover='drc(\'test\',\'test\'); return true;'

Re: HELP PLEASE!!!

Posted: Tue Feb 22, 2011 4:08 am
by DCorker
Thanks for this, but it still isnt working, I am now getting a Java error on the page, incorrect character.
Please help me:)

Here is my code so far:
Print "<td>
<a href='#' onmouseover='drc(\'test\',\'test\'); return true;' onmouseout='nd(); return true;'>
<font color=white>".$info['venue'] . "</font></a></td>";

Re: HELP PLEASE!!!

Posted: Tue Feb 22, 2011 5:30 am
by Darhazer
could you please post the exact message, as well as the javascript itself

Re: HELP PLEASE!!!

Posted: Tue Feb 22, 2011 6:55 am
by crazycoders
Make sure also you are not confusing PHP functions and Javascript functions. You can't call a php function from a javascript link, these are two completely different topics!