Introduction:-
Welcome to another JavaScript tutorial of mine..This will code will determine if the user pressed Ok or Cancel
Solution:-
This code goes in the <head> tags:-
And this as your body:-Code:<SCRIPT language="JavaScript"> function Confirm_Ok_Cancel() { var Ok_Cancel= confirm("Press Ok or Cancel!"); if (Ok_Cancel== true) { alert("You pressed Ok"); } else { alert("You Pressed Cancel"); } } </SCRIPT>
Explanation:-Code:<body onLoad="Confirm_Ok_Cancel()">
I think it's self explanatory no need of explanations!
A Preview:-
Conclusion:-
As Always Feedback is welcome and the full source is attached!!
Last edited by TcM; 12-03-2006 at 04:30 AM.
How can I make the buttons display "Read Now" and "Read Later" rather than "Ok" and "Cancel"?
Good for business type sites and when accepting payments, agreeing to agreements, Terms ect.
Thx
thx.. it's really help me out of my problem...!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks