Skip to Content
avatar image
Former Member

Open iview in a popup

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Feb 16, 2005 at 04:58 PM

    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

    Add comment
    10|10000 characters needed characters exceeded