passing url as parameter in javascript is not calling the function -


<a href="javascript:void();" onclick="openwindow(2,1,4326,http://www.../images/icon_tree1.gif);">edit asset info</a> 

function openwindow not called , see folowing error on console

uncaught syntaxerror: unexpected token : ,

uncaught syntaxerror: unexpected token )

this actual code using

return "<a href='javascript:void();' onclick='openwindow(" 2 "," + 1 + "," + 4326 + "," + symbolurl + ");'>edit asset info</a>"; 

url address string, should surround quotes:

... onclick="openwindow(2,1,4326,'http://www.../images/icon_tree1.gif');" ... 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -