473,791 Members | 3,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript and Valiator Controls Conflicting - VB.net and ASP.net

Hi,

I am having a problem with the validator controls in VB.net
conflicting with the javascript I am using to confirm whether or not
the user wants to submit the page. Here is the situation: I am having
the user edit a page with text boxes populated from a query against a
SQL Server database. When the user clicks on "Save", the information
currently contained in the text boxes will be saved to the database. I
am using the following code to pop up a confirmation box when the user
clicks on submit.

btnSave.Attribu tes.Add("onclic k", "return confirm('Are you sure you
want to edit this record?');")

This works fine until I place some validator controls, such as a
RequiredField Validator, into the page. The validator controls then
work fine, but the confirm box no longer comes up at all. Is there a
way to use the pop-up confirm box and the validator controls together?
This would be preferable because I need to validate not only the
individual controls but also the page as a whole. Thanks, Gene Hoke
Nov 12 '05 #1
0 840

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1795
by: frasfan | last post by:
Hi, I am having a problem with the validator controls in VB.net conflicting with the javascript I am using to confirm whether or not the user wants to submit the page. Here is the situation: I am having the user edit a page with text boxes populated from a query against a SQL Server database. When the user clicks on "Save", the information currently contained in the text boxes will be saved to the database. I am using the following code...
1
1281
by: Guadala Harry | last post by:
I have a very simple aspx page (no code-behind logic) that hosts two 3rd party controls (a dynamic menu and a calendar). The dynamic menu has the bare minimum number of properties set (declaratively), and the calendar has no properties explicitly set (declaratively or otherwise). These controls are placed on the aspx page declaratively. The point so far is that this is the absolute minimal aspx page with the simplest possible implementation...
1
1317
by: RSH | last post by:
Hi, I have a page that uses two seperate user controls (ascx files). Both controls have textbox controls on them along with seperate submit buttons. Control #2 has required validators. The problem is that I need the validator controls to be disabled if the user submits control #1. Right now Control #1 wont submit because the validators in control #2 are tripped when the submit button on Control #1 is clicked on. I know how to disable...
2
5412
by: Head In A Pan | last post by:
Hello! My JavaScripting is at novice level - and after completing a tutorial on a 'floating layer' I was proud that I got it working on Firefox, Safari, Camino & even IE5 for mac!!! But not IE7! The 'floating layer' does not float in IE7... it just sits up at the top of the screen - stuck in one place!! Explorer - why do you mock us?!!! ;( I have tried everything - but I am at a loss. I am thinking maybe it's some conflicting CSS or some...
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10419
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10201
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9023
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.