|
| ||||||||||
| Tags: java, javascript, popup box, script |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Popup Boxes in JavaScript
|
|
#2
| ||||
| ||||
| Re: Popup Boxes in JavaScript
JavaScript Provides you three types of Popup Box:
Confirm Box : This Box contains the Ok and Cancel button. If use clicks on the cancel the box will return the false value. If user clicks on the Ok then true value is returned. Prompt Box : This box contains the OK and cancel button. If user is inputting the value then you can provide this box to user. |
|
#3
| |||
| |||
| Re: Popup Boxes in JavaScript
JavaScript provides following types of Popup Boxes: 1)Alert Box: This is just for surarity of input. Syntax: Code: alert("Add text Here"); Syntax: Code: confirm("Add text Here"); Syntax: Code: prompt("Add text Here","By Deault Value"); |
|
#4
| ||||
| ||||
| Re: Popup Boxes in JavaScript
It can be possible to use the three different types of Popup boxes withe the help of java script: ALERT BOX :
|
|
#5
| ||||
| ||||
| Re: Popup Boxes in JavaScript
If you are using Java Script then it may provide you three types of Pop Boxes as below:
|
|
#6
| ||||
| ||||
| Re: Popup Boxes in JavaScript Popbox script: Alert Box: Code: <html>
<head>
<script type="text/javascript">
function alertexample()
{
alert("Got the message");
}
</script>
</head>
<body>
<input type="button" onclick="alertexample()" value="Show alert box" />
</body>
</html> Code: <html>
<head>
<script type="text/javascript">
function confirmexample()
{
var check=confirm("Press ");
if (check==true)
{
document.write("Ok pressed!");
}
else
{
document.write("Cancel pressed ");
}
}
</script>
</head>
<body>
<input type="button" onclick="confirmexample()" value="Show confirm box" />
</body>
</html> Code: <html>
<head>
<script type="text/javascript">
function promptexample()
{
var msg=prompt("Message");
if (msg!=null && msg!="")
{
document.write("Got message");
}
}
</script>
</head>
<body>
<input type="button" onclick="promptexample()" value="Show prompt box" />
</body>
</html> |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Popup Boxes in JavaScript" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to use CSS content boxes | Botan | Software Development | 1 | 08-01-2011 11:18 AM |
| Why does popup blocker in windows 7 not stop netflix popup ads? | Braasch | Operating Systems | 6 | 11-08-2010 12:33 PM |
| How to nest boxes inside parent boxes in CSS? | Dilbert | Software Development | 5 | 11-05-2010 04:41 PM |
| How to Use Combo Boxes in Java? | MarceloQuad | Software Development | 5 | 11-02-2010 02:23 AM |
| How to Open Popup Window in Javascript? | Soumen | Software Development | 4 | 07-02-2010 03:02 AM |