Re: Function Help Required
- From: "Anthony Jones" <Ant@xxxxxxxxxxxxxxxx>
- Date: Fri, 22 Sep 2006 10:36:33 +0100
"EA" <NOSPAM@xxxxxxxxxxxx> wrote in message
news:45129add$0$545$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ASP/VBScript - I do not recognise the syntax with the {s and }s, so Icannot
see how it is VBScript.
VBScript is running on the server as part of the ASP page. It is building
output that will be sent to the client. The output in this case is JScript
code that will be executed by the client in the browser. It seems likely
that the syntax of the final JScript is faulty. However the problem will be
with the VBScript code that generated it. Like I said in another post use
view source to take a look.
If I am mixing my languages, then the previous code did also.ListOfPlayerCodes
I have made a mistake in my question.... I should be using
which is a comma separated list, hence why I am using Split as before.The
lsit does not contain spaves I have checked this out.
Response.write gave "178,11,12,82,83,131,136,10"
I am sure it is some form of syntax problem.
Agreed. Perhaps after using view source you could post the JScript if you
are unable to determine what the problem is.
are
"Anthony Jones" <Ant@xxxxxxxxxxxxxxxx> wrote in message
news:OA4K3HW3GHA.4588@xxxxxxxxxxxxxxxxxxxxxxx
"EA" <NOSPAM@xxxxxxxxxxxx> wrote in message
news:451253bb$0$533$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
function testScore() {
MyVar = <%
MyArr = Split(Replace(Request("Played")," ",""),",")
For x=0 to ubound(MyArr)
%>(Math.round(StatsForm.DB<%=MyArr(x)%>.value)) +<%
Next
%>0
if (MyVar != <%=Score%>) {
alert('Please check your doubles, they do not equal the team score
entered! ')
}else
{
StatsForm.action='MatchSave.asp'
StatsForm.submit()
}
}
The above code is from a working page. The difference in my example is
my
page is not recieving the player's codes via an Request (line 3) they
members.coming from an array I have built on the page.
Then your question is an ASP/VBScript question. If ArrayOfPlayerCodes is
actually an array then lose the split function around it.
Also the original code appears to be eliminating spaces have you ensured
that the ArrayOfPlayerCodes has had the spaces removed form it's
Can you please explain what the difference, or where I am mixing
scripting
langauges where they were not be mixed before?
"Walter Zackery" <please_respond_to@xxxxxxxxx> wrote in message
news:%23AeWEKV3GHA.2152@xxxxxxxxxxxxxxxxxxxxxxx
You have vbscript and javascript intermingled together in a single
function - an unworkable combination.
"EA" <NOSPAM@xxxxxxxxxxxx> wrote in message
news:4511b765$0$2654$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
function TestScore() {
MyVar = <%
MyArr = Split(ArrayOfPlayerCodes)
For x=0 to ubound(MyArr)
%>(Math.round(StatsForm.DB<%=MyArr(x)%>.value)) +<%
Next
%>0
if (MyVar != <%=Score%>) {
alert('Please check your doubles, they do not equal the team score
entered! ')
}else
{
StatsForm.action='Default.asp'
StatsForm.submit()
}
}
Can anyone tell me what my error is?
.
- References:
- Function Help Required
- From: EA
- Re: Function Help Required
- From: Walter Zackery
- Re: Function Help Required
- From: EA
- Re: Function Help Required
- From: Anthony Jones
- Re: Function Help Required
- From: EA
- Function Help Required
- Prev by Date: Re: Is there a way to delete a subset (continous) of child nodes?
- Next by Date: Re: Function Help Required
- Previous by thread: Re: Function Help Required
- Next by thread: Re: Function Help Required
- Index(es):
Relevant Pages
|