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
- --------------------- first page (keyboard.asp) --------------------------------
- <%@ Language=JavaScript %>
- <%
- %>
- <!-- #include file="_top.asp" -->
- <%
- ////////////////////////////////////////////////
- ////////////////////////////////////////////////
- ///////
- //
- // Title: Keyboard
- // Author: dad
- // Additional Clifford chance devellopement : THIERRY DION
- // Source File(s): keyboard.asp
- //
- ////////////////////////////////////////////////
- ////////////////////////////////////////////////
- ///////
- // Description:
- //
- // Keyboard is a sample app which uses the new CiscoIPPhoneGraphicFileMenu object
- // to provide an on-screen keyboard.
- // This app will only run on the new touchscreen-enabled IP phones, like the 7970
- // and IP Communicator.
- //
- ////////////////////////////////////////////////
- ////////////////////////////////////////////////
- ///////
- // Requirements and Caveats:
- //
- // - Client: Cisco IP Phone XML browser
- //
- ////////////////////////////////////////////////
- ////////////////////////////////////////////////
- ///////
- Response.ContentType = "text/xml";
- // Expires = -1 will expire the page immediately.
- // This tells the IP phone browser to NOT stack this page on the browser history.
- // So when the user selects the Exit softkey, we go back to the menu instead of the previous JPEG
- Response.Expires = -1;
- var l = Session("l");
- if (!Session("l")) {
- l = "";
- }
- var value = String(Request.QueryString("value").Item);
- var thisPage = "http://" + Request.ServerVariables("SERVER_NAME") + Request.ServerVariables("PATH_INFO");
- var thisWebDir = thisPage.substr(0, thisPage.lastIndexOf("/")+1);
- var xmldirectoryinput = thisWebDir + "xmldirectoryinput.asp";
- var keyboardImage = thisWebDir + "\\locales" + "\\english_united_kingdom"+ "\\keyboard.png";
- if (value != "undefined") {
- if (value == "!") {
- Session("l") = "";
- l = "";
- }else {
- l = l + value;
- Session("l") = l;
- }
- }
- %>
- <CiscoIPPhoneGraphicFileMenu>
- <Title>Keyboard</Title>
- <Prompt>Last Name:<%=l%></Prompt>
- <LocationX>-1</LocationX><LocationY>-1&
- lt;/LocationY>
- <URL><%=keyboardImage%></URL>
- <MenuItem>
- <Name>A</Name>
- <URL><%=thisPage%>?value=A</URL>
- <TouchArea X1="20" Y1="25" X2="45" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>Z</Name>
- <URL><%=thisPage%>?value=Z</URL>
- <TouchArea X1="45" Y1="25" X2="70" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>E</Name>
- <URL><%=thisPage%>?value=E</URL>
- <TouchArea X1="70" Y1="25" X2="95" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>R</Name>
- <URL><%=thisPage%>?value=R</URL>
- <TouchArea X1="95" Y1="25" X2="120" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>T</Name>
- <URL><%=thisPage%>?value=T</URL>
- <TouchArea X1="120" Y1="25" X2="145" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>Y</Name>
- <URL><%=thisPage%>?value=Y</URL>
- <TouchArea X1="145" Y1="25" X2="170" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>U</Name>
- <URL><%=thisPage%>?value=U</URL>
- <TouchArea X1="170" Y1="25" X2="195" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>I</Name>
- <URL><%=thisPage%>?value=I</URL>
- <TouchArea X1="195" Y1="25" X2="220" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>O</Name>
- <URL><%=thisPage%>?value=O</URL>
- <TouchArea X1="220" Y1="25" X2="245" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>P</Name>
- <URL><%=thisPage%>?value=P</URL>
- <TouchArea X1="245" Y1="25" X2="270" Y2="50"/>
- </MenuItem>
- <MenuItem>
- <Name>Q</Name>
- <URL><%=thisPage%>?value=Q</URL>
- <TouchArea X1="30" Y1="60" X2="55" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>S</Name>
- <URL><%=thisPage%>?value=S</URL>
- <TouchArea X1="55" Y1="60" X2="80" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>D</Name>
- <URL><%=thisPage%>?value=D</URL>
- <TouchArea X1="80" Y1="60" X2="105" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>F</Name>
- <URL><%=thisPage%>?value=F</URL>
- <TouchArea X1="105" Y1="60" X2="130" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>G</Name>
- <URL><%=thisPage%>?value=G</URL>
- <TouchArea X1="130" Y1="60" X2="155" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>H</Name>
- <URL><%=thisPage%>?value=H</URL>
- <TouchArea X1="155" Y1="60" X2="180" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>J</Name>
- <URL><%=thisPage%>?value=J</URL>
- <TouchArea X1="180" Y1="60" X2="205" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>K</Name>
- <URL><%=thisPage%>?value=K</URL>
- <TouchArea X1="205" Y1="60" X2="230" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>L</Name>
- <URL><%=thisPage%>?value=L</URL>
- <TouchArea X1="230" Y1="60" X2="255" Y2="85"/>
- </MenuItem>
- <MenuItem>
- <Name>W</Name>
- <URL><%=thisPage%>?value=W</URL>
- <TouchArea X1="40" Y1="95" X2="65" Y2="120"/>
- </MenuItem>
- <MenuItem>
- <Name>X</Name>
- <URL><%=thisPage%>?value=X</URL>
- <TouchArea X1="65" Y1="95" X2="90" Y2="120"/>
- </MenuItem>
- <MenuItem>
- <Name>C</Name>
- <URL><%=thisPage%>?value=C</URL>
- <TouchArea X1="90" Y1="95" X2="115" Y2="120"/>
- </MenuItem>
- <MenuItem>
- <Name>V</Name>
- <URL><%=thisPage%>?value=V</URL>
- <TouchArea X1="115" Y1="95" X2="140" Y2="120"/>
- </MenuItem>
- <MenuItem>
- <Name>B</Name>
- <URL><%=thisPage%>?value=B</URL>
- <TouchArea X1="140" Y1="95" X2="165" Y2="120"/>
- </MenuItem>
- <MenuItem>
- <Name>N</Name>
- <URL><%=thisPage%>?value=N</URL>
- <TouchArea X1="165" Y1="95" X2="190" Y2="120"/>
- </MenuItem>
- <MenuItem>
- <Name>M</Name>
- <URL><%=thisPage%>?value=M</URL>
- <TouchArea X1="180" Y1="95" X2="205" Y2="120"/>
- </MenuItem>
- <SoftKeyItem>
- <Name>Submit</Name>
- <URL><%=xmldirectoryinput%>?value=<%
- =l%> </URL>
- <Position>1</Position>
- </SoftKeyItem>
- <SoftKeyItem>
- <Name>Clear</Name>
- <URL><%=thisPage%>?value=!</URL>
- <Position>3</Position>
- </SoftKeyItem>
- <SoftKeyItem>
- <Name>Exit</Name>
- <URL>SoftKey:Exit</URL>
- <Position>4</Position>
- </SoftKeyItem>
- </CiscoIPPhoneGraphicFileMenu>
- <%
- // THIS SAMPLE APPLICATION AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND BY CISCO,
- // EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY
- // FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, SATISFACTORY QUALITY OR ARISING FROM A COURSE
- // OF DEALING, LAW, USAGE, OR TRADE PRACTICE. CISCO TAKES NO RESPONSIBILITY REGARDING ITS USAGE IN AN
- // APPLICATION., THE APPLICATION IS PROVIDED AS AN EXAMPLE ONLY, THEREFORE CISCO DOES NOT MAKE ANY
- // REPRESENTATIONS REGARDING ITS RELIABILITY, SERVICEABILITY, OR FUNCTION. IN NO EVENT DOES CISCO
- // WARRANT THAT THE SOFTWARE IS ERROR FREE OR THAT CUSTOMER WILL BE ABLE TO OPERATE THE SOFTWARE WITHOUT
- // PROBLEMS OR INTERRUPTIONS. NOR DOES CISCO WARRANT THAT THE SOFTWARE OR ANY EQUIPMENT ON WHICH THE
- // SOFTWARE IS USED WILL BE FREE OF VULNERABILITY TO INTRUSION OR ATTACK. THIS SAMPLE APPLICATION IS
- // NOT SUPPORTED BY CISCO IN ANY MANNER. CISCO DOES NOT ASSUME ANY LIABILITY ARISING FROM THE USE OF THE
- // APPLICATION. FURTHERMORE, IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INCIDENTAL OR
- // CONSEQUENTIAL DAMAGES, LOST PROFITS, OR LOST DATA, OR ANY OTHER INDIRECT DAMAGES EVEN IF CISCO OR ITS
- // SUPPLIERS HAVE BEEN INFORMED OF THE POSSIBILITY THEREOF.
- %>
- ----------------------------- end of first page -------------------------
Expand|Select|Wrap|Line Numbers
- ------------------------------ second page (xmldirectoryinput.asp) --------------------------------
- <%@ Language=JavaScript %>
- <%
- %>
- <!-- #include file="_top.asp" -->
- <%
- function getBaseURL()
- {
- var scriptName = Request.ServerVariables("SCRIPT_NAME") ;
- var endloc = String(scriptName).lastIndexOf("/") ;
- var baseURL = "http://"+ serverName + String(scriptName).substr(0, endloc + 1) ;
- return baseURL ;
- }
- try
- {
- var name = String(Request.QueryString("Name").Item);
- var lastName = String(Request.QueryString("l").Item);
- var firstName = String(Request.QueryString("f").Item);
- var number = String(Request.QueryString("n").Item);
- if (lastName == "undefined") {lastName = "";}
- if (firstName == "undefined") {firstName = "";}
- if (number == "undefined") {number = "";}
- Response.ContentType = "text/xml";
- Response.Buffer = true;
- Response.Expires = -1;
- %>
- <CiscoIPPhoneInput>
- <Title><% = outputString( dictionary.msgPageTitle, "dictionary.msgPageTitle" ) %></Title>
- <Prompt><% = outputString( dictionary.xmldirectoryinputMsgPagePrompt, "dictionary.xmldirectoryinputMsgPagePrompt" ) %></Prompt>
- <%
- Response.Write("<URL>" + getBaseURL() + "xmldirectorylist.asp</URL>\r\n");
- Response.Write("<InputItem>\r\n");;
- %>
- <DisplayName> <% = outputString( dictionary.lblFirstName, "dictionary.lblFirstName" )%></DisplayName>
- <%
- Response.Write("<QueryStringParam>f</Qu
- eryStringParam>\r\n");
- Response.Write("<InputFlags>A</InputFla
- gs>\r\n");
- Response.Write("<DefaultValue>" + firstName + "</DefaultValue>");
- Response.Write("</InputItem>\r\n");
- Response.Write("<InputItem>\r\n");
- %>
- <DisplayName> <% = outputString( dictionary.lblLastName, "dictionary.lblLastName" ) %></DisplayName>
- <%
- Response.Write("<QueryStringParam>l</Qu
- eryStringParam>\r\n");
- Response.Write("<InputFlags>A</InputFla
- gs>\r\n");
- Response.Write("<DefaultValue>" + lastName + "</DefaultValue>");
- Response.Write("</InputItem>\r\n");
- Response.Write("<InputItem>\r\n");
- %>
- <DisplayName><% = outputString( dictionary.lblNumber, "dictionary.lblNumber" ) %></DisplayName>
- <%
- Response.Write("<QueryStringParam>n</Qu
- eryStringParam>\r\n");
- Response.Write("<InputFlags>T</InputFla
- gs>\r\n");
- Response.Write("<DefaultValue>" + number + "</DefaultValue>");
- Response.Write("</InputItem>\r\n");
- %>
- <SoftKeyItem>
- <Position>1</Position>
- <Name><%=outputString(dictionary.lblSearch
- , "dictionary.lblSearch")%></Name>
- <URL>SoftKey:Submit</URL>
- </SoftKeyItem>
- <SoftKeyItem>
- <Position>2</Position>
- <Name><%=outputString(dictionary.lblBackSp
- ace, "dictionary.lblBackSpace")%></Name>
- <URL>SoftKey:<<</URL>
- </SoftKeyItem>
- <SoftKeyItem>
- <Position>3</Position>
- <Name><%=outputString(dictionary.lblCancel
- , "dictionary.lblCancel")%></Name>
- <URL>SoftKey:Cancel</URL>
- </SoftKeyItem>
- </CiscoIPPhoneInput>
- <%
- }
- catch (err)
- {
- Response.Clear();
- Response.Write(dictionary.msgGeneralError + " ( "+ name + " )");
- Response.AppendToLog(name + ":" + err.number + ":" + err.description);
- }
- Response.Flush();
- %>
- ----------------------------- end of second page -------------------------