Can anyone tell me why I am getting the following VBScript runtime error
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'fVALIDATEEMAIL '
/JAVASCRIPT/VALIDATEEMAIL.a sp, line 31
Here is the code snippet that calls the fVALIDATEEMAIL function.
Here is Line 31 answer=fVALIDAT EEMAIL("dd*@sss .com") .
The complete snippet is shown below
<%
dim email
dim answer
if Request.Queryst ring("isSubmitt ed") = "yes" then
email=request.q uerystring("EMA ILADDRESS")
response.write( "this is your email address " + "'" + email + "'")
answer=fVALIDAT EEMAIL("dd*@sss .com")
end if
%>
The actual function is part of an external .JS file. All the other functions
work fine.
function fVALIDATEEMAIL( "a")
{
fVALIDATEEMAIL= "yes"
end function
} 8 5908
RICHARD BROMBERG said the following on 6/23/2007 1:14 PM:
>
Can anyone tell me why I am getting the following VBScript runtime error
If you can tell anybody what VBScript has to do with Javascript.
The actual function is part of an external .JS file. All the other
functions work fine.
What makes you think that VBScript is going to execute in a Javascript File?
function fVALIDATEEMAIL( "a")
{
fVALIDATEEMAIL= "yes"
end function
}
"end function" is invalid JS and as such will throw an error.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Randy
I removed the "end function" but the error persists.
Is it necessary for either the function (or the Dim statement which defines
the arguement to be passes ) to define a data type ?
dick
"Randy Webb" <Hi************ @aol.comwrote in message
news:xP******** ************@te lcove.net...
RICHARD BROMBERG said the following on 6/23/2007 1:14 PM:
>> Can anyone tell me why I am getting the following VBScript runtime error
If you can tell anybody what VBScript has to do with Javascript.
>The actual function is part of an external .JS file. All the other functions work fine.
What makes you think that VBScript is going to execute in a Javascript
File?
>function fVALIDATEEMAIL( "a") { fVALIDATEEMAIL ="yes" end function }
"end function" is invalid JS and as such will throw an error.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
RICHARD BROMBERG said:
> Randy
I removed the "end function" but the error persists.
Is it necessary for either the function (or the Dim statement which defines the arguement to be passes ) to define a data type ?
When replying to a post in this newsgroup, please put your
new text *after* the text you're responding to.
Are you writing VBScript or Javascript?
There is no Dim statement in Javascript.
You should check the resources mentioned in this newsgroup's
FAQ for tutorials or books from which you might learn some
basic Javascript syntax.
The only two lines of:
>>function fVALIDATEEMAIL( "a") { fVALIDATEEMAI L="yes" end function }
that are reasonable Javascript are the lines that contain only
curly braces.
One valid way to write a function named fVALIDATEEMAIL that
returns the string "yes" would be:
function fVALIDATEEMAIL( )
{
return "yes";
}
--
RICHARD BROMBERG said the following on 6/23/2007 5:36 PM:
Randy
Please here top-post don't , upon frowned is it.
I removed the "end function" but the error persists.
Is it necessary for either the function (or the Dim statement which
defines the arguement to be passes ) to define a data type ?
Why do you think VBScript is going to execute in a JScript block? It
won't. Try removing the VBScript entirely and see if your error
persists. If it does, then post a URL to a sample page that shows the
code and error. My first sentence is a reference to your top posting and
was done intentionally.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
What is topposting?
I am kind of new at this, so please excuse the fact that some of my
questions sound naive
I am using JavaScript in an htm..
"Randy Webb" <Hi************ @aol.comwrote in message
news:rc******** ************@te lcove.net...
RICHARD BROMBERG said the following on 6/23/2007 5:36 PM:
>Randy
Please here top-post don't , upon frowned is it.
>I removed the "end function" but the error persists.
Is it necessary for either the function (or the Dim statement which defines the arguement to be passes ) to define a data type ?
Why do you think VBScript is going to execute in a JScript block? It
won't. Try removing the VBScript entirely and see if your error persists.
If it does, then post a URL to a sample page that shows the code and
error. My first sentence is a reference to your top posting and was done
intentionally.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Perhaps I should have been a little clearer .
I am trying to pass a string to the function and inside the function test
the string and return "yes" or "no" depending on the passed string.
"Lee" <RE************ **@cox.netwrote in message
news:f5******** *@drn.newsguy.c om...
RICHARD BROMBERG said:
>> Randy
I removed the "end function" but the error persists.
Is it necessary for either the function (or the Dim statement which defines the arguement to be passes ) to define a data type ?
When replying to a post in this newsgroup, please put your
new text *after* the text you're responding to.
Are you writing VBScript or Javascript?
There is no Dim statement in Javascript.
You should check the resources mentioned in this newsgroup's
FAQ for tutorials or books from which you might learn some
basic Javascript syntax.
The only two lines of:
>>>function fVALIDATEEMAIL( "a") { fVALIDATEEMA IL="yes" end function }
that are reasonable Javascript are the lines that contain only
curly braces.
One valid way to write a function named fVALIDATEEMAIL that
returns the string "yes" would be:
function fVALIDATEEMAIL( )
{
return "yes";
}
--
RICHARD BROMBERG said:
> Perhaps I should have been a little clearer .
I am trying to pass a string to the function and inside the function test the string and return "yes" or "no" depending on the passed string.
Top-posting is when you insist on typing your new text at the
beginning of the message, instead of after the text you're quoting.
And, again, you should learn the basics of Javascript before you
start trying to guess how to write functions.
function yesOrNo(str) {
if ( str == "something" ) {
return "yes";
} else {
return "no";
}
}
You do understand the difference between "yes" and true, don't you?
--
RICHARD BROMBERG wrote:
"Randy Webb" <Hi************ @aol.comwrote in message
news:rc******** ************@te lcove.net...
>RICHARD BROMBERG said the following on 6/23/2007 5:36 PM:
>>Randy
Please here top-post don't , upon frowned is it.
>>I removed the "end function" but the error persists.
Is it necessary for either the function (or the Dim statement which defines the arguement to be passes ) to define a data type ?
Why do you think VBScript is going to execute in a JScript block? It won't. Try removing the VBScript entirely and see if your error persists. If it does, then post a URL to a sample page that shows the code and error. My first sentence is a reference to your top posting and was done intentionally.
<snipped Randy's signature too>
What is topposting?
I am kind of new at this, so please excuse the fact that some of my
questions sound naive
You don't quote signatures, and you bottom-post (as opposed to top-posting).
See how I pasted your response to the *bottom*? Then I respond under
that? It enables everyone to read from the top, down. Instead of
bottom to the top, or back and forth like most idiots do.
I am using JavaScript in an htm..
Um, you need to reread all of Randy's posts.
--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Arun Wadhawan |
last post by:
Hello
MY SQL Server is causing me this problem :
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'ident'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I am getting from the table datingnew the value of the ident field.
|
by: LJgrnl |
last post by:
I've got a type mismatch error that's driving me nutty. Variable blnNoData
has the initial value False. If a recordset comes back empty (both .EOF and
..BOF are true) then blnNoData is set to True. I then have an if statement to
determine what to write to the screen depending on blnNoData. As long as the
if statement is true (doesn't have to go to the else clause), the code runs
fine. Otherwise, a type mismatch error is returned. In...
|
by: Mike |
last post by:
I am getting a type mismatch error when I do a bulk insert.
---Begin Error Msg---
Server: Msg 4864, Level 16, State 1, Line 1
Bulk insert data conversion error (type mismatch) for row 1, column 14
(STDCOST).
---End Error Msg---
The STDCOST is set to decimal (28,14) and is a formatted in Access as a
number, single with 14 decimal. I don't know why I would be getting a Type
|
by: news.paradise.net.nz |
last post by:
I have been developing access databases for over 5 years.
I have a large database and I have struck this problem with it before
but can find nothing in help or online. Access 2000
I have a query that will run fine without any criteria but as soon as I
add any criteria it gives a "Data type mismatch" error.
As soon as I remove any criteria it runs perfectly.
I know this query is based on another query but I have other processes
based on...
|
by: amitbadgi |
last post by:
I am getting teh following error while converting an asp application to
asp.net,
Exception Details: System.Runtime.InteropServices.COMException: Type
mismatch.
Source Error:
Line 347: 'response.Write(sql2)
| |
by: Brett |
last post by:
I have a form that calls a method within a DLL. By clicking a button on the
form, the DLL is instantiated and the SaveOutlookMessage() method invoked.
The DLL code copies messages from Outlook to an HTML file. When I execute
the EXE, which is only the form, and click the button, I get a "Type
Mismatch" error on this line in the form: mailobj.SaveOutlookMessage()
Any suggestions on why I'm getting the type mismatch error?
--Form code
|
by: Howard Kaikow |
last post by:
I'm doing a VB 6 project in which I am trying to protect against type
mismatch errors.
Is the process any different in VB .NET?
Here's what I'm doing in VB 6.
I have an ActiveX DLL.
The class has stuff initialized by calling a sub SetClass that wants some
Word specific objects passed-in.
If the user mistakingly uses the wrong object, say, uses an Excel object
|
by: jodyblau |
last post by:
I have a database which works fine until I create and MDE file. Once I
create the MDE, when I open a particular form I get a "Type Mismatch"
error.
Because its an MDE file, I can't step through the code to find out
where the error is occuring; and (as I mentioned earlier) when I go
back to the oriignal database the problem doesn't exist.
Any ideas of what is going on here and how to fix it?
Thanks,
|
by: zz12 |
last post by:
Hello, is there a setting in IIS 5.0 that would quickly fix the following
error?:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
It's strange because some of our .asp pages were working fine for the past
years but recently our website was updated in that old folders were renamed
and the new ones took on the existing name and was wondering why some our
..asp pages are now returning this error? I would think that since the code
|
by: nckinfutz |
last post by:
hello, I am having a problem with an access database. this is not my database and I did not create it, nor am I very good at access. however, I am a network engineer and that is why this problem has ended up in my lap i guess.
This is the issue: There is an access database that pulls data from a list of excel spread sheets. This access database and excel files are stored on a server. When the database requests info from the excel file...
|
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: 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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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: 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...
| |