on my website when button is clicked then other javascript should download from server and apply to current page.
is it possible to do that, could anyone please share some info on it.
Thank you
basically want i am trying to do is
<input type="button" class="btntab" onclick=\'$p.apply.javascript('+ v_id +',"'+v_url+'")\' value="'+lg('applyjava')+'" style="margin:10px 0px;" >
Above code will display the button and on click will call the function $p.apply.javascript with two parameters (ID and url to download the javascript)
here in below function
$p.apply.javascript(v_id, v_url){
Here i want to download the javascript and apply on current page...which is located at
window.location = 'http://www.example.com/java.php?url='+ v_url;
}
what above function is doing is redirecting me to
http://www.example.com/java.php?url='+ v_url;
and displaying the javascript in browser. Instead i want to download this javascript and apply on current page (may be after page refresh or something)
Could any one please share some info if you have done something similar or know how to do this.
thank you...in advance