hi,
i have one textbox and one save button, i have added attribute at page
load event
btnSave.Attribu tes.Add("onclic k","return ValidateForm(); ");
in validationform( ) ,I have written like this
if(--some validation function here--)
{
----------------
return false;
--------------
}
if(window.confi rm ('Are you sure to Save ?'))
return true;
else
return false;
at .aspx page i am writing
<asp:textbox id="txtCompAdj " Runat="server"
onblur="cspForm at(this,30,8,'' );return false;"></asp:textbox>
now the problem i am facing that suppose cspFormat returns false(means
some error) then in that case i am getting the prompt "Are you sure to
Save ?"
i.e. the execution sequence is when we press enter key
1) validateForm()
2) cspformat(----)
if i press the button by mouse then the execution sequence is just
reverse which is perfectly write and dont provide "Are you sure to Save
?" prompt if there is any error(return false) in cspformat(---)
so what should i do to get the proper execution sequence at enter press
event as i get at mouse pree event 3 2302
raj,
Is there a reason you aren't using the built in validators?
If you use the validation objects .NET has given you and still attach your
confirmation then the confirmation "Are you sure to save?" would pop first
and then the validators would take care of everything else for you.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"raj" <Ra***********@ gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. . hi, i have one textbox and one save button, i have added attribute at page load event
btnSave.Attribu tes.Add("onclic k","return ValidateForm(); ");
in validationform( ) ,I have written like this
if(--some validation function here--) { ---------------- return false; -------------- }
if(window.confi rm ('Are you sure to Save ?')) return true; else return false;
at .aspx page i am writing
<asp:textbox id="txtCompAdj " Runat="server" onblur="cspForm at(this,30,8,'' );return false;"></asp:textbox>
now the problem i am facing that suppose cspFormat returns false(means some error) then in that case i am getting the prompt "Are you sure to Save ?"
i.e. the execution sequence is when we press enter key 1) validateForm() 2) cspformat(----)
if i press the button by mouse then the execution sequence is just reverse which is perfectly write and dont provide "Are you sure to Save ?" prompt if there is any error(return false) in cspformat(---)
so what should i do to get the proper execution sequence at enter press event as i get at mouse pree event
you should also hookup your validation code to the onsubmit event and cancel
if error
<script>
document.forms[0]onsubmit = new function {
return ValidateForm();
}
</script>
-- bruce (sqlwork.com)
"raj" <Ra***********@ gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. . hi, i have one textbox and one save button, i have added attribute at page load event
btnSave.Attribu tes.Add("onclic k","return ValidateForm(); ");
in validationform( ) ,I have written like this
if(--some validation function here--) { ---------------- return false; -------------- }
if(window.confi rm ('Are you sure to Save ?')) return true; else return false;
at .aspx page i am writing
<asp:textbox id="txtCompAdj " Runat="server" onblur="cspForm at(this,30,8,'' );return false;"></asp:textbox>
now the problem i am facing that suppose cspFormat returns false(means some error) then in that case i am getting the prompt "Are you sure to Save ?"
i.e. the execution sequence is when we press enter key 1) validateForm() 2) cspformat(----)
if i press the button by mouse then the execution sequence is just reverse which is perfectly write and dont provide "Are you sure to Save ?" prompt if there is any error(return false) in cspformat(---)
so what should i do to get the proper execution sequence at enter press event as i get at mouse pree event
hi bruce,
i put ValidationForm( ) at onsubmit event but still its following the
same sequence ,that problem still persist, This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: msnews.microsoft.com |
last post by:
Hello!
I'm Jim
by asp
How can show "abc" in textbox when click one botton?
|
by: Paul Kaufman |
last post by:
What do I add to the style sheet to do this? Thanks.
-Paul, the CSS Newbie
|
by: Charles Shao |
last post by:
How to chang bgcolor of row when mouse selected a row?
I have a HTML table in the page. I hope to change <tr.bgcolor> when user
clicks on a column, just like user has selected this row.
How can I do that ?
Thanks
Charles Shao:-)
|
by: nikou_70 |
last post by:
I have a page with image, image has some image map, I want to submit form when user mouseover that image map, my code is like this:
<img src="Images/floor4.jpg"usemap="#planetmap" id="IMG1">
<map id="planetmap" name="planetmap">
<area id=f4 shape="circle" coords="65, 93, 11" alt="CF4588" onmouseover=overf4()>
And I write sub overf4() in vb script
|
by: VBLearner |
last post by:
How to close the parent and all child forms together at once when click
on parent window's close button X?
| |
by: nickwang |
last post by:
Hi, does any javascript framework can implement image popup tip when
mouse hover an object?
Mootool has a text popup tips. Is it easy to inherit it and create a
popup tip with images or other html code?
|
by: abhilash12 |
last post by:
pls help me
when mouse move on the cell how can identify cell border using javascript
|
by: kimiraikkonen |
last post by:
Hi,
I couldn't find a necessary class which shows when mouse hovers on a
link in Webbrowser control.
Think of there's a status bar(text), when mouse comes on a link, the
URL must be shown in this status bar.
How can i do this?
Thanks.
|
by: tweakmy |
last post by:
Hi to all expert, ladies coders and gentlemen coders,
I m quite newbie in this. I just started vb.net not long ago..because i was too crazy bout making an application for my own phone. as for now, i m using .net compact framework to code for my wm6.
My program is easy. the purpose is to edit a .ini file by pointing the correct program path for each line .in the ini file.
in my program, a treeview is enabled. By selecting on the treenode, this...
|
by: sonysunny |
last post by:
How can we display a box (like tool tip, bigger than tool tip box and can be customised) when mouse is placed over an image and disappear wen mouse removed from that image. Using javascript.
thanks in advance
|
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...
| |
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: 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...
|
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: 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...
|
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...
| |