Form Success popup

windows

Guest
Hi,<br />
I have a form that should popup a popup mentioning Success so i am using alert() box but it shows a yellow explanation which i dont want. Is there any other more intuitive kind of success box i can use?<br />
<br />
TIA<!--content-->Sorry for the bad explanation...need some sleep i guess. So re-writing here again:<br />
<br />
Hi,<br />
I have a form that should popup mentioning Success so i am using an alert() box but it shows a yellow exclamation(!) which i dont want. Is there any other more intuitive kind of success message box i can use?<br />
<br />
TIA<!--content-->Use window.open() and create your own popup. Why are you using a popup anyway? Why not display your success message on the page your form submits to?<!--content-->Use window.open() and create your own popup. Why are you using a popup anyway? Why not display your success message on the page your form submits to?<br />
<br />
Using popup because i need to take the user back to the form that would reset to initial values. Any other way other than window.open().<br />
<br />
TIA<!--content-->You can simulate a pop-up window with CSS. As an example:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><br />
<html lang='en'><br />
<head><br />
<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'><br />
<title>Untitled</title><br />
<style type="text/css"><br />
#popup {<br />
display: none;<br />
border: outset gray 2px;<br />
background-color: silver;<br />
padding: .5em;<br />
position: absolute;<br />
z-index: 2;<br />
top: 33%;<br />
left: 50%;<br />
width: 10em;<br />
margin: 0 -6em;<br />
text-align: center;<br />
}<br />
#popup p {<br />
margin: 0;<br />
padding: 1em;<br />
border: inset 1px silver;<br />
}<br />
</style><br />
<script type="text/javascript"><br />
/* pop up div with message */<br />
function popUp(msg)<br />
{<br />
document.getElementById('popup').innerHTML = "<p>"+msg+"<br>\<br />
<button onclick='popDown();'>Close Window</button></p>";<br />
document.getElementById('popup').style.display="block";<br />
}<br />
/* pop down div */<br />
function popDown()<br />
{<br />
document.getElementById('popup').innerHTML = "";<br />
document.getElementById('popup').style.display="none";<br />
}<br />
</script><br />
</head><br />
<body><br />
<br />
<form action="#" onsubmit="popUp('Success!');return false;" method="post"><br />
<fieldset><br />
<label>This is a test.<br><br />
<input type="submit" value="Submit"></label><br />
</div><br />
</fieldset><br />
</form><br />
<br />
<!-- this will be the success pop-up --><br />
<div id="popup"></div><br />
<br />
</body><br />
</html><!--content-->Very good. Love it. If validation is a concern, I would make changes to the script as shown and delete bottom </div> tag just before the </fieldset> tag:<br />
<br />
<script type="text/javascript"><br />
/* pop up div with message */<br />
function popUp(msg)<br />
{<br />
document.getElementById('popup').innerHTML = "<p>"+msg+"<br>\<br />
<button onclick='popDown();'>Close Window<\/button><\/p>";<br />
document.getElementById('popup').style.display="block";<br />
}<br />
/* pop down div */<br />
function popDown()<br />
{<br />
document.getElementById('popup').innerHTML = "";<br />
document.getElementById('popup').style.display="none";<br />
}<br />
</script><br />
<br />
Ron<!--content-->
 
Top