09-17-2003 03:31 AM - edited 03-13-2019 01:38 AM
hi forum,
i have a little problem with variables! i want to push a message to the ip phone with a little vbscript:
<% @language = VBScript %>
<% Option Explicit
dim mssg
mssg = "hallo"
%>
html...
<TEXTAREA NAME="XML" Rows="5" Cols="60">
<CiscoIPPhoneExecute>
<ExecuteItem Priority="0" URL="http://192.168.251.247/ASP/CallerID/auto-push/auto_testseite4.asp?test=" & mssg & ""/>
</CiscoIPPhoneExecute>
</TEXTAREA>
html...
but the variable "& mssg &" forces error message 1, compile error! if i realize this static:
<ExecuteItem Priority="0" URL="http://192.168.251.247/ASP/CallerID/auto-push/auto_testseite4.asp?test=hallo"/>
it works fine! i think, i have a syntax-error! could anyone point me in the wright direction?
thx jochen
09-17-2003 04:22 AM
ok guys,
this will work:
... .asp?nummer=<%=ID%>"/>
note: this tag don't accept spaces!
09-17-2003 04:39 AM
next problem!
i want to transfer more than one variable! how could i accomplish this? i tried something like this:
dim ID, myname
... .asp?nummer=<%=ID%>+name=<%=myname%>
but "name" is also displayed on the phone! has anyone an idea?
09-17-2003 06:17 AM
For the first issue, as you noted its a syntax problem. In this line:
Changing the snippet
test=" & mssg & ""/>
to
test=<%=mssg %>"/>
solves the problem. The problem is that you are trying to use vbscript syntax (the & concatenation operator) in the output area (should enclose it in <% %> tags, in this case using the <%= tag since you want to output the contents of a variable)
In your second example, you are using the + symbol where you should be using the & symbol to indicate the addition of a second parameter.
In your example:
... .asp?nummer=<%=ID%>+name=<%=myname%>
try changing it to
... .asp?nummer=<%=ID%>&name=<%=myname%>
Note that you have to escape the ampersand '&' character as required by XML. Where I used the & symbol above, use the ampersand escape sequence (ampersand followed by the word amp followed by a semicolon). I can't show that here because the forum keeps interpreting it and just showing the ampersand. Just add the string amp; after the & symbol.
Hope that helps!
10-03-2003 03:56 AM
Hi !
I try a code like yours but a popup appears and my login/password don't work.
it display nothing on the phone and
"
Do you have an idea ?
Thanks
Thierry
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide