I have a required field with a client-side validator. It works as advertised
until I try to add code to block double submits and replace the image on
the submit button to give the users some feedback. I have localized the
problem to the definition of the form.onSubmit handler.
Without my blocker, it looks like:
onsubmit="Valid atorOnSubmit(); "
Since my javascript to block the double submit and change the image should
only run if client-side validation passes, I have to insert the
ValidatorOnSubm it call before my script is invoked, then dot net adds it
again at the end. So, it looks like:
onsubmit="if (FormSubmitted == true){return
false;};Validat orOnSubmit();Bl ockDoubleSubmit (SubmitButtonID );ValidatorOnSu b
mit();"
Looks like it should work, but now the client-side validation does not take
place at all. I am out of ideas. Is there another way to get a script
function invoked only if the client-side validation passes?
Any help would be much appreciated. 5 1924
Hi Jim,
If you are disabling the submit button in your BlockDoubleSubm it() function,
it is occuring before the form submits. The disabled button will not submit
the page. You have to delay disabling this button until after the form
submission occurs.
Please see this thread for a detailed discussion on this issue. http://www.asp.net/Forums/ShowPost.a...&PostID=500836
--- Peter Blum www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"Jim Brandley" <Ji**********@I ntercim.com> wrote in message
news:OT******** ******@TK2MSFTN GP11.phx.gbl... I have a required field with a client-side validator. It works as
advertised until I try to add code to block double submits and replace the image on the submit button to give the users some feedback. I have localized the problem to the definition of the form.onSubmit handler.
Without my blocker, it looks like: onsubmit="Valid atorOnSubmit(); "
Since my javascript to block the double submit and change the image should only run if client-side validation passes, I have to insert the ValidatorOnSubm it call before my script is invoked, then dot net adds it again at the end. So, it looks like:
onsubmit="if (FormSubmitted == true){return
false;};Validat orOnSubmit();Bl ockDoubleSubmit (SubmitButtonID );ValidatorOnSu b mit();"
Looks like it should work, but now the client-side validation does not
take place at all. I am out of ideas. Is there another way to get a script function invoked only if the client-side validation passes?
Any help would be much appreciated.
Not sure if you still need help.
Try this link out; http://weblogs.asp.net/vga
particularly Intercepting form submissions and
Avoiding duplicated form submissions
I hope this helps,
Avinash
I'm not really disabling the button. It just changes "FormSubmit ted" to
true, and changes the decoration on the button.
"Peter Blum" <PL****@Blum.in fo> wrote in message
news:eJ******** ******@TK2MSFTN GP11.phx.gbl... Hi Jim,
If you are disabling the submit button in your BlockDoubleSubm it()
function, it is occuring before the form submits. The disabled button will not
submit the page. You have to delay disabling this button until after the form submission occurs.
Please see this thread for a detailed discussion on this issue. http://www.asp.net/Forums/ShowPost.a...&PostID=500836
--- Peter Blum www.PeterBlum.com Email: PL****@PeterBlu m.com Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"Jim Brandley" <Ji**********@I ntercim.com> wrote in message news:OT******** ******@TK2MSFTN GP11.phx.gbl... I have a required field with a client-side validator. It works as advertised until I try to add code to block double submits and replace the image on the submit button to give the users some feedback. I have localized the problem to the definition of the form.onSubmit handler.
Without my blocker, it looks like: onsubmit="Valid atorOnSubmit(); "
Since my javascript to block the double submit and change the image
should only run if client-side validation passes, I have to insert the ValidatorOnSubm it call before my script is invoked, then dot net adds it again at the end. So, it looks like:
onsubmit="if (FormSubmitted == true){return
false;};Validat orOnSubmit();Bl ockDoubleSubmit (SubmitButtonID );ValidatorOnSu b mit();"
Looks like it should work, but now the client-side validation does not take place at all. I am out of ideas. Is there another way to get a script function invoked only if the client-side validation passes?
Any help would be much appreciated.
Thanks - I've seen that one, but is doesn't solve my problem.
"Avinash" <av********@ure ach.com> wrote in message
news:7d******** *************** ***@posting.goo gle.com... Not sure if you still need help. Try this link out; http://weblogs.asp.net/vga particularly Intercepting form submissions and Avoiding duplicated form submissions
I hope this helps, Avinash
I just found it. The problem was allowing ValidatorOnSubm it to run twice.
After reading through WebUIValidation .js, I changed it to the following:
if (FormSubmitted == true)
{return false;};
ValidatorOnSubm it();
if (event.returnVa lue)
{BlockDoubleSub mit(SubmitButto nID);return true;}
else {return false;};
Now it works great.
"Peter Blum" <PL****@Blum.in fo> wrote in message
news:eJ******** ******@TK2MSFTN GP11.phx.gbl... Hi Jim,
If you are disabling the submit button in your BlockDoubleSubm it()
function, it is occuring before the form submits. The disabled button will not
submit the page. You have to delay disabling this button until after the form submission occurs.
Please see this thread for a detailed discussion on this issue. http://www.asp.net/Forums/ShowPost.a...&PostID=500836
--- Peter Blum www.PeterBlum.com Email: PL****@PeterBlu m.com Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"Jim Brandley" <Ji**********@I ntercim.com> wrote in message news:OT******** ******@TK2MSFTN GP11.phx.gbl... I have a required field with a client-side validator. It works as advertised until I try to add code to block double submits and replace the image on the submit button to give the users some feedback. I have localized the problem to the definition of the form.onSubmit handler.
Without my blocker, it looks like: onsubmit="Valid atorOnSubmit(); "
Since my javascript to block the double submit and change the image
should only run if client-side validation passes, I have to insert the ValidatorOnSubm it call before my script is invoked, then dot net adds it again at the end. So, it looks like:
onsubmit="if (FormSubmitted == true){return
false;};Validat orOnSubmit();Bl ockDoubleSubmit (SubmitButtonID );ValidatorOnSu b mit();"
Looks like it should work, but now the client-side validation does not take place at all. I am out of ideas. Is there another way to get a script function invoked only if the client-side validation passes?
Any help would be much appreciated.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dave |
last post by:
After following Microsofts admonition to reformat my system before doing a
final compilation of my app I got many warnings/errors upon compiling an rtf
file created in word. I used the Help Workshop program: hcw.exe that's
included with Visual Basic. This exact same file compiled perfectly with no
notes, warnings or errors prior to...
|
by: Tom |
last post by:
A question for gui application programmers. . .
I 've got some GUI programs, written in Python/wxPython, and I've got
a help button and a help menu item. Also, I've got a compiled file
made with the microsoft HTML workshop utility, lets call it
c:\path\help.chm. My question is how do you launch it from the GUI?
What logic do I put behind...
|
by: Sarir Khamsi |
last post by:
Is there a way to get help the way you get it from the Python
interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the
module cmd.Cmd? I know how to add commands and help text to cmd.Cmd
but I would also like to get the man-page-like help for classes and
functions. Does anyone know how to do that? Thanks.
Sarir
|
by: Sudheer Kareem |
last post by:
Dear All
Please tell me how to assosiate help files with my Vb.net
Project.
Regards
Sudheer
|
by: wukexin |
last post by:
Help me, good men. I find mang books that introduce bit "mang header
files",they talk too bit,in fact it is my too fool, I don't learn it, I have
do a test program, but I have no correct doing result in any way. Who can
help me, I thank you very very much.
list.cpp(main program)...
| |
by: d.warnermurray |
last post by:
I am doing a project for school that involves creating help files for a html
authoring tool.
If you could help me with answers to some questions it would really help.
1. What tasks do you expect an html authoring tool to help you accomplish?
2. What do you expect from online help for a html authoring tool?
3. What audience do you think...
|
by: tbatwork828 |
last post by:
If you were like me trying to figure out how to launch context
sensitive help topic by the context id, here is the link:
http://weblogs.asp.net/kencox/archive/2004/09/12/228349.aspx
and if link doesn't work, basically here is the article:
An Exploration Into Launching Context-Sensitive HTML Help with Topic
IDs in VB.NET
I spent this...
|
by: Steve |
last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp
My expectation is that a developer using my DLL would be able to access this help file during his development time using "F1" help within the VB IDE. Is this expectation achievable
In trying to test my help file in the IDE, I have a solution with 2 projects:...
|
by: JJ |
last post by:
Do you all use HTML help workshop to create your help system. I am finding
it quite clumsy to use. Mayeb because I am not used to using it.
Do any of you use any other techniques to create help for your progs? Whats
the current popular approach to creating help?
I am only wanting a straight help file accessible from a menu - no context...
|
by: trunxnirvana007 |
last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
'UPGRADE_WARNING: Couldn't resolve default property of object Label. Click for more:...
|
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...
| |
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. ...
|
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...
|
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...
|
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...
|
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...
|
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...
| |