473,569 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error in script - testing if a field has a non character

2 New Member
I am creating a script that may check if a field has a non character and if yes it may appears an error message after I move to the next field.

When I use this script in PL/SQL (...v_enabled|| ' onBlur ="chkString(thi s)"')
I receive the error: runtime error, object expected.
Can you tell me why this error is happening, please?

geralp.p('<scri pt language="JavaS cript">
function chkstring(p_cam po)
{
var value = (p_campo.value) .toUppercase();
var letras = ''AÁÀÃÂÄBCÇDEÉÈ ÊËFGHIÍÌÎÏJKLMN OÓÒÔÖPQRSTUÚÙÛÜ VWXYÝZ '';

for(i=0;i<value .length;i++)
{
var carct=value.cha rAt(i);

if(letras.index Of(carct)==-1)
{
alert(''teste: ''+carct);
p_campo.value=" ";
p_campo.focus() ;
return false;
}

}

return true;
}
</script>
'
);



Thanks,
Denize
May 18 '07 #1
3 1345
acoder
16,027 Recognized Expert Moderator MVP
By non-character, you mean anything besides the characters in the 'letras' string?
May 21 '07 #2
Denize
2 New Member
Exactly. I have a field in a form that can accept only the characters in the string letras.

Thanks in advance,
Denize


By non-character, you mean anything besides the characters in the 'letras' string?
May 22 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
Then you should use regular expressions - see link.
May 22 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5020
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I double-checked the path to my error log. It is in /var/www/logs/php_error_log Thanks. :) -Wayne Stevenson
1
3740
by: AA Arens | last post by:
To have the first character of a fiels capitalized AfterUppdate, I used the following script: Me!City = UCase$(Left$(Me!City, 1)) + Mid$(Me!City, 2) UCase (Left(Me!City, 1)) + Mid(Me!City, 2) It works and also when I do not fill anything by ignoring this field when I jump from one field to antoher with the TAB button. I only get a...
18
7317
by: William | last post by:
I have the following javascript function that updates a scroll_list and sends the updated entry (with its index) to a server script ( i.e. http://mkmxg00/cgi/confirmUpload.pl ) for further processing: function saveText( scroll_list, t_area, listToBeUpdated ) { scroll_list.options.text = t_area.text; scroll_list.options.value= t_area.value;...
39
13390
by: eruanion | last post by:
Hi, I've been working on this for a while now and I can't seem to find out what is wrong with my code. I have 2 files one c3common.js which only contains javascript functions for my main html page and my main html page which is test.html. They are of course part of a much bigger system of files but i have tracked down the problem to that...
1
1780
by: Eric | last post by:
When I run my script it gives error on the following line: strEmail = Right(strEmail, (Len(strEmail) - 1)) I enclose my code and the sample text file too Thanks, ----------------------------------------------------------------------------- Option Compare Database Option Explicit Private Sub Command26_Click()
1
3422
by: jamesdylangoldstein | last post by:
So I tried to do my father a favor and convert his advertisements to .flv and place them on his website. With Flash being $600, I found an open-source .flv player and configured it. So today he called and stated it isn't working with IE. The script: <script type="text/javascript" src="http://www.fivestarsuzuki.com/...
13
4721
by: problem. | last post by:
#include <stdio.h> #include <stdlib.h> int main(void) { int a, b; float result = 0.0f; char symbol = '\0'; int loop = 0;
14
44794
by: kigoobe | last post by:
Well guys, I have tested a script that's working well in FF, however while testing with IE7, I am finding errors. That famous yellow warning icon at the left of our status bar. Basically, I am opening a new popup window using dhtmlgoodies modal message tool. It opens well in FF, however in IE, the yellow icon appears with a bunch of erros as...
4
3734
by: Chronictank | last post by:
Hi, as a bit of background (and seeing as it is my first post :)) i am a complete newbie at perl. I literally picked it up a week ago to do this project as it seemed like the best choice for a language to connect to a SQL database in a Unix envirment as well as script parsing so there is more than likely a ton of things i could have done a better...
0
7695
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...
0
7922
Oralloy
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. ...
0
8119
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...
1
7668
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...
0
6281
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...
1
5509
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...
0
3653
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...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.