Connect with Facebook Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Tutorials > Javascript

Javascript Javascript Tutorials and Code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-02-2006, 09:45 AM
TcM's Avatar   
TcM TcM is online now
Code Warrior
 
Join Date: Aug 2006
Posts: 9,840
Blog Entries: 6
Rep Power: 82
TcM is a name known to allTcM is a name known to allTcM is a name known to allTcM is a name known to allTcM is a name known to allTcM is a name known to all
Default JavaScript:Tutorial, Confirmation Box

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:-

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>
And this as your body:-
Code:
<body onLoad="Confirm_Ok_Cancel()">
Explanation:-
I think it's self explanatory no need of explanations!

A Preview:-


Conclusion:-
As Always Feedback is welcome and the full source is attached!!
Attached Files To view attachments in this forum your post count must be 1 or greater. You currently have 0 posts.

Last edited by TcM; 12-03-2006 at 06:30 AM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-30-2006, 01:24 AM
John's Avatar   
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 5,306
Blog Entries: 24
Rep Power: 20
John is just really niceJohn is just really niceJohn is just really niceJohn is just really niceJohn is just really nice
Send a message via AIM to John Send a message via MSN to John
Default

How can I make the buttons display "Read Now" and "Read Later" rather than "Ok" and "Cancel"?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-30-2006, 01:47 AM
Programming God
 
Join Date: Dec 2006
Location: Sri lanka
Posts: 908
Rep Power: 0
xtraze is an unknown quantity at this point
Send a message via MSN to xtraze Send a message via Skype™ to xtraze
Default

Good for business type sites and when accepting payments, agreeing to agreements, Terms ect.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-30-2006, 05:50 AM
TcM's Avatar   
TcM TcM is online now
Code Warrior
 
Join Date: Aug 2006
Posts: 9,840
Blog Entries: 6
Rep Power: 82
TcM is a name known to allTcM is a name known to allTcM is a name known to allTcM is a name known to allTcM is a name known to allTcM is a name known to all
Default

Quote:
Originally Posted by Sidewinder View Post
How can I make the buttons display "Read Now" and "Read Later" rather than "Ok" and "Cancel"?
That can't be done as far as I know, you need to say in the Confirmation box for Example "To Read Now press Ok to Read Later press Cancel."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-14-2007, 08:25 AM
nfy nfy is offline
Newbie
 
Join Date: Feb 2007
Posts: 1
Rep Power: 0
nfy is an unknown quantity at this point
Default

Thx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript:Tutorial, MouseOver Image Change TcM Javascript 4 06-06-2009 08:49 AM
JavaScript:Tutorial, Printing a Webpage TcM Javascript 7 06-05-2009 02:20 AM
JavaScript:Tutorial, Using Arrays TcM Javascript 24 06-05-2009 02:17 AM
JavaScript:Tutorial, Screen Resolution TcM Javascript 6 12-30-2006 05:45 AM
JavaScript:Tutorial, Redirect URL TcM Javascript 2 12-03-2006 04:42 AM


All times are GMT -5. The time now is 03:34 PM.

Freelance Jobs

XML/XSL: Need code for Book with Chapers using XML
Create an XML file for a book of your creation, and a basic CSS file that will format it to display ...
Earn: $40.00


C++/C: Simple firework cue sequencer
What I require is a rework of a simple cue sequencer. I have a piece of hardware (an Arduino boar...
Earn: $50.00


HTML/XHTML: Menu Rework - ASCIIBin
I'm placing this in the HTML/XHTML section of the Freelance site but you are not limited to HTML. Wh...
Earn: $20.00



CodeCall Goal

Goal #1: 1,000 Blogs
Goal #2: 1,000 Wiki Pages
Goal #3: 300,000 Posts
Goal #4: 20,000 Threads
Done: 30%, 23%, 56%, 75%

Ads