You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Yinti, Deepak" <Yi...@AETNA.com> on 2003/06/13 18:50:25 UTC

Issues with Submit and Popup in Struts

Hi All,
    I have a JSP page in which has  a hyperlink , which when clicked
opens Pop-up window to display some data. There is also a Submit button
in my JSP. Now the problem I am having facing is , when I click the
hyperlink the pop-up window opens and displays data which is works fine
. After closing the pop up window , when I click my submit  button in my
JSP page , it should go to next page(which it is doing) but tries to
open a new window for me, which is should not do.

The hyperlink calls a JavaScript function which looks like :-

<a href="#" onclick="return fnCallQuoteStatusByProductPopUp();">Status
By Product</a> </td> which calls JS function 


function fnCallStatusByProductPopUp()
{
 
window.open("","_new","scrollbars=yes,width=700,height=350,left=0,top=0"
);
  document.actionForm.target="_new";
  document.actionForm.service.value="STATUS";
  document.actionForm.action.value ="statusbyproduct";
  document.actionForm.submit();
  return false;
}


And the submit button calls another JS function :-

<td><html:image onclick="return
fnCallProducerLookup()"src="images/bt_submit.gif"/></td> which is a
submit button which calls JS fucntion

function fnCallProducerLookup()
{
    
	document.actionForm.service.value="PRODUCERLOOKUP";
	document.actionForm.action.value ="producerlookupsearch";
	document.actionForm.submit();
	return false;
}

How can I rectify my problem of not opening another window when I click
the submit button
Thanks in advance
Deepak






 
This e-mail may contain confidential or privileged information.  If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Issues with Submit and Popup in Struts

Posted by James Mitchell <jm...@apache.org>.
Try setting the target in the form submission javascript to "_top".


--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
770-822-3359
AIM:jmitchtx


----- Original Message ----- 
From: "Yinti, Deepak" <Yi...@AETNA.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, June 13, 2003 12:50 PM
Subject: Issues with Submit and Popup in Struts



Hi All,
    I have a JSP page in which has  a hyperlink , which when clicked
opens Pop-up window to display some data. There is also a Submit button
in my JSP. Now the problem I am having facing is , when I click the
hyperlink the pop-up window opens and displays data which is works fine
. After closing the pop up window , when I click my submit  button in my
JSP page , it should go to next page(which it is doing) but tries to
open a new window for me, which is should not do.

The hyperlink calls a JavaScript function which looks like :-

<a href="#" onclick="return fnCallQuoteStatusByProductPopUp();">Status
By Product</a> </td> which calls JS function 


function fnCallStatusByProductPopUp()
{
 
window.open("","_new","scrollbars=yes,width=700,height=350,left=0,top=0"
);
  document.actionForm.target="_new";
  document.actionForm.service.value="STATUS";
  document.actionForm.action.value ="statusbyproduct";
  document.actionForm.submit();
  return false;
}


And the submit button calls another JS function :-

<td><html:image onclick="return
fnCallProducerLookup()"src="images/bt_submit.gif"/></td> which is a
submit button which calls JS fucntion

function fnCallProducerLookup()
{
    
document.actionForm.service.value="PRODUCERLOOKUP";
document.actionForm.action.value ="producerlookupsearch";
document.actionForm.submit();
return false;
}

How can I rectify my problem of not opening another window when I click
the submit button
Thanks in advance
Deepak






 
This e-mail may contain confidential or privileged information.  If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org