Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default button

Status
Not open for further replies.

CHRISWYA

IS-IT--Management
Sep 14, 2004
19
GB
I am using the below javascript to confirm a form submission and have no problems with the code. I was just wondering whether it is possible to make the default option no as it is currently defaulting to yes. An suggestions guys...



function CheckSnapshot()
{
doyou = confirm("This procedure is irreversible and will update the strengths table are you sure you wish to continue?");
if (doyou == false)
return false;
}
 

You cannot change the default option. You can only change your text to match. So instead of the current text:

"This procedure is irreversible and will update the strengths table are you sure you wish to continue?"

with the user having to click "Yes" (the default) to overwrite their table, how about:

"This procedure is irreversible and will update the strengths table. You can cancel now if you do not wish to proceed. Do you wish to cancel?"

Then if the user clicks the "Yes" (default) button by mistake, no table would be overwritten.

Hope this helps,
Dan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top