Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

CiscoIPPhoneExecute: transfer variable, syntax error?

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

4 REPLIES
New Member

Re: CiscoIPPhoneExecute: transfer variable, syntax error?

ok guys,

this will work:

... .asp?nummer=<%=ID%>"/>

note: this tag don't accept spaces!

New Member

Re: CiscoIPPhoneExecute: transfer variable, syntax error?

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?

Silver

Re: CiscoIPPhoneExecute: transfer variable, syntax error?

For the first issue, as you noted its a syntax problem. In this line:

http://192.168.251.247/ASP/CallerID/auto-push/auto_testseite4.asp?test=" & mssg & ""/>

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!

New Member

Re: CiscoIPPhoneExecute: transfer variable, syntax error?

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

" " in Internet Explorer.

Do you have an idea ?

Thanks

Thierry

259
Views
0
Helpful
4
Replies