On a multi-textbox form, linked to an external js, I use onBlur to call:
function chkNum(cellname) {
var str = document.getElementById(cellname).value.toString(1 0);
if (str < 28 || str > 36) {alert("Temperature entered is out of range.");
return;}
}
I enter data into the first textbox and move the cursor to the second
textbox. The function is properly called. Since textbox2 is empty, when I
move the cursor back to textbox1, I again (appropriately) get the alert.
How can I prevent this?
--
Ed Jay (remove M to respond by email) 14 2207
On 21/12/2005 22:40, Ed Jay wrote: [...] I use onBlur to call:
^^^^^^
Use the change event and validate in response to the submit event, too.
The blur event should be used sparingly. Too many things can cause a
control to lose focus, so it's kinder to the user to only bug them if
they /changed/ a value and entered an invalid value.
[snip]
Mike
--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Ed Jay said the following on 12/21/2005 5:40 PM: On a multi-textbox form, linked to an external js, I use onBlur to call:
function chkNum(cellname) { var str = document.getElementById(cellname).value.toString(1 0); if (str < 28 || str > 36) {alert("Temperature entered is out of range."); return;} }
I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this?
Set the value of the textbox within range.
<input type="text" value="28" .....>
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Lee <RE**************@cox.net> wrote: Ed Jay said: On a multi-textbox form, linked to an external js, I use onBlur to call:
function chkNum(cellname) { var str = document.getElementById(cellname).value.toString(1 0); if (str < 28 || str > 36) {alert("Temperature entered is out of range."); return;} }
I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this?
Don't audit onBlur. Use onChange, instead.
Lee, Mike, Randy...Thanks very much.
--
Ed Jay (remove M to respond by email)
Ed Jay wrote: I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this?
If you meant that you didn't want the error when the field is empty,
then of course:
var tmp = obj.value;
if (tmp != "" && (tmp <28 || tmp > 36))
alert("out of range");
I'm not sure why you're using toString() when you have the values. ??
Kev
"Kevin Darling" <kd******@basit.com> wrote: Ed Jay wrote: I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this? If you meant that you didn't want the error when the field is empty, then of course:
var tmp = obj.value;
if (tmp != "" && (tmp <28 || tmp > 36)) alert("out of range");
Thanks. I'm not sure why you're using toString() when you have the values. ??
It didn't work otherwise.
--
Ed Jay (remove M to respond by email)
Ed Jay wrote: On a multi-textbox form, linked to an external js, I use onBlur to call:
function chkNum(cellname) {
Seems you've got plenty of answers above, guess I'm a little slow but
here you go anyway...
I guess you call this something like:
<input type="text" name="textbox" onblur="chkNum('textbox');" ... >
A much better idea is to use 'this', so you call the function:
<input type="text" name="textbox" onblur="chkNum(this);" ... >
And you function statement starts:
function chkNum(cell) {
As others have said, using onblur and an alert for validation is really
annoying.
var str = document.getElementById(cellname).value.toString(1 0);
The value of an input element is always passed as a string, toString
serves no useful purpose.
var str = cell.value;
if (str < 28 || str > 36)
Even though values are passed as strings, they are type-converted to
numbers when evaluate this way so this line will work as it does now.
However, you should ensure that the values entered into the text input
were numbers in the first place. If you want to validate that they were
integers, there are plenty of examples in the archives, or use something
from here:
<URL:http://www.merlyn.demon.co.uk/js-valid.htm#Val>
... {alert("Temperature entered is out of range.");
If there is a set range, then better to let the user know:
{ alert("Temperature must be between 28 and 36 inclusive");
return;} }
I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this?
Allow no input at all, replace:
if (str < 28 || str > 36)
With:
if (str && (str < 28 || str > 36))
--
Rob
RobG <rg***@iinet.net.au> wrote: Ed Jay wrote: On a multi-textbox form, linked to an external js, I use onBlur to call:
function chkNum(cellname) { Seems you've got plenty of answers above, guess I'm a little slow but here you go anyway...
I guess you call this something like:
<input type="text" name="textbox" onblur="chkNum('textbox');" ... >
Yes. A much better idea is to use 'this', so you call the function:
<input type="text" name="textbox" onblur="chkNum(this);" ... >
And you function statement starts:
function chkNum(cell) {
Works fine, thanks. As others have said, using onblur and an alert for validation is really annoying.
Understood, but I don't want to wait until a submit to notify the user. No
offense intended to doctors, but my user is a medical doctor and if I wait
to validate until a submit, the guy will stare at the screen for days
trying to figure out which cell has the invalid entry. ;-) var str = document.getElementById(cellname).value.toString(1 0); The value of an input element is always passed as a string, toString serves no useful purpose.
var str = cell.value;
if (str < 28 || str > 36)
Even though values are passed as strings, they are type-converted to numbers when evaluate this way so this line will work as it does now.
However, you should ensure that the values entered into the text input were numbers in the first place. If you want to validate that they were integers, there are plenty of examples in the archives, or use something from here:
<URL:http://www.merlyn.demon.co.uk/js-valid.htm#Val>
Yes, I'm already filtering input to assure only digits and a single
decimal.
... {alert("Temperature entered is out of range.");
If there is a set range, then better to let the user know:
{ alert("Temperature must be between 28 and 36 inclusive");
To enter the data, the User is looking at a photo with the temperature
shown. The error _should be_ obvious. return;} }
I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this?
Allow no input at all, replace:
if (str < 28 || str > 36)
With:
if (str && (str < 28 || str > 36))
The problem with this approach is that using onChange as my event, with no
data entered, there is no change when I go to the next cell. At least when
I click on an empty cell and then move to the next cell, there's no alert.
The other issue with using onChange is that the user need only click the
cell with the invalid entry and then click to the next cell. There's no
change, so there's no function call. I guess the final validity test will
have to catch the error.
Is there a method for returning the cursor to the errant entry when the
alert is triggered?
--
Ed Jay (remove M to respond by email)
Ed Jay wrote: RobG <rg***@iinet.net.au> wrote:
Ed Jay wrote:
[...] As others have said, using onblur and an alert for validation is really annoying.
Understood, but I don't want to wait until a submit to notify the user. No offense intended to doctors, but my user is a medical doctor and if I wait to validate until a submit, the guy will stare at the screen for days trying to figure out which cell has the invalid entry. ;-)
OK, they're your users... but you could also consider having an area set
aside for messages to show alerts as text in the page.
[...] ... {alert("Temperature entered is out of range.");
If there is a set range, then better to let the user know:
{ alert("Temperature must be between 28 and 36 inclusive");
To enter the data, the User is looking at a photo with the temperature shown. The error _should be_ obvious.
But it is always good to let them know why it's out of range. Error
messages are like e-mail, very impersonal and it's easy to offend people
so they get a bad impression of your program. On the other hand, smarmy
messages make me puke - over to you :-) return;} }
I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this? Allow no input at all, replace:
if (str < 28 || str > 36)
With:
if (str && (str < 28 || str > 36))
The problem with this approach is that using onChange as my event, with no data entered, there is no change when I go to the next cell. At least when I click on an empty cell and then move to the next cell, there's no alert.
Designing a good user interface is really tough. onchange will only
fire if the input changes, so I don't think it's the right event here.
My above suggestion was intended to be used onblur - but isn't no entry
the same as an out-of-range value? So I don't think it's a valid solution.
An alternative is to validate the entire form each time, stopping at the
first invalid entry. But this won't work if they enter a value into the
second text box first, they'll get an error that the first box is out of
range. The other issue with using onChange is that the user need only click the cell with the invalid entry and then click to the next cell. There's no change, so there's no function call. I guess the final validity test will have to catch the error.
Exactly.
I think the best method is to use in-page messages for each validated
field. That way the user can see what's invalid and what isn't, then
it's up to them to fix it. Validate again on submit.
Nearly any method has sneaky work-arounds that a user can adopt to avoid
your alerts (as you've noted) or inconsistencies with how the form is
used. Coding to prevent them all makes a rigid interface that is very
frustrating to use. If you users are doctors, hopefully they have the
intelligence to understand that if they make an error they will be
warned to fix it and that ultimately it's up to them to do it. Is there a method for returning the cursor to the errant entry when the alert is triggered?
You can call the focus method after displaying the alert:
...
alert("Temperature entered is out of range.");
if (cell.focus) cell.focus();
}
If used in conjunction with onblur, this will trap the user in the field
until a valid number is entered (hence it would be nice to let them know
what the valid range is).
--
Rob
RobG <rg***@iinet.net.au> wrote: Ed Jay wrote: RobG <rg***@iinet.net.au> wrote:
Ed Jay wrote: [...] As others have said, using onblur and an alert for validation is really annoying.
Understood, but I don't want to wait until a submit to notify the user. No offense intended to doctors, but my user is a medical doctor and if I wait to validate until a submit, the guy will stare at the screen for days trying to figure out which cell has the invalid entry. ;-)
OK, they're your users... but you could also consider having an area set aside for messages to show alerts as text in the page.
Excellent idea.
[...]
... {alert("Temperature entered is out of range.");
If there is a set range, then better to let the user know:
{ alert("Temperature must be between 28 and 36 inclusive"); To enter the data, the User is looking at a photo with the temperature shown. The error _should be_ obvious.
But it is always good to let them know why it's out of range. Error messages are like e-mail, very impersonal and it's easy to offend people so they get a bad impression of your program. On the other hand, smarmy messages make me puke - over to you :-)
lol. I agree with you. alert("Look at the photo, dummy!") :-)return;} }
I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this?
Allow no input at all, replace:
if (str < 28 || str > 36)
With:
if (str && (str < 28 || str > 36))
The problem with this approach is that using onChange as my event, with no data entered, there is no change when I go to the next cell. At least when I click on an empty cell and then move to the next cell, there's no alert.
Designing a good user interface is really tough. onchange will only fire if the input changes, so I don't think it's the right event here.
My above suggestion was intended to be used onblur - but isn't no entry the same as an out-of-range value? So I don't think it's a valid solution.
An alternative is to validate the entire form each time, stopping at the first invalid entry. But this won't work if they enter a value into the second text box first, they'll get an error that the first box is out of range.
The other issue with using onChange is that the user need only click the cell with the invalid entry and then click to the next cell. There's no change, so there's no function call. I guess the final validity test will have to catch the error.
Exactly.
I think the best method is to use in-page messages for each validated field. That way the user can see what's invalid and what isn't, then it's up to them to fix it. Validate again on submit.
Nearly any method has sneaky work-arounds that a user can adopt to avoid your alerts (as you've noted) or inconsistencies with how the form is used. Coding to prevent them all makes a rigid interface that is very frustrating to use. If you users are doctors, hopefully they have the intelligence to understand that if they make an error they will be warned to fix it and that ultimately it's up to them to do it.
Is there a method for returning the cursor to the errant entry when the alert is triggered?
You can call the focus method after displaying the alert:
... alert("Temperature entered is out of range."); if (cell.focus) cell.focus(); }
If used in conjunction with onblur, this will trap the user in the field until a valid number is entered (hence it would be nice to let them know what the valid range is).
Good suggestions, all. Thanks much.
--
Ed Jay (remove M to respond by email)
RobG <rg***@iinet.net.au> wrote: Ed Jay wrote: RobG <rg***@iinet.net.au> wrote:
Ed Jay wrote: [...] As others have said, using onblur and an alert for validation is really annoying.
Understood, but I don't want to wait until a submit to notify the user. No offense intended to doctors, but my user is a medical doctor and if I wait to validate until a submit, the guy will stare at the screen for days trying to figure out which cell has the invalid entry. ;-)
OK, they're your users... but you could also consider having an area set aside for messages to show alerts as text in the page.
[...]
... {alert("Temperature entered is out of range.");
If there is a set range, then better to let the user know:
{ alert("Temperature must be between 28 and 36 inclusive"); To enter the data, the User is looking at a photo with the temperature shown. The error _should be_ obvious.
But it is always good to let them know why it's out of range. Error messages are like e-mail, very impersonal and it's easy to offend people so they get a bad impression of your program. On the other hand, smarmy messages make me puke - over to you :-)
return;} }
I enter data into the first textbox and move the cursor to the second textbox. The function is properly called. Since textbox2 is empty, when I move the cursor back to textbox1, I again (appropriately) get the alert. How can I prevent this?
Allow no input at all, replace:
if (str < 28 || str > 36)
With:
if (str && (str < 28 || str > 36))
The problem with this approach is that using onChange as my event, with no data entered, there is no change when I go to the next cell. At least when I click on an empty cell and then move to the next cell, there's no alert.
Designing a good user interface is really tough. onchange will only fire if the input changes, so I don't think it's the right event here.
My above suggestion was intended to be used onblur - but isn't no entry the same as an out-of-range value? So I don't think it's a valid solution.
An alternative is to validate the entire form each time, stopping at the first invalid entry. But this won't work if they enter a value into the second text box first, they'll get an error that the first box is out of range.
The other issue with using onChange is that the user need only click the cell with the invalid entry and then click to the next cell. There's no change, so there's no function call. I guess the final validity test will have to catch the error.
Exactly.
I think the best method is to use in-page messages for each validated field. That way the user can see what's invalid and what isn't, then it's up to them to fix it. Validate again on submit.
Nearly any method has sneaky work-arounds that a user can adopt to avoid your alerts (as you've noted) or inconsistencies with how the form is used. Coding to prevent them all makes a rigid interface that is very frustrating to use. If you users are doctors, hopefully they have the intelligence to understand that if they make an error they will be warned to fix it and that ultimately it's up to them to do it.
Is there a method for returning the cursor to the errant entry when the alert is triggered?
You can call the focus method after displaying the alert:
... alert("Temperature entered is out of range."); if (cell.focus) cell.focus(); }
If used in conjunction with onblur, this will trap the user in the field until a valid number is entered (hence it would be nice to let them know what the valid range is).
A bit of a problem with this scheme. Best illustration...goto
<http://www.edbj.aes-intl.com/jstest5.html>. Click on Box1, but enter no
data. Then, click Box2. If you have good eyes, you can observe the cursor
alternating between the two boxes while the alert remains on screen.
The code:
function chkNum(cell) {
var str = cell.value;
if (str.length == 0) {alert("Missing data");if (cell.focus)
cell.focus();return;}
if (str && (str < 28 || str > 36)) {alert("Temperature entered is out of
range.");if (cell.focus) cell.focus();return;}
if (str.length != 4) {alert("Enter temperature to one decimal place.");if
(cell.focus) cell.focus();
return;}
}
<form name="form1" action="">
Box1: <input type="text" name="box1" size=4 onkeypress="return
onlyDigits(event,'decOK')" onBlur="chkNum(this)">
<br>
Box2: <input type="text" name=box2 size=4 onkeypress="return
onlyDigits(event,'decOK')" onBlur="chkNum(this)">
<br><br>
<input type="submit" value="Submit">
</form>
Thoughts?
--
Ed Jay (remove M to respond by email)
Ed Jay wrote:
[...] A bit of a problem with this scheme. Best illustration...goto <http://www.edbj.aes-intl.com/jstest5.html>. Click on Box1, but enter no data. Then, click Box2. If you have good eyes, you can observe the cursor alternating between the two boxes while the alert remains on screen.
Depends on which browser you are using I guess. Seems to me you are
back at the beginning - firing the validation onblur does not give a
satisfactory result.
A couple of tips: trim quotes to only what is relevant and manually wrap
code at about 70 characters (75 max) to allow for a couple of re-posts
without wrapping.
Indent code using 2 or 4 spaces, non-indented code is much harder to
read, especially if random auto-wrapping has also occurred.
I would do something more like the following (with onsubmit validation too):
<head>
<title>...</title>
<style type="text/css">
.erMsg {
color: #f00;
background-color: #fff;
font-weight: bold;
white-space: nowrap;
}
</style>
</head>
<body>
<script type="text/javascript">
function chkNum(cell)
{
var str = cell.value;
var erMsg = '';
var erEl;
// Set min and max range values
var minVal = 28.0;
var maxVal = 36.0;
var erTxt = ' from ' + minVal + ' to ' + maxVal + '.';
if (!str) {
erMsg = 'Enter a value' + erTxt;
} else if ( !validNum(str) ){
erMsg = str + ' isn\'t valid, enter a value' + erTxt;
} else if ( str < minVal || str > maxVal){
erMsg = 'Out of range. Value must be' + erTxt;
}
if ( document.getElementById
&& '' != cell.name
&& (erEl = document.getElementById(cell.name + '_er'))){
erEl.innerHTML = erMsg;
} else {
alert(erMsg);
}
}
function validNum(n){
return /^\d\d(.\d)?$/.test(n);
}
</script>
<form name="form1" action="">
Box1: <input type="text" name="box1" size="4"
onBlur="chkNum(this)"><span id="box1_er"
class="erMsg"></span><br>
Box2: <input type="text" name="box2" size="4"
onBlur="chkNum(this)"><span id="box2_er"
class="erMsg"></span><br>
<input type="submit" value="Submit">
</form>
</body>
[...]
--
Rob
RobG <rg***@iinet.net.au> wrote: Ed Jay wrote: [...]
A bit of a problem with this scheme. Best illustration...goto <http://www.edbj.aes-intl.com/jstest5.html>. Click on Box1, but enter no data. Then, click Box2... ..Seems to me you are back at the beginning - firing the validation onblur does not give a satisfactory result.
I think it's appropriate to go back to using onChange instead of onBlur,
then do a js validate onSubmit and again in my server-side script. A couple of tips: trim quotes to only what is relevant and manually wrap code at about 70 characters (75 max) to allow for a couple of re-posts without wrapping.
I'm wrapping at 74 chrs. Indent code using 2 or 4 spaces, non-indented code is much harder to read, especially if random auto-wrapping has also occurred.
Sorry. I would do something more like the following (with onsubmit validation too):
<head> <title>...</title>
<style type="text/css"> .erMsg { color: #f00; background-color: #fff; font-weight: bold; white-space: nowrap; } </style>
</head> <body> <script type="text/javascript">
function chkNum(cell) { var str = cell.value; var erMsg = ''; var erEl;
// Set min and max range values var minVal = 28.0; var maxVal = 36.0; var erTxt = ' from ' + minVal + ' to ' + maxVal + '.';
if (!str) { erMsg = 'Enter a value' + erTxt; } else if ( !validNum(str) ){ erMsg = str + ' isn\'t valid, enter a value' + erTxt; } else if ( str < minVal || str > maxVal){ erMsg = 'Out of range. Value must be' + erTxt; }
if ( document.getElementById && '' != cell.name && (erEl = document.getElementById(cell.name + '_er'))){ erEl.innerHTML = erMsg; } else { alert(erMsg); } }
function validNum(n){ return /^\d\d(.\d)?$/.test(n); }
</script>
<form name="form1" action=""> Box1: <input type="text" name="box1" size="4" onBlur="chkNum(this)"><span id="box1_er" class="erMsg"></span><br> Box2: <input type="text" name="box2" size="4" onBlur="chkNum(this)"><span id="box2_er" class="erMsg"></span><br> <input type="submit" value="Submit"> </form>
I've been playing around with both innerHTML and a hidden div to print and
erase error messages. Very similar to your scheme.
Thanks for all of your help.
--
Ed Jay (remove M to respond by email)
On 22/12/2005 01:22, Ed Jay wrote: RobG <rg***@iinet.net.au> wrote:
[snip] As others have said, using onblur and an alert for validation is really annoying.
Understood, but I don't want to wait until a submit to notify the user.
Which is why the change event is used as well. It will validate values
as they are entered, and the validation triggered by submission will
catch missed fields, and those that may be still invalid but unchanged.
Trapping a user with the blur event is a usability failure. If the user
tabs through the fields (or clicks from one to the other), they
shouldn't be told every single time that need to enter a valid value.
[snip] if (str < 28 || str > 36)
Even though values are passed as strings, they are type-converted to numbers when evaluate this way so this line will work as it does now.
However, you should ensure that the values entered into the text input were numbers in the first place.
In general, yes, but it's not really necessary here. If they values
weren't numeric, they would be type-converted to NaN which, in a
RelationalExpression, evaluates to undefined and in turn to boolean false.
[snip]
The problem with this approach is that using onChange as my event, with no data entered, there is no change when I go to the next cell. At least when I click on an empty cell and then move to the next cell, there's no alert.
By design and from the user's point of view, a good thing.
The other issue with using onChange is that the user need only click the cell with the invalid entry and then click to the next cell. There's no change, so there's no function call. I guess the final validity test will have to catch the error.
If that's what the user chooses to do, then yes. But, there's every
possibility that the user skipped the field to do something else first,
and has every intention to go back and change it (which is why they
should be allowed to do that unhindered).
Is there a method for returning the cursor to the errant entry when the alert is triggered?
Yes, you can call the focus method of the INPUT element. However, if you
do that then you /must not/ use the blur event. Doing so may lead to an
infinite loop of blur events and alerts.
Mike
--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Michael Winter <m.******@blueyonder.co.uk> wrote: On 22/12/2005 01:22, Ed Jay wrote:
RobG <rg***@iinet.net.au> wrote:
[snip]
As others have said, using onblur and an alert for validation is really annoying.
Understood, but I don't want to wait until a submit to notify the user.
Which is why the change event is used as well. It will validate values as they are entered, and the validation triggered by submission will catch missed fields, and those that may be still invalid but unchanged.
Trapping a user with the blur event is a usability failure. If the user tabs through the fields (or clicks from one to the other), they shouldn't be told every single time that need to enter a valid value.
[snip]
if (str < 28 || str > 36)
Even though values are passed as strings, they are type-converted to numbers when evaluate this way so this line will work as it does now.
However, you should ensure that the values entered into the text input were numbers in the first place.
In general, yes, but it's not really necessary here. If they values weren't numeric, they would be type-converted to NaN which, in a RelationalExpression, evaluates to undefined and in turn to boolean false.
[snip]
The problem with this approach is that using onChange as my event, with no data entered, there is no change when I go to the next cell. At least when I click on an empty cell and then move to the next cell, there's no alert.
By design and from the user's point of view, a good thing.
The other issue with using onChange is that the user need only click the cell with the invalid entry and then click to the next cell. There's no change, so there's no function call. I guess the final validity test will have to catch the error.
If that's what the user chooses to do, then yes. But, there's every possibility that the user skipped the field to do something else first, and has every intention to go back and change it (which is why they should be allowed to do that unhindered).
Is there a method for returning the cursor to the errant entry when the alert is triggered?
Yes, you can call the focus method of the INPUT element. However, if you do that then you /must not/ use the blur event. Doing so may lead to an infinite loop of blur events and alerts.
Thanks, Mike. Your points are well made. After spending all night
contemplating the issue, they are also well taken.
--
Ed Jay (remove M to respond by email) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: andy johnson |
last post by:
Hi,
I'm validating an html file with this script and have this error
message from the validator:
Line 101, character 22:
<FORM NAME="DropDown">
^
Error: required attribute ACTION not...
|
by: penny336 |
last post by:
dear all,
i am using vc++ 6.0 sp5
i have a class called Address,it allocated some memory space for streetname
and city
i first define it as
Address add = new Address("Madrian","UK");
......
|
by: iam247 |
last post by:
Hi
In my prototype asp page (with no javascript and no password
validation, I have a registration form with the following action:
<form name="form" method="post" action="RegDetails.asp">
...
|
by: Charles Law |
last post by:
When I click a button I don't want the click event to fire. Is this
possible?
In fact, what I would really like is to be able to intercept the click
event, perform some action, and then prevent...
|
by: MLH |
last post by:
If I give someone a runtime app,
they can open the database
window by pressing the F-11
key. How to prevent???
|
by: Ryan Liu |
last post by:
Can someone give a sample to prevent a row from being deleted in a
datatable?
I tried e.Row.RejectChanges(); in dt_RowDeleting() but seems does not work.
I need verify if there other data...
|
by: since |
last post by:
How do I in IE prevent the onclick action from being fired when I am done dragging?
have tried "window.event.cancelBubble = true", for onmouseup , onmousedown, and onmousemove handlers. The onclick...
|
by: Stanimir Stamenkov |
last post by:
I have a form without a submit button like:
<form name="form1" action=""
onsubmit="alert('submit ' + this.name);">
<div>
<label>Field 1: <input type="text" name="field1"...
|
by: Carlos |
last post by:
Hi all,
I need to know how to prevent to repeat the operations
that happen when the submit button is clicked, when the
page is refreshed.
I noticed that if I refresh my page after the submit...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
|
by: jack2019x |
last post by:
hello, Is there code or static lib for hook swapchain present?
I wanna hook dxgi swapchain present for dx11 and dx9.
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
| |