-
December 9th, 2008, 04:29 PM
#1
how to invoke popup window from scriptlets?
Hi ,
I faced one problem with opening popup window after submission. I have 4-5 fields in a form. once i filled those fields and click on submit button i need to open a popup window with filled data. but it's not opening like that way. it's opening on the same window. i used the following code with 3 ways but it's not working. please give me reply on this.
Code:
// out.println( " <a href=\"#\" onClick=\"JavaScript:window.open('ozLOVQuoteSimple.jsp?ac=TMPL&id='+_req.getInt( 'templateId', 1 ) );\"></a>");
// out.println( org.oz.common.ui.html.HtmlFwd.renderFwdHtmlAndReloadeOpener( _ahsPage, "ozLOVQuoteSimple.jsp?ac=TMPL&id="+_req.getInt( "templateId", 1 ) ) );
out.println( " <a href=\"ozLOVQuoteSimple.jsp?ac=TMPL&id="+_req.getInt( "templateId", 1 )+"\"></a>");
thanks in advance...
-
December 10th, 2008, 08:34 AM
#2
Re: how to invoke popup window from scriptlets?
This really isn't the right place for this sort of stuff. But in the following line there is nothing after the > and before the </a>. So, what is the user supposed to click on in order to be taken to this link?
<a href=\"ozLOVQuoteSimple.jsp?ac=TMPL&id="+_req.getInt( "templateId", 1 )+"\"></a>
The way you are trying to do it will write out a link on the site that is clickable, not redirect or open up a new page.
Try something like:
<a href="javascript:window.open('urlhere','NameOfWindow',Option1,Option2);"></a>
The Options are things like width='3' or whatever options you want (that are valid).
That being said, I don't believe that is the right way to do it either (by doing an out.println). You probably should be doing something like:
Code:
<input type="submit" name="submitButton" value="Review" style="width: 100px;" onClick='window.open(...)'/>
Last edited by ProgramThis; December 10th, 2008 at 08:40 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|