Pop-up Modal Window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • magix

    Pop-up Modal Window

    Hi,

    My popup window (Modal) target is not working.

    Page1.asp
    ========
    I have javascript:

    function PopNewWin(url)
    {
    if (window.showMod alDialog) {
    window.showModa lDialog(url,"Po pupWin","dialog Width:500px;dia logHeight:150px "); } else { window.open(url ,'PopupWin','he ight=150,width= 500,toolbar=no, directories=no, status=no,menub ar=no,scrollbar s=no,resizable= no ,modal=yes'); }}and<a href="javascrip t:PopNewWin('Pa ge2.asp')">Popu p Link</a>Page2.asp==== ===i have a form with POST method displayed, of which the target window isPopupWin, which is the current one.<%if request.form("a ction")= 1 then% something here after the form post...<%else% <form action="Page2.a sp" method="post" onSubmit="retur nValidateForm(t his)" enctype="multip art/form-data" target="PopupWi n" <input type="hidden" name="action" value="1" ... ... <input type="submit" id="button1" value="Click to Submit"><%end if%>I suppose, that since the modal pop window name is PopupWin, then if in theform post , i specify the target as the same,then after submit, it should use back the same window, instead of openinganother new one, which is what happen now.How can I make it that after submit, it will use back the same window frame.Thank you.

  • magix

    #2
    Re: Pop-up Modal Window


    "magix" <magix@asia.com wrote in message
    news:47bf8f46$1 _1@news.tm.net. my...
    Hi,
    >
    My popup window (Modal) target is not working.
    >
    Page1.asp
    ========
    I have javascript:
    >
    function PopNewWin(url)
    {
    if (window.showMod alDialog) {
    window.showModa lDialog(url,"Po pupWin","dialog Width:500px;dia logHeight:150px ");
    } else {
    window.open(url ,'PopupWin','he ight=150,width= 500,toolbar=no, directories=no, status=no,menub ar=no,scrollbar s=no,resizable= no
    ,modal=yes'); }}and<a href="javascrip t:PopNewWin('Pa ge2.asp')">Popu p
    Link</a>Page2.asp==== ===i have a form with POST method displayed, of which
    the target window isPopupWin, which is the current one.<%if
    request.form("a ction")= 1 then% something here after the form
    post...<%else% <form action="Page2.a sp" method="post"
    onSubmit="retur nValidateForm(t his)" enctype="multip art/form-data"
    target="PopupWi n" <input type="hidden" name="action" value="1">
    ... ... <input type="submit" id="button1" value="Click to
    Submit"><%end if%>I suppose, that since the modal pop window name is
    PopupWin, then if in theform post , i specify the target as the same,then
    after submit, it should use back the same window, instead of
    openinganother new one, which is what happen now.How can I make it that
    after submit, it will use back the same window frame.Thank you.
    >

    ok I solved it by placing:
    <Script>window. name = "PopupWin"; </script>

    at the head of the Page2.asp


    Comment

    Working...