Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Javascripts ??
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedJavascripts ??

 Post Reply Post Reply
Author
jellejacob View Drop Down
Newbie
Newbie
Avatar

Joined: 19 June 2002
Location: Netherlands
Status: Offline
Points: 10
Direct Link To This Post Topic: Javascripts ??
    Posted: 07 August 2003 at 3:33am

Hi All,

I'm using a Pop-up confirm message javascipt. When I'm applying this javascript to a submit button with the onclick event, the form in which the button is located, still submits even when I hit "NO" The form contains several onsubmit javascript actions.
Does anybody know how I can solve this problem?

Here's the code that I'm using:

Here's the code that's in the <HEAD> section

<script language="JavaScript" type="text/JavaScript">
<!--

function GP_popupConfirmMsg(msg) { //v1.0
document.MM_returnValue = confirm(msg);
}
//-->
</script>

<script language="javascript" src="../ScriptLibrary/incPureUpload.js"></script>


Here's the code from the formaction:

<form ACTION="<%=MM_editAction%>" METHOD="POST" enctype="multipart/form-data" name="frm_AddNew" id="frm_AddNew" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',false,'','','','','','','');showProgressWindow('fileCopyProgress.htm',300,100);return document.MM_returnValue">

This is the code for the submit button:

<input name="Toevoegen" type="submit" class="InputTypeButton" id="Toevoegen" onClick="GP_popupConfirmMsg('U staat op het punt een kavel toe te voegen. Wilt u doorgaan?');YY_checkform('frm_AddNew','Adres','#q','0','s.v.p. een adres invullen.','Plaats','#q','0','s.v.p. een plaats invullen.','Vraagprijs','#q','0','s.v.p. een vraagprijs invullen');return document.MM_returnValue" value="Toevoegen" />


Hope someone can help out.

Thanks in advance

Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Direct Link To This Post Posted: 07 August 2003 at 9:41am

<script language="JavaScript" type="text/JavaScript">
<!--

function GP_popupConfirmMsg(msg) { //v1.0
return confirm(msg);
}
//-->
</script>

<form ACTION="<%=MM_editAction%>" METHOD="POST" enctype="multipart/form-data" name="frm_AddNew" id="frm_AddNew" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',false,'','','','','','','');showProgressWindow('fileCopyProgress.htm',300,100);return GP_popupConfirmMsg('Are you sure?')">

<input name="Toevoegen" type="submit" class="InputTypeButton" id="Toevoegen" onClick="YY_checkform('frm_AddNew','Adres','#q','0','s.v.p. een adres invullen.','Plaats','#q','0','s.v.p. een plaats invullen.','Vraagprijs','#q','0','s.v.p. een vraagprijs invullen');" value="Toevoegen" />



Edited by Flamewave
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.