Merge pull request #31 from anandpdoshi/master

Open a new window on POST
This commit is contained in:
Rushabh Mehta 2011-08-31 00:42:32 -07:00
commit 7138768035
2 changed files with 2 additions and 2 deletions

View file

@ -259,7 +259,7 @@ function open_url_post(URL, PARAMS, new_window) {
temp.method="POST";
temp.style.display="none";
if(new_window){
temp.target = '_blank';
}
for(var x in PARAMS) {
var opt=document.createElement("textarea");

View file

@ -285,7 +285,7 @@ if(namespace?window[namespace][widget_name]:window[widget_name]){callback(create
currently_loading[widget]=1;}}
function makeArgString(dict){var varList=[];for(key in dict){varList[varList.length]=key+'='+encodeURIComponent(dict[key]);}
return varList.join('&');}
function open_url_post(URL,PARAMS,new_window){var temp=document.createElement("form");temp.action=URL;temp.method="POST";temp.style.display="none";if(new_window){}
function open_url_post(URL,PARAMS,new_window){var temp=document.createElement("form");temp.action=URL;temp.method="POST";temp.style.display="none";if(new_window){temp.target='_blank';}
for(var x in PARAMS){var opt=document.createElement("textarea");opt.name=x;opt.value=PARAMS[x];temp.appendChild(opt);}
document.body.appendChild(temp);temp.submit();return temp;}
var resume_dialog=null;function resume_session(){if(!resume_dialog){var d=new Dialog(400,200,'Session Expired');d.make_body([['Password','password','Re-enter your password to resume the session'],['Button','Go']]);d.widgets['Go'].onclick=function(){resume_dialog.widgets['Go'].set_working();var callback=function(r,rt){resume_dialog.widgets['Go'].done_working();if(r.message=='Logged In'){resume_dialog.allow_close=1;resume_dialog.hide();setTimeout('resume_dialog.allow_close=0',100);}else{msgprint('Wrong Password, try again');resume_dialog.wrong_count++;if(resume_dialog.wrong_count>2)logout();}}