I want to return a url to form action using javascript function.
I am calling the function like this:
<form action="javascript:getUrl()">
And my function is returning strings of url like this:
function getUrl(){
if(condition)
return "this string url";
else
return "this string url";
}
When I am doing this, the resultant page simply shows the urls in text format on browser instead of loading them.
I am pretty new to these scripting and web designing stuffs.