473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Return false does not stop the submit action.

I am currently working on the asp.net web project. I using the return false method to stop the submit action when the user choose to cancel the action.
It is working fine before I am installing the FlashGet Version 1.80.1002.

After install the FlashGet program, the page will still submitted even I put the return false in the code. Is anyone hit this problem before? Any solutions for this?

Thank you.

Sample Code:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="Default2.aspx" id="form1">
<div>
</div>

<div>
<input type="submit" name="Button1" value="Button" onclick="return false;" id="Button1" />
</div>

<div>
</div></form>
</body>
</html>
Jan 8 '07 #1
3 9143
acoder
16,027 Expert Mod 8TB
Try
Expand|Select|Wrap|Line Numbers
  1. <form name="form1" method="post" action="Default2.aspx" id="form1" onsubmit="return false;">
instead.
Jan 8 '07 #2
Let said I want to create a popup message box with ok and cancel button. When User click on Ok Button, it will proceed to the action. If the user click cancel, the popup will disapear without refresh the page. Before that, I am using Onclick=return true/false to control. Can I know if I am using the onsubmit method, how to cater the scenario above?
Jan 9 '07 #3
r035198x
13,262 8TB
Let said I want to create a popup message box with ok and cancel button. When User click on Ok Button, it will proceed to the action. If the user click cancel, the popup will disapear without refresh the page. Before that, I am using Onclick=return true/false to control. Can I know if I am using the onsubmit method, how to cater the scenario above?

function confirmed(form) {
return confirm("Are you sure you want to delete");
}


.....
onSubmit = "return confirmed(this)">
Jan 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Varun | last post by:
Hi There, I have a form("myRequest.asp") and the values from it are retrieved into the page ("output_Print.asp") on which I have two buttons('Save As Complete' and 'Save As Incomplete'). When the...
7
by: sindre | last post by:
Hi, Some place I use links to submit forms instead of a submit button. The way I have done this is: <a href="javascript:document.getElementById('<?php print "delete$i"...
13
by: kurtj | last post by:
Hello Gurus: I have a validation script (below) that is somehow messed up. If the Name field is blank, I get the alert message, then the browser window goes to a blank document with the word...
1
by: mailpitches | last post by:
X-No-Archive: yes a function, the return value of the function is a boolean. What does this boolean value mean? Example: <body onload="document.getElementById('field').onkeydown=function(x) {...
4
by: d3vkit | last post by:
I have a form on my page, and some javascript which uses ajax to submit the form, and then opens the new page in a div using ajax so there is no refresh. This works fine. But the problem is this: all...
3
by: Anthony | last post by:
I have a form on a web page that requires to click on a button to submit the information. I have two questions about changing this form: 1. Is there a way that I can change the script so that the...
4
by: cssExp | last post by:
hello, i want to check for errors on submitting a form, on encountering an error it runs a function and returns a false preventing form submit. I have implemented that. function eCheck() { ...
1
by: Sudarhan | last post by:
Hello frnds I have created a webbased form using asp and javascript .. while submitting the form i am validating the fields in the form .it validates the field and returns alert message. but when...
5
by: GiJeet | last post by:
Hello, I'm trying to figure this code out. <input type="submit" onclick="if(!confirm('Are you sure?') return false; "... /> I know that if you return false in an event like this onclick it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.