473,779 Members | 2,078 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
Jul 19 '05 #1
0 1794

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

Similar topics

6
2153
by: Terry | last post by:
Hi, I hope this problem I ran into has an easy fix. I created a menu bar for my page using Sothink DHTML Menu 4.1 which created javascript file. I also add a small slide show on the page using javascript and the javascript is embedded in this page's HTML. Everything works perfectly with IE. However, Netscape (4, 6, 7) can't see the menu bar created in DHTML when the slideshow javascript is
0
840
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...
7
2625
by: Thiru | last post by:
I am writing an application that interacts with Oracle and Teradata. In order to create the executable, I need to link various Oracle and Teradata libraries. I found out that when I link the Oracle and Teradata libraries together, the Teradata API functions are not working properly. My assumption is that these libraries are sharing identical function names and parameter lists and hence the conflicts are causing the problem. Is my...
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
1302
by: nemesis.saurabh | last post by:
hi, Can we dynamically load a user control in the web form. problem i am facing is i have 2 user controls: uc1 and uc2. when my page is loading the functions and variables in the uc1 is conflicting with uc2. if possible can we have this scenario: i have both the user controls in my web form. if i want to load uc1, i can disable uc2...possible both ways.
20
2169
by: Neo Geshel | last post by:
I have been looking into Javascript libraries for the last week or two here, and there are certainly a lot of options out there. http://www.prototypejs.org/ http://mootools.net/ http://mochikit.com/ http://script.aculo.us/ And then there are even add-ons to some of these, such as:
2
5410
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...
3
2255
by: Dave Kelly | last post by:
c#, .Net 2.0, VS2008 I have a user control, and wish to embed other custom/user controls within this control. I am getting problems in compilation though, that the type or namespace cannot be found. I have used the same namespace for both components.
0
9636
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
10139
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
8961
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...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
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.