...

View Full Version : Web browsers don't display the save password box when using AJAX



mesh2005
09-05-2007, 10:32 AM
I built a login form that posts data back to the server using AJAX. The form has a button not a submit button. Browsers don't display the save password dialog box when I click the login button. Is there anyway to instruct the browser to save the password? It works correctly if I change the login from AJAX to the usual POST.

A1ien51
09-05-2007, 03:58 PM
The reason why it does not prompt it is because the browser needs the page to phyiscally to refresh back to the server. A little trick you can do is to perform two actions with the form. First action is onsubmit have it call your Ajax code. Also have the form target a hidden iframe.



<iframe src="ablankpage.htm" id="temp" name="temp" style="display:none"></iframe>
<form target="temp" onsubmit="yourAjaxCall();">


See if that causes the prompt to appear.

Eric

newbielives
01-25-2011, 03:44 PM
THANK YOU this solution worked beautifully for me

The reason why it does not prompt it is because the browser needs the page to phyiscally to refresh back to the server. A little trick you can do is to perform two actions with the form. First action is onsubmit have it call your Ajax code. Also have the form target a hidden iframe.



<iframe src="ablankpage.htm" id="temp" name="temp" style="display:none"></iframe>
<form target="temp" onsubmit="yourAjaxCall();">


See if that causes the prompt to appear.

Eric

hongclub
05-09-2012, 07:04 PM
it works for IE, but not Chrome ... anything code i need to add for Chrome?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum