Re: Create Popup Window using PHP

From: Date: Thu, 23 Oct 2003 10:47:30 +0000
Subject: Re: Create Popup Window using PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-167248@lists.php.net to get a copy of this message
On Thu, 23 Oct 2003 10:51:47 +0100, Pete M wrote: > <script language="JavaScript"> > function confirmEdit() > { > [...JS/DOM snipped...] > } > </script> > > and then a button instead of submit > [...] > <input type="button" name="Button2" value="Save Changes" > class="butt" > onClick="confirmEdit()"> > [...] Hm. How about this one? <input type="submit" onClick="return confirm('Sure?')"> Better Version (not tested): <script type="text/javascript"> function confirm_submit() { // form checks go here... if(confirm('r u sure?') and checks_r_ok) { document.getElementById('hidConfirmed').value = 'true'; return true; } else { return false; } } </script> ... <input type="submit" onClick="return confirm_submit()"> Robert

« previous php.general (#167248) next »