Manish,
Find my comments below.
Manish Malhotra wrote:
Hi All,
My Requirement is:
Im creating one web application.
I have one screen say S1. There is a link on this screen which needs to
open a pop-up window.
But the form needs to be submitted to send a parameter and on the server
side we check this paramater as its 'true' or 'false'. Depends on that
It decides that pop-up has to be open or not.
The problem is not clear, if the decision has to be taken at server
side then you need to submit the page, there is not alternative to it.
If decision can be taken at client side then the parent child
window relationship can be used in JavaScript.
And my second requirement is this parent-child window relationship should be
modal view. As its in swing. So, that user can't access the parent one until
child is open. And no new child will be pop-up if one already open.
As per my understanding you need to create a modal window. I.E.
supports Modal window where as other browser doesn't. Here is a
JavaScript function which might help you out.
function ShowWindow(url,name,height,width)
{
if (window.showModalDialog) //for IE
{
window.showModalDialog(url,name,'status:no;
dialogWidth='+width+'px;dialogHeight='+height+'px')
}
else //for others
{
var windowHeight = getWindowHeight();
var windowWidth = getWindowWidth();
var top = windowHeight/2 - height/2;
var left = windowWidth/2 - width/2;
window.top.captureEvents(Event.CLICK|Event.FOCUS)
window.top.onclick=IgnoreEvents
window.top.onfocus=HandleFocus
winModalWindow =
window.open(url,name,"scrollbars=yes,toolbar=no,status=no,menubar=no,directories=no,location=no,dependent=yes,width="+width+",height="+height+",left="+left+",top="+top)
}
}
So, can you please help me out.
I need this help urgently. Actually I know something is there in DHTML for
thei modal.
But actually is it possible through JavaScript. So, that without submitting
the parent window
I can acheive this goal.
Many Thanks. Your input is required.
regards,
Manish Malhotra
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com