By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,718 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,718 IT Pros & Developers. It's quick & easy.

javascript doesn't work

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.