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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -