Array variable

W

Wen

Hallo,
I have 2 asp pages. I'd declared phoneNumbers as Array in page1, the value
of this array must be used in page2 again.
Does somebody know wat should I do?
Thanks In Advance,
Wen

<%Option Explicit%>
<html>
<head>
<title>phonebook</title>
</head>
<!-- -->
<body>
<%
Dim Name(3), PhoneNum(3), EAd(3)
Dim i, objPhone

Name(1) = "Leo"
Name(2) = "Anton"
Name(3) = "Annette"
PhoneNum(1) = "038-4989838"
PhoneNum(2) = "038-4893545"
PhoneNum(3) = "065-0080007"

EAd(1) = "(e-mail address removed)"
EAd(2) = "(e-mail address removed)"
EAd(3) = "(e-mail address removed)"

For i = 1 To 3
%>
<form action="index.asp" target="_blank">
Name: <input type="text" value="<% = Name(i)%>">
<input type ="image" name= "<% = PhoneNum(i)%>" src ="call.jpg" width
="25" length="25", alt="call">&nbsp;:
<input type="text" value="<% = PhoneNum(i)%>">
&nbsp;Email:<input type="text" value="<% = EAd(i)%>">
</form>
<%
Next
%>
</body>
</html>
----------------------------------------------------------------------------
-------------------
<html>

<head>
<!-- index.asp-->
<title>Function PlaceCall set objPhone</title>
</head>
<body>
<%
Function PlaceCall()
Dim D
D = request.form ("PhoneNum(" & i &")")
Response.write D //to test D, but it doenst work.

set objPhone =Server.createObject("mytelephone.telephone")

response.write "Calling "& D & " ...."
objPhone.PlaceCall(D)

if objPhone.IsConnected then
Response.write " The phone is connected"
else
Response.write " The phone isn't connected"
end if
Set objPhone = nothing
End function

call placeCall
%>
</body>
</html>
 
W

Wen

Hallo everyone,
Thank you for thinking about my probleem.
I've got the solution.
Best regards,
Wen
 

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
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top