SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 180 | Next

Deepak Vohra

"Ajax in Oracle JDeveloper"

We shall display the search results as an ordered list.
var resultHtml=???
    ???;
    Obtain the node list of the Result elements in the Web Service
    response using the getElementsByTagName() method. Each of the
    Result elements contains a web page returned by the Web Service.
    214 10 Web Search with Ajax
    var
    resultList=xmlMessage.getElementsByTagName(???Result???);
    Iterate over the result set to construct the HTML string to update the
    web page with. We shall display the web page title, the URL to the web
    page and a summary of the web page.
    var len =resultList.length;
    for(var i=0; ivar result=resultList[i];
    var
    title=result.getElementsByTagName(???Title???)[0].first
    Child.nodeValue;
    var
    summary=result.getElementsByTagName(???Summary???)[0].f
    irstChild.nodeValue;
    var
    url=result.getElementsByTagName(???Url???)[0].firstChil
    d.nodeValue;
    resultHtml+=???
  1. Title:???+??????
    +title+ ???
  2. \n???;
    resultHtml+=???Summary: ???+summary+??????;
    }
    resultHtml+=???
???;
Set the value of the searchResults
as the string
constructed from the Web Service response.
searchResults.innerHTML=resultHtml;
The complete input.jsp is listed below.
Transitional//EN???
???http://www.w3.org/TR/html4/loose.dtd???>
<%@ page contentType=???text/html;charset=windows-
1252???%>


content=???text/html; charset=windows-1252???/>
input