Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-05-2007, 09:32 AM   PM User | #1
mesh2005
New Coder

 
Join Date: Aug 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
mesh2005 is an unknown quantity at this point
Smile Web browsers don't display the save password box when using AJAX

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.
mesh2005 is offline   Reply With Quote
Old 09-05-2007, 02:58 PM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
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.

Code:
<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
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Old 01-25-2011, 02:44 PM   PM User | #3
newbielives
New to the CF scene

 
Join Date: Jan 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
newbielives is an unknown quantity at this point
THANK YOU this solution worked beautifully for me
Quote:
Originally Posted by A1ien51 View Post
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.

Code:
<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 is offline   Reply With Quote
Old 05-09-2012, 06:04 PM   PM User | #4
hongclub
New to the CF scene

 
Join Date: May 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
hongclub is an unknown quantity at this point
it works for IE, but not Chrome ... anything code i need to add for Chrome?
hongclub is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:58 PM.


Advertisement
Log in to turn off these ads.