tags:

views:

39

answers:

1

last update still not work please Fix it for me

I need to use this But its also not work Please Fix it for me

 $html = ' 
           <a href="/r?%s" onClick="location.href="%s/%s-%s.html";" target=_blank title="Visit Related Sites"><img border=0 src="images/e.gif" width=100 height=75></a>'; 
        printf($html, $wurl, $siteurl, $myrow["wallpaperid"], $myrow["wallpapername"]); 
+4  A: 

Don't use double-quotes within double-quotes (unless you escape them properly):

<a onclick="location.href='http://google.com'"&gt;Click Me</a>

Note how I use single-quotes within my double-quotes. This keeps the statement from being abandoned prematurely.

You could have also written it like this:

<a onclick="location.href=\"http://google.com\""&gt;Click Me</a>

But that makes it slightly less readable.

Jonathan Sampson