Function call not working, please help!

C

Chris Michael

Hello everybody,

Newbie here. I've been working on this for the last two days and I can't
figure out where this problem is. I think it's something so obvious, but I
can't see it!

OK, firstly in a very simple page (please see
www.intomobiles.com/test3.htm - it just displays the code that i use in an
asp page) I call a function "processForm". The actual form is described in
an asp page and is SSI linked to the page (for the full function script
please see www.intomobiles.com/test1.htm - again, this is just a htm page
with the asp code in it so that you can view it). Well, this works fine, the
function is called and executed without a problem.

The problem is when I put the function into this page (please see
www.intomobiles.com/test.htm - search the page for "processForm") it doesn't
get called, it get's totally skipped over, not producing an error. I don't
see why it will work on one page but not the other, it's exactly the same!
(Isn't it?)

Many thanks,
 
R

Ray Costanzo [MVP]

Hi Chris,

Are you sure that the block of code with that call to the function is being
executed? The overall structure of the code you're displaying in test.htm
is something like this. I wound up with an extra End If at the end, but if
you're not getting a compilation error for that, I probably just
accidentally deleted an If somewhere. But, the point of displaying the
layout like this is to show that, well, if this were a lottery, the chances
of your function being called would be like 1 in a million. So, I suggest
you put in some Respose.Write "I'm at location A", Response.Write "I'm at
location B" throughout your code to see the flow of execution.

If not bodyNode is Nothing Then
If not commandNode is Nothing Then
If commandNode.baseName = "MessageReceived" Then
For i = 0 To commandNode.childNodes.length - 1
Select Case commandNode.childNodes(i).baseName
Case "id"
Case "originator", "sender"
Case "recipient"
Case "body"
Case "sentat"
Case "receivedat"
End Select
Next

if left(Eoriginator,2) = "44" then uknumber = "0" &
right(Eoriginator,len(Eoriginator)-2) end if

If instr(lcase(Ebody),"stop") <> 0 Then
end if

If instr(lcase(Ebody),"start") <> 0 Then
end if

If instr(lcase(Ebody),"password") <> 0 Then
end if

select case procedure
case "1"
If not RS.EOF Then
If RS(0) Then
End If
End If
case "2"
If RS.EOF Then
Else
If RS(0) = "1" Then
pass = rs(1)
'****************** THE BELOW FUNCTION DOESN'T WORK!!! ************
call processForm("EX0002469","447800140892",Eoriginator,"Your
password is " & pass & ". Go to www.INTOmobiles.com now and start
downloading. Thank you for using INTOmobiles. To unsubscribe send INTO STOP
to 60066. £1.5/wk","Text")
Else ' result is -1
end if
end if
case else
end select


if err.number<>0 then
end if

if Len(doc.xml)=0 then
end if


if list.length>0 then
end if


if err.number<>0 then
end if



ElseIf commandNode.baseName = "MessageEvent" Then

For i = 0 To commandNode.childNodes.length - 1
Select Case commandNode.childNodes(i).baseName
Case "id"
Case "eventtype"
Case "occurredat"

End Select
Next

ElseIf commandNode.baseName = "MessageError" Then

For i = 0 To commandNode.childNodes.length - 1
Select Case commandNode.childNodes(i).baseName
Case "id"
Case "errortype"
Case "occurredat"
Case "detail"
End Select
Next
Else

End if
End If
End If
End If
 
C

Chris Michael

Hello Ray,

Thanks for the reply, I'll have a check through the code again but I don't
think there was an extra End If.

I've tried entering some code to check the execution flow and it works, for
example, I put a checker just before the function call to make sure that it
actually got to that point of the code, and another one straight after the
function call, and both of them worked, meaning that the function was
called.

Many thanks,
--
Chris Michael
www.INTOmobiles.com
Download 100s of ringtones, wallpapers & logos every month for only £1.50
per week
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top