473,385 Members | 1,630 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.

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 1557
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: VK | last post by:
A while ago I proposed to update info in the group FAQ section, but I dropped the discussion using the approach "No matter what color the cat is as long as it still hounts the mice". Over the last...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.