469,903 Members | 1,930 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

javascript doesn't work

Hello!

I have a .net form in an IE6 browser. I have a javascript validate function
that returns false if user hits cancel.

From testing, I can see when I click submit and cancel, the javascript is
returning the false code to the button correctly.

However, the asp page continues with execution and the code runs (which was
not supposed to in this instance!).

Is there an obvious explanation for this?

Thank you!

-Bahman
Nov 19 '05 #1
3 1463
Can you post the actual 'onclick' event line in the control, from your code?

is it something like onclick='return javascriptFunction();'

"Bahman" wrote:
Hello!

I have a .net form in an IE6 browser. I have a javascript validate function
that returns false if user hits cancel.

From testing, I can see when I click submit and cancel, the javascript is
returning the false code to the button correctly.

However, the asp page continues with execution and the code runs (which was
not supposed to in this instance!).

Is there an obvious explanation for this?

Thank you!

-Bahman

Nov 19 '05 #2
I am very sorry.

This question was not appropriate.

Please forgive me!

-Bahman

"Bahman" wrote:
Hello!

I have a .net form in an IE6 browser. I have a javascript validate function
that returns false if user hits cancel.

From testing, I can see when I click submit and cancel, the javascript is
returning the false code to the button correctly.

However, the asp page continues with execution and the code runs (which was
not supposed to in this instance!).

Is there an obvious explanation for this?

Thank you!

-Bahman

Nov 19 '05 #3
Maybe I am not understanding .... but your situation seems similar to a
problem I eventually resolved. After great tears .... I eventually discovered
that Button objects FORCE a postback regardless of true or false returned. I
replaced all Buttons with Image controls, added an "OnClick" attribute to the
control and in the JavaScript I fire __doPostBack('',''); when I want to
complete the code, otherwise I return false.

--
Frederick Volking
System Architect
SC Dept of Juvenile Justice
"Bahman" wrote:
Hello!

I have a .net form in an IE6 browser. I have a javascript validate function
that returns false if user hits cancel.

From testing, I can see when I click submit and cancel, the javascript is
returning the false code to the button correctly.

However, the asp page continues with execution and the code runs (which was
not supposed to in this instance!).

Is there an obvious explanation for this?

Thank you!

-Bahman

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.