javascript confirm() change focus

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

javascript confirm() change focus

Post by valen53 »

since we know that the confirm function was foucs on the OK button. can we change the focus to Cancel button after popup?
b'cos some user was too fast to enter the button without reading, then some misunderstand was occur.

after search, but still can't found solution, anybody can help me?

var agree=confirm("Are you sure you wish to continue?");
if (agree)
return true ;
else
return false ;
}
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

AFAIK, it's a system built and controlled message box, so no.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

An alternative would be creating an in-page confirm box, either through Javascript or php. I'd suggest using php for compatibility reasons..
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Can't you rephrase the question? something like:

Code: Select all

var agree = confirm("Do you want to read license agreement once more?");
if (agree)
  return false ;
else
  return true ;
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

Post by valen53 »

thanks for all reply...

i will ask my users either use confirm() or in-page confirm box
Post Reply