Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

New window (popup)

I created a JSP page for a SEARCH. once user enter something inthe input field, then it will check in the database and will display the matching information in the same window. But now I need to display the matching information in a different window like a popup.

Is there any way we can do that? Please let me know.

here is the code for the jsp page.

<%@ taglib uri="tagLib" prefix="hbj" %>

<jsp:useBean id="myBean" scope="request" class="com.flightsafety.bsd.bean.ContactSearchBean" />

<hbj:content id="myContext" >

<hbj:page title="Initial Page">

<hbj:form>

<hbj:gridLayout>

<hbj:gridLayoutCell rowIndex="1" columnIndex="1">

<!-- make sure to implement a corresponding event handling -->

<!-- method for the onClick attribute in your JSPDynPage: -->

<!-- public void onInitialButtonClicked(Event event); -->

<table>

<tr>

<td>

<hbj:label

id="lblSearchTerm"

required="FALSE"

text="Enter Subject of Interest"

design="LABEL"

labelFor="inptSearchTerm"

/>

</td>

</tr>

<tr>

<td>

<hbj:inputField

id="inptSearchTerm"

type="string"

maxlength="100"

value=""

/>

<hbj:button id="search"

text="Search"

onClick="onSearchButtonClicked"

/>

</td></tr>

</table>

**********from here I need it in a popup

<p>

<%if(myBean.isSearchResultAvailable())

{

%>

<table>

<%

java.util.Vector searchResult = (java.util.Vector) myBean.getSearchResult();

String title =myBean.getSearchString()"-- Search result ("searchResult.size()+")";

%>

<tr>

<td>

</td>

</tr>

<tr>

<td>

<hbj:textView

id="Title"

text="<%=title%>"

design="EMPHASIZED"

/>

</td>

</tr>

<%

for (int i=0; i<searchResult.size();i++)

{

com.flightsafety.bsd.bean.SearchResultBean bean = (com.flightsafety.bsd.bean.SearchResultBean)searchResult.get(i);

String name=bean.getUserName();

String employeeId="Employee Id: "+bean.getEmployeeId();

String emailAddress="Email Address: "+bean.getEmailAddress();

String phoneNo="Phone No: "+bean.getPhoneNo();

String email_send = "mailto:"+bean.getEmailAddress();

%>

<tr>

<td>

<hbj:textView

id="<%=name%>"

text="<%=name%>"

design="EMPHASIZED"

/>

</td>

</tr>

<tr>

<td>

<a href="<%=email_send%>"

<hbj:textView

id="<%=emailAddress%>"

text="<%=emailAddress%>"

design="STANDARD"

/>

</a>

</td>

</tr>

<tr>

<td>

<hbj:textView

id="<%=phoneNo%>"

text="<%=phoneNo%>"

design="STANDARD"

/>

</td>

</tr>

<%

}

%>

</table>

<%

}

%>

</hbj:gridLayoutCell>

</hbj:gridLayout>

</hbj:form>

</hbj:page>

</hbj:content>

Former Member
Not what you were looking for? View more on this topic or Ask a question