Hi,
I have an aspx page that includes both search and insert screen ,
When I click the the insert button ,if required fields are blank then the
validation.js throws an error, but when I click the search button ,
validation throws error again,
how can I prevent from this problem
I mean when I click the search button,validati on must return true ,because
search elements and insert elements are in the same form..
<form id="Form5" onsubmit="retur n checkForm(this) ;" name="form2" action=""
method="post"
</form>
Best Regards...
UGURCENG 2 1205
If you are saying you want validation to fire when one button is clicked but
not the other, move the checkForm() call to the button's client-Side click
event.
someButton.Attr ibutes.Add("onC lick", "return
checkForm(docum ent.getElementB yId('form5'));" );
or something...
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
"ugurceng" <ug**@argeset.c om> wrote in message
news:e0******** ******@TK2MSFTN GP12.phx.gbl... Hi,
I have an aspx page that includes both search and insert screen , When I click the the insert button ,if required fields are blank then the validation.js throws an error, but when I click the search button , validation throws error again, how can I prevent from this problem I mean when I click the search button,validati on must return true ,because search elements and insert elements are in the same form.. <form id="Form5" onsubmit="retur n checkForm(this) ;" name="form2" action="" method="post"
</form>
Best Regards...
UGURCENG
Thank you very much....
UGURCENG
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>,
haber iletisinde þunlarý yazdý:el******* *******@TK2MSFT NGP12.phx.gbl.. . If you are saying you want validation to fire when one button is clicked but not the other, move the checkForm() call to the button's client-Side click event.
someButton.Attr ibutes.Add("onC lick", "return checkForm(docum ent.getElementB yId('form5'));" );
or something...
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX! "ugurceng" <ug**@argeset.c om> wrote in message news:e0******** ******@TK2MSFTN GP12.phx.gbl... Hi,
I have an aspx page that includes both search and insert screen , When I click the the insert button ,if required fields are blank then the validation.js throws an error, but when I click the search button , validation throws error again, how can I prevent from this problem I mean when I click the search button,validati on must return true ,because search elements and insert elements are in the same form.. <form id="Form5" onsubmit="retur n checkForm(this) ;" name="form2" action="" method="post"
</form>
Best Regards...
UGURCENG
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Coleen |
last post by:
Please see threads on "Dumb question about Message boxes" - I went to the
specified link - this works great if all you want to do is display a message
box before any of your script behind the aspx.vb runs or on the click event,
but if you are actually trying to validate user selections, such as when an
item from a drop-down is selected, I get an error if I put it in this code:
<asp:dropdownlist id="ddl_year" runat="server" Width="40%"...
|
by: EviL KerneL |
last post by:
Hi -
I am trying to figure out a way to enforce the validation included for
this form based on whether the user chooses "email" or "phone" as the
contact choice. Right now it is set to enforce validation on both.
Is there a way to link the drop-down choice to the correspondent
validation section while disabling validation for the other one?
here's what I presently have:
|
by: Tim Meagher |
last post by:
I am trying to use both validation controls and to add submit button
attributes, but when I add the button attributes, the javascript fpr the
validation controls is no longer created for the page. How can I use both?
Thank you,
Tim Meagher
|
by: Hosh |
last post by:
I have a form on a webpage and want to use JavaScript validation for the
form fields.
I have searched the web for form validation scripts and have come up with
scripts that only validate individual fields, such as an "Email Validation
Script" or a "Phone Validation Script".
Is it ok to put all these scripts on page as they are or should they be
joined in some way together to be one script?
I'm a total JavaScript newbie and am completely...
|
by: |
last post by:
Hello Guys,
I am using the validation controls to validate my data.
But the problem is "The page is still being posted to
server".
I want to get rid of the round trips to server. Are there
any get arounds for this problem apart from the
traditional JavaScript?
| |
by: Matt |
last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or
Client-Side form validation? Since I think each validator control can select
either 1) JavaScript based error dialog or 2) show the error message next to
the control. For example, if the text field is empty with RequiredField
Validator control, it can show the value in ControlToValidate property in
two ways as I mentioned.
Please advise. Thanks!
|
by: Martyn Fewtrell |
last post by:
Dear All
I have a Windows 2003 Server with IIS6 where the validation controls on
ASP.Net pages no longer work.
I believe it to be specific to the server as if I create an ASP.Net page on
the IIS Server of my Workstation (Win XP) with a text box, button and
required field validator, this works fine. If I create the same page on the
IIS6 Windows 2003 Server the validation control doesn't stop the post. I've
tried different browsers and...
|
by: Kyle |
last post by:
On my Development System, all the page validation controls work fine
(WinXP Pro + SP2, VS.NET 2003, .NET v1.1.4322).
On the Production System, none of the page validation controls are
working (Windows 2000 Server + SP4, .NET v1.1.4322).
If one of the client machines access my Development system, everything
works as it should, so this isn't a client-side or browser issue (IE 6 +
updates).
|
by: APA |
last post by:
Well, I've figured out a way around this mess. I have no idea why it doesn't work the way I think it should but I do know how to get it to work. The
scenario is that I have a form that has one submit button on it. I want a client side validation function to run before submit. I have a server side
event handler on the button that executes the necessary server side code. Sounds simple. Well, the problem is that once you put client side...
|
by: Peter Afonin |
last post by:
Hello,
I'm creating an application in ASP.NET 1.1. I need to check whether at least
one checkbox in my datagrid has been checked. To do this, I'm using
Javascript - I'm adding this code to Page_Load event:
Dim iCount As Int32
Dim sClientSideValidate As New StringBuilder
iCount = dgReport.Items.Count
For i As Int32 = 2 To iCount + 1
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |