DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

Check box pop up information??

This is a discussion on Check box pop up information?? within the JavaScript Programming forums, part of the Programming & Scripting category; Hi everyone, i have a checkbox on my form and wanted to display some information when the user check it, ...

Go Back   DeveloperBarn Forums > Programming & Scripting > JavaScript Programming

  #1  
Old May 1st, 2009, 06:33 AM
dtz dtz is offline
Barn Regular
 
Join Date: Feb 2009
Posts: 94
Rep Power: 2
dtz is an unknown quantity at this point
Default Check box pop up information??

Hi everyone,
i have a checkbox on my form and wanted to display some information when the user check it, any idea how to do it please??i tried to look for on line resources but could not find any of them.Thanks a lot in advance
Reply With Quote
  #2  
Old May 1st, 2009, 06:53 AM
dtz dtz is offline
Barn Regular
 
Join Date: Feb 2009
Posts: 94
Rep Power: 2
dtz is an unknown quantity at this point
Default

Hi,
i manage to get this function

Code:
<html>
<head>
<script type="text/javascript">
function show_alert()
{
alert("Congratulations ........");
}
</script>
<head>
<script type="text/javascript">
But the problem is when i undo the checkbox the information come up again?
Reply With Quote
  #3  
Old May 1st, 2009, 06:54 AM
grae.uk's Avatar
aka RF; RadioactiveFrog
 
Join Date: Oct 2008
Posts: 144
Rep Power: 2
grae.uk will become famous soon enough
Default

Quote:
Originally Posted by dtz View Post
Hi everyone,
i have a checkbox on my form and wanted to display some information when the user check it, any idea how to do it please??i tried to look for on line resources but could not find any of them.Thanks a lot in advance
Hey dtz,

I'm no expert but have something similar on a hre link on a few of my sites...

try soemthing like this...

Code:
onClick="return confirm('WARNING: \n\nWhat ever your message is.')"
Is that what you are after?
__________________
“There are two theories to argueing with women. Neither of them work! ” - Unknown
Reply With Quote
  #4  
Old May 1st, 2009, 07:09 AM
dtz dtz is offline
Barn Regular
 
Join Date: Feb 2009
Posts: 94
Rep Power: 2
dtz is an unknown quantity at this point
Default

Hi
thanks for your reply, i tried this but nothing happened do you know what i am doing wrong??

Code:
<script type="text/javascript">
function show_alert()
{
onClick="return confirm('WARNING: \n\nWhat ever your message is.')"

}
</script>
</head>
<body>


<br><input type="checkbox" name="C1" value="ON" onclick="show_alert()" value="Show alert box" /></br>
Reply With Quote
  #5  
Old May 1st, 2009, 07:21 AM
grae.uk's Avatar
aka RF; RadioactiveFrog
 
Join Date: Oct 2008
Posts: 144
Rep Power: 2
grae.uk will become famous soon enough
Default

Quote:
Originally Posted by dtz View Post
Hi
thanks for your reply, i tried this but nothing happened do you know what i am doing wrong??

Code:
<script type="text/javascript">
function show_alert()
{
onClick="return confirm('WARNING: \n\nWhat ever your message is.')"

}
</script>
</head>
<body>


<br><input type="checkbox" name="C1" value="ON" onclick="show_alert()" value="Show alert box" /></br>
hey,
scrap the function as you shouldn't need that I don't think..

so just have this

Code:
<br><input type="checkbox" name="C1" value="ON" onClick="return confirm('WARNING: \n\nWhat ever your message is.')" value="Show alert box" /></br>
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > JavaScript Programming

Bookmarks

Thread Tools
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
Hashing (Encryption) Password & Other Sensitive Information BLaaaaaaaaaarche ASP Code Samples 5 February 23rd, 2009 10:59 PM
How do I check the tag of a child? bryceowen JavaScript Programming 4 February 19th, 2009 02:01 PM
Check if integer or float! micky .Net Development 23 January 14th, 2009 05:20 AM
Database accessbility information ramez75 Microsoft Access 7 January 12th, 2009 09:52 PM


All times are GMT -4. The time now is 06:57 AM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2