By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,035 Members | 623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,035 IT Pros & Developers. It's quick & easy.

Cisco IP PHONE SERVICE

terryble
P: 1
hy, We are deploying IPPhone cisco(R)
On this phone proprietary code exist with XML too.
After code modification, a can't find the final step for this service to work. I need to post the variable named "l" on the next page.
This variable is the Last name reference to search a name on a corporate directory.

here are the 2 pages of code

first it's a keyboard like html clickable picture it refere coordinates to zone from the TouchArea tag
then at the bottom a softkey button menu where submit is with the necessary parameter to pass to the next page, from the SoftKeyItem tag.

the seconde page is the corporate search with three fields
first name variable "f"
last name variable"l"
number variable "n"
this page is working fine. because followed the field filled the result is seen.

So I'm searching how to put the keyboard variable into the lastname field of the second page.

Expand|Select|Wrap|Line Numbers
  1. --------------------- first page (keyboard.asp) --------------------------------
  2. <%@ Language=JavaScript %>
  3. <%
  4.  
  5. %>
  6. <!-- #include file="_top.asp" -->
  7. <%
  8.  
  9. ////////////////////////////////////////////////
  10. ////////////////////////////////////////////////
  11. ///////
  12. //
  13. // Title: Keyboard
  14. // Author: dad
  15. // Additional Clifford chance devellopement : THIERRY DION
  16. // Source File(s): keyboard.asp
  17. //
  18. ////////////////////////////////////////////////
  19. ////////////////////////////////////////////////
  20. ///////
  21. // Description:
  22. //
  23. // Keyboard is a sample app which uses the new CiscoIPPhoneGraphicFileMenu object
  24. // to provide an on-screen keyboard.
  25. // This app will only run on the new touchscreen-enabled IP phones, like the 7970
  26. // and IP Communicator.
  27. //
  28. ////////////////////////////////////////////////
  29. ////////////////////////////////////////////////
  30. ///////
  31. // Requirements and Caveats:
  32. //
  33. // - Client: Cisco IP Phone XML browser
  34. //
  35. ////////////////////////////////////////////////
  36. ////////////////////////////////////////////////
  37. ///////
  38.  
  39. Response.ContentType = "text/xml";
  40.  
  41. // Expires = -1 will expire the page immediately.
  42. // This tells the IP phone browser to NOT stack this page on the browser history.
  43. // So when the user selects the Exit softkey, we go back to the menu instead of the previous JPEG
  44.  
  45. Response.Expires = -1;
  46.  
  47. var l = Session("l");
  48. if (!Session("l")) {
  49.    l = "";
  50. }
  51.  
  52. var value = String(Request.QueryString("value").Item);
  53. var thisPage = "http://" + Request.ServerVariables("SERVER_NAME") + Request.ServerVariables("PATH_INFO");
  54. var thisWebDir = thisPage.substr(0, thisPage.lastIndexOf("/")+1);
  55. var xmldirectoryinput = thisWebDir + "xmldirectoryinput.asp";
  56. var keyboardImage = thisWebDir + "\\locales" + "\\english_united_kingdom"+ "\\keyboard.png";
  57.  
  58. if (value != "undefined") { 
  59.   if (value == "!") { 
  60.     Session("l") = ""; 
  61.     l = ""; 
  62.   }else { 
  63.     l = l + value; 
  64.     Session("l") = l; 
  65.   } 
  66.  
  67. %>
  68.  
  69. <CiscoIPPhoneGraphicFileMenu>
  70. <Title>Keyboard</Title>
  71. <Prompt>Last Name:<%=l%></Prompt>
  72. <LocationX>-1</LocationX><LocationY>-1&
  73. lt;/LocationY>
  74. <URL><%=keyboardImage%></URL>
  75. <MenuItem>
  76. <Name>A</Name>
  77. <URL><%=thisPage%>?value=A</URL>
  78. <TouchArea X1="20" Y1="25" X2="45" Y2="50"/>
  79. </MenuItem>
  80. <MenuItem>
  81. <Name>Z</Name>
  82. <URL><%=thisPage%>?value=Z</URL>
  83. <TouchArea X1="45" Y1="25" X2="70" Y2="50"/>
  84. </MenuItem>
  85. <MenuItem>
  86. <Name>E</Name>
  87. <URL><%=thisPage%>?value=E</URL>
  88. <TouchArea X1="70" Y1="25" X2="95" Y2="50"/>
  89. </MenuItem>
  90. <MenuItem>
  91. <Name>R</Name>
  92. <URL><%=thisPage%>?value=R</URL>
  93. <TouchArea X1="95" Y1="25" X2="120" Y2="50"/>
  94. </MenuItem>
  95. <MenuItem>
  96. <Name>T</Name>
  97. <URL><%=thisPage%>?value=T</URL>
  98. <TouchArea X1="120" Y1="25" X2="145" Y2="50"/>
  99. </MenuItem>
  100. <MenuItem>
  101. <Name>Y</Name>
  102. <URL><%=thisPage%>?value=Y</URL>
  103. <TouchArea X1="145" Y1="25" X2="170" Y2="50"/>
  104. </MenuItem>
  105. <MenuItem>
  106. <Name>U</Name>
  107. <URL><%=thisPage%>?value=U</URL>
  108. <TouchArea X1="170" Y1="25" X2="195" Y2="50"/>
  109. </MenuItem>
  110. <MenuItem>
  111. <Name>I</Name>
  112. <URL><%=thisPage%>?value=I</URL>
  113. <TouchArea X1="195" Y1="25" X2="220" Y2="50"/>
  114. </MenuItem>
  115. <MenuItem>
  116. <Name>O</Name>
  117. <URL><%=thisPage%>?value=O</URL>
  118. <TouchArea X1="220" Y1="25" X2="245" Y2="50"/>
  119. </MenuItem>
  120. <MenuItem>
  121. <Name>P</Name>
  122. <URL><%=thisPage%>?value=P</URL>
  123. <TouchArea X1="245" Y1="25" X2="270" Y2="50"/>
  124. </MenuItem>
  125. <MenuItem>
  126. <Name>Q</Name>
  127. <URL><%=thisPage%>?value=Q</URL>
  128. <TouchArea X1="30" Y1="60" X2="55" Y2="85"/>
  129. </MenuItem>
  130. <MenuItem>
  131. <Name>S</Name>
  132. <URL><%=thisPage%>?value=S</URL>
  133. <TouchArea X1="55" Y1="60" X2="80" Y2="85"/>
  134. </MenuItem>
  135. <MenuItem>
  136. <Name>D</Name>
  137. <URL><%=thisPage%>?value=D</URL>
  138. <TouchArea X1="80" Y1="60" X2="105" Y2="85"/>
  139. </MenuItem>
  140. <MenuItem>
  141. <Name>F</Name>
  142. <URL><%=thisPage%>?value=F</URL>
  143. <TouchArea X1="105" Y1="60" X2="130" Y2="85"/>
  144. </MenuItem>
  145. <MenuItem>
  146. <Name>G</Name>
  147. <URL><%=thisPage%>?value=G</URL>
  148. <TouchArea X1="130" Y1="60" X2="155" Y2="85"/>
  149. </MenuItem>
  150. <MenuItem>
  151. <Name>H</Name>
  152. <URL><%=thisPage%>?value=H</URL>
  153. <TouchArea X1="155" Y1="60" X2="180" Y2="85"/>
  154. </MenuItem>
  155. <MenuItem>
  156. <Name>J</Name>
  157. <URL><%=thisPage%>?value=J</URL>
  158. <TouchArea X1="180" Y1="60" X2="205" Y2="85"/>
  159. </MenuItem>
  160. <MenuItem>
  161. <Name>K</Name>
  162. <URL><%=thisPage%>?value=K</URL>
  163. <TouchArea X1="205" Y1="60" X2="230" Y2="85"/>
  164. </MenuItem>
  165. <MenuItem>
  166. <Name>L</Name>
  167. <URL><%=thisPage%>?value=L</URL>
  168. <TouchArea X1="230" Y1="60" X2="255" Y2="85"/>
  169. </MenuItem>
  170. <MenuItem>
  171. <Name>W</Name>
  172. <URL><%=thisPage%>?value=W</URL>
  173. <TouchArea X1="40" Y1="95" X2="65" Y2="120"/>
  174. </MenuItem>
  175. <MenuItem>
  176. <Name>X</Name>
  177. <URL><%=thisPage%>?value=X</URL>
  178. <TouchArea X1="65" Y1="95" X2="90" Y2="120"/>
  179. </MenuItem>
  180. <MenuItem>
  181. <Name>C</Name>
  182. <URL><%=thisPage%>?value=C</URL>
  183. <TouchArea X1="90" Y1="95" X2="115" Y2="120"/>
  184. </MenuItem>
  185. <MenuItem>
  186. <Name>V</Name>
  187. <URL><%=thisPage%>?value=V</URL>
  188. <TouchArea X1="115" Y1="95" X2="140" Y2="120"/>
  189. </MenuItem>
  190. <MenuItem>
  191. <Name>B</Name>
  192. <URL><%=thisPage%>?value=B</URL>
  193. <TouchArea X1="140" Y1="95" X2="165" Y2="120"/>
  194. </MenuItem>
  195. <MenuItem>
  196. <Name>N</Name>
  197. <URL><%=thisPage%>?value=N</URL>
  198. <TouchArea X1="165" Y1="95" X2="190" Y2="120"/>
  199. </MenuItem>
  200. <MenuItem>
  201. <Name>M</Name>
  202. <URL><%=thisPage%>?value=M</URL>
  203. <TouchArea X1="180" Y1="95" X2="205" Y2="120"/>
  204. </MenuItem>
  205.  
  206. <SoftKeyItem> 
  207.    <Name>Submit</Name> 
  208.    <URL><%=xmldirectoryinput%>?value=<%
  209. =l%> </URL> 
  210.    <Position>1</Position> 
  211. </SoftKeyItem> 
  212.  
  213. <SoftKeyItem> 
  214.    <Name>Clear</Name> 
  215.    <URL><%=thisPage%>?value=!</URL> 
  216.    <Position>3</Position> 
  217. </SoftKeyItem> 
  218.  
  219. <SoftKeyItem> 
  220.    <Name>Exit</Name> 
  221.    <URL>SoftKey:Exit</URL> 
  222.    <Position>4</Position> 
  223. </SoftKeyItem> 
  224.  
  225. </CiscoIPPhoneGraphicFileMenu>
  226.  
  227. <%
  228. // THIS SAMPLE APPLICATION AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND BY CISCO, 
  229. // EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY
  230. // FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, SATISFACTORY QUALITY OR ARISING FROM A COURSE
  231. // OF DEALING, LAW, USAGE, OR TRADE PRACTICE.  CISCO TAKES NO RESPONSIBILITY REGARDING ITS USAGE IN AN
  232. // APPLICATION., THE APPLICATION IS PROVIDED AS AN EXAMPLE ONLY, THEREFORE CISCO DOES NOT MAKE ANY
  233. // REPRESENTATIONS REGARDING ITS RELIABILITY, SERVICEABILITY, OR FUNCTION.  IN NO EVENT DOES CISCO
  234. // WARRANT THAT THE SOFTWARE IS ERROR FREE OR THAT CUSTOMER WILL BE ABLE TO OPERATE THE SOFTWARE WITHOUT
  235. // PROBLEMS OR INTERRUPTIONS. NOR DOES CISCO WARRANT THAT THE SOFTWARE OR ANY EQUIPMENT ON WHICH THE
  236. // SOFTWARE IS USED WILL BE FREE OF VULNERABILITY TO INTRUSION OR ATTACK. THIS SAMPLE APPLICATION IS
  237. // NOT SUPPORTED BY CISCO IN ANY MANNER. CISCO DOES NOT ASSUME ANY LIABILITY ARISING FROM THE USE OF THE
  238. // APPLICATION. FURTHERMORE, IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INCIDENTAL OR
  239. // CONSEQUENTIAL DAMAGES, LOST PROFITS, OR LOST DATA, OR ANY OTHER INDIRECT DAMAGES EVEN IF CISCO OR ITS
  240. // SUPPLIERS HAVE BEEN INFORMED OF THE POSSIBILITY THEREOF.
  241. %>
  242. ----------------------------- end of first page -------------------------
Expand|Select|Wrap|Line Numbers
  1. ------------------------------ second page (xmldirectoryinput.asp) --------------------------------
  2. <%@ Language=JavaScript %>
  3. <%
  4.  
  5. %>
  6. <!-- #include file="_top.asp" -->
  7. <%
  8.  
  9. function getBaseURL()
  10. {
  11.    var scriptName = Request.ServerVariables("SCRIPT_NAME") ;
  12.    var endloc = String(scriptName).lastIndexOf("/") ;
  13.    var baseURL = "http://"+ serverName + String(scriptName).substr(0, endloc + 1) ;
  14.    return baseURL ;
  15. }
  16.  
  17. try
  18. {
  19.   var name = String(Request.QueryString("Name").Item);
  20.    var lastName = String(Request.QueryString("l").Item);
  21.    var firstName = String(Request.QueryString("f").Item);
  22.    var number = String(Request.QueryString("n").Item);
  23.    if (lastName == "undefined") {lastName = "";}
  24.    if (firstName == "undefined") {firstName = "";}
  25.    if (number == "undefined") {number = "";}
  26.  
  27.    Response.ContentType = "text/xml";
  28.    Response.Buffer = true;
  29.    Response.Expires = -1;
  30.  
  31.    %>
  32.    <CiscoIPPhoneInput>
  33.    <Title><% = outputString( dictionary.msgPageTitle, "dictionary.msgPageTitle" ) %></Title>
  34.    <Prompt><% = outputString( dictionary.xmldirectoryinputMsgPagePrompt, "dictionary.xmldirectoryinputMsgPagePrompt" ) %></Prompt>
  35.    <%
  36.    Response.Write("<URL>" + getBaseURL() + "xmldirectorylist.asp</URL>\r\n");
  37.  
  38.    Response.Write("<InputItem>\r\n");;
  39.    %>
  40.    <DisplayName> <% = outputString( dictionary.lblFirstName, "dictionary.lblFirstName" )%></DisplayName>
  41.    <%
  42.    Response.Write("<QueryStringParam>f</Qu
  43. eryStringParam>\r\n");
  44.    Response.Write("<InputFlags>A</InputFla
  45. gs>\r\n");
  46.    Response.Write("<DefaultValue>" + firstName + "</DefaultValue>");
  47.    Response.Write("</InputItem>\r\n");
  48.  
  49.    Response.Write("<InputItem>\r\n");
  50.    %>
  51.    <DisplayName> <% = outputString( dictionary.lblLastName, "dictionary.lblLastName" ) %></DisplayName>
  52.    <%
  53.    Response.Write("<QueryStringParam>l</Qu
  54. eryStringParam>\r\n");
  55.    Response.Write("<InputFlags>A</InputFla
  56. gs>\r\n");
  57.    Response.Write("<DefaultValue>" + lastName + "</DefaultValue>");
  58.    Response.Write("</InputItem>\r\n");
  59.  
  60.    Response.Write("<InputItem>\r\n"); 
  61.    %>
  62.    <DisplayName><% = outputString( dictionary.lblNumber, "dictionary.lblNumber" ) %></DisplayName>
  63.    <%
  64.    Response.Write("<QueryStringParam>n</Qu
  65. eryStringParam>\r\n");
  66.    Response.Write("<InputFlags>T</InputFla
  67. gs>\r\n");
  68.    Response.Write("<DefaultValue>" + number + "</DefaultValue>");
  69.    Response.Write("</InputItem>\r\n");
  70.    %>
  71.    <SoftKeyItem>
  72.     <Position>1</Position>
  73.     <Name><%=outputString(dictionary.lblSearch
  74. , "dictionary.lblSearch")%></Name>
  75.     <URL>SoftKey:Submit</URL>
  76.    </SoftKeyItem>
  77.    <SoftKeyItem>
  78.     <Position>2</Position>
  79.     <Name><%=outputString(dictionary.lblBackSp
  80. ace, "dictionary.lblBackSpace")%></Name>
  81.     <URL>SoftKey:&lt;&lt;</URL>
  82.    </SoftKeyItem>
  83.    <SoftKeyItem>
  84.     <Position>3</Position>
  85.     <Name><%=outputString(dictionary.lblCancel
  86. , "dictionary.lblCancel")%></Name>
  87.     <URL>SoftKey:Cancel</URL>
  88.    </SoftKeyItem>
  89.    </CiscoIPPhoneInput>
  90.    <%
  91. }
  92. catch (err)
  93. {
  94.    Response.Clear();
  95.     Response.Write(dictionary.msgGeneralError + " ( "+ name + " )");
  96.     Response.AppendToLog(name + ":" + err.number + ":" + err.description);
  97. }
  98.  
  99. Response.Flush();
  100.  
  101. %>
  102. ----------------------------- end of second page -------------------------
Dec 11 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.