Skip to main content
Inspiring
March 26, 2007
Question

want to use a popup

  • March 26, 2007
  • 3 replies
  • 329 views
I have a form and i pass the value of the form from an hidden value which is required on the next page,

I want that when i click the submit button, The page should load as an popup window and display the result over there.

Example:

I have a form like this:

so this i need to do, when the user click the submit button, instead of opening the page, it should open the popup window with the relevant info. how tis can be achieved..

    This topic has been closed for replies.

    3 replies

    March 26, 2007
    I was looking through my own codes and found this one. Put this one in the head tags.

    <script type="text/JavaScript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    }
    //-->
    </script>


    This one you add to the submit button:

    onClick="MM_openBrWindow('the_page_you_want_to_link_to','','status=yes,scrollbars=yes,resizable=yes,width=410,height=560')"

    Try using this without the CFIF tag.

    Sorry for changing my original suggestion, but if this doesn't work the cfif tag will for sure.
    March 26, 2007
    First give your vote button a name. Then inclose it in a <cfif>.
    For example....

    <cfif IsDefined "button_vote">

    Insert script here

    <cfelse>

    <form action="process_quickpoll.cfm" method="post" name="Poll">

    <cfoutput query="Question" group="QuestionID">
    <input type="hidden" name="QuestionID" value="#QuestionID#">
    </cfoutput>
    <input type="submit" name="button_vote" value="Vote">
    </form>

    </cfif>

    You can make the popup window here:

    http://www.dynamicdrive.com/dynamicindex8/popwin.htm
    gavy81Author
    Inspiring
    March 26, 2007
    quote:

    Originally posted by: K0rrupt
    First give your vote button a name. Then inclose it in a <cfif>.
    For example....

    <cfif IsDefined "button_vote">

    Insert script here

    <cfelse>

    <form action="process_quickpoll.cfm" method="post" name="Poll">

    <cfoutput query="Question" group="QuestionID">
    <input type="hidden" name="QuestionID" value="#QuestionID#">
    </cfoutput>
    <input type="submit" name="button_vote" value="Vote">
    </form>

    </cfif>

    You can make the popup window here:

    http://www.dynamicdrive.com/dynamicindex8/popwin.htm



    Thanks but what i should enter in the after <cfif tag>

    insert code here

    should i use <cflocation tag> for this or what..
    Inspiring
    March 26, 2007
    The first thing I would try is target = "_blank"