www.webdeveloper.com
Results 1 to 3 of 3

Thread: Append Form Value to URL Parameter

  1. #1
    Join Date
    Jan 2014
    Posts
    1

    Question Append Form Value to URL Parameter

    Hello All,

    This page is a popup (http://www.example.com/PopUpPage.htm) launched by http://www.example.com/Parent-Page.asp
    I want to close the popup and pass VARTOPASS to https://www.example.com/Not-The-Parent-Page.asp
    Trying to figure out how to append DOCUMENT.FORM1.VARTOPASS.VALUE into URL parameter for onClick

    Below is popup page: http://www.example.com/PopUpPage.htm

    <html><head></head><body>
    <form name="form1" method="post">
    <select name="VarToPass">
    <option value="Val1">Val1</option>
    <option value="Val2">Val2</option>
    </select>
    <input onclick="opener.location='https://www.example.com/Not-The-Parent-Page.asp?PassThis=DOCUMENT.FORM1.VARTOPASS.VALUE';self.close();" type="submit" value="Submit">
    </form>
    </body></html>

    Thank you,
    Bob P.

  2. #2
    Join Date
    Jan 2014
    Posts
    28
    Give this a try while replacing values with your own

    Code:
    <input onclick="window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" type="submit" value="Submit">
    If that doesn't work trying changing the input type to button.

  3. #3
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,111
    Here's a quick example with some comments:
    http://codepen.io/anon/pen/athFr
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles