cancel
Showing results for 
Search instead for 
Did you mean: 

Open iview in a popup

Former Member
0 Kudos

I created one jsp page. In this one user can enter a search term and click on the submit button, it will search in the data base and display the matching terms from the database. This will take care of one jsp page and some java programs.

Now my problem is when the user click on the submit button, I need to display the result in a popup. I tried some thing but it is not working. is there any way somebody can help me.

at last I did this way.

<hbj:button id="search"

text="Search"

onClick="onSearchButtonClicked"

onClientClick="window.open()"

Thsi will give me the result on the same screen and will open a new blank screen. I need to display the result in the new screen.

I was trying to give

onClientClick="window.open(result.jsp)" but it gives me error. result.jsp is my jsp page

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There is probably more than one way to get that accomplished but here is a simple one.

public void onSearchButtonClicked(Event event) {

myForm.setAction("");

myForm.addRawText("<script>");

myForm.addRawText("window.open('irj/servlet/prt/portal/prtroot/project.component','newwindow','resizable=yes,scrollbars=yes,toolbar=yes,location=yes,status=yes,directories=yes,menubar=yes,copyhistory=yes,width=800,height=600')");

myForm.addRawText("</script>");

}

Stephen

Answers (0)