javascript - How to display a input button and close the current window -
i have call service using ajax, if goes on ajax call enable or display input (maybe in div?) on page when clicked close current window. best way using javascript?
here function of javascript class:
myfunction.prototype.init = function(param1, param2) { this.myparams = new hash(); this.myparams.set("param1", param1); this.myparams.set("param2", param2); new ajax.request('myservice.asmx/myservicefunction', { method: 'post', onsuccess: //how can mentioned here?, onfailure: failurefunc, onexception: ajaxerror, parameters: this.myparams }); } any appreciated
on onsuccess part have put this:
onsuccess: function() { $('div_to_show').show(); } in html part have this:
<div id="div_to_show"> <input type="button" name="close" id="close" value="close" onclick="javascript:window.close();" /> </div> of course have hide div on document loading.
Comments
Post a Comment