disabling submit button once clicked

  • crimsonian
  • Born
  • Born
  • No Avatar
  • Joined: Sep 21, 2007
  • Posts: 1
  • Status: Offline

Post September 21st, 2007, 7:00 am

<form method='post' action='<? $PHP_SELF ?>' onsubmit='disable(this)'>

I think your problem is there...

I might be wrong, but I think you need <?php echo $_SERVER['PHP_SELF']; ?> and then the disable(this) portion should go in the <input type='submit' name='submit' value='Login' style="border-style: solid; border-width: 1px 1px 1px 1px; font-style: strong" />


Try this...

<head>
<script language="JavaScript">
function submitPressed() {
document.someForm.submitButton.disabled = true;
//stuff goes here
document.someForm.submit();
}
</script>
</head>

<form name="someForm" action="whatever">
<input type="button" value="submit" name="submitButton" onclick="submitPressed()">
</form>
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 21st, 2007, 7:00 am

Post Information

  • Total Posts in this topic: 16 posts
  • Users browsing this forum: No registered users and 112 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.