Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 20th, 2007, 10:36 AM
Friend of Wrox
Join Date: Dec 2006
Posts: 104
Thanks: 9
Thanked 1 Time in 1 Post
Default Posting asp form variables from child to parent

Firstly my apologies for bringing up a subject that has many google searches and forum entries but my as normal poor knowledge of Javascript is letting me down.

I have tried to read from the many examples and implement the " are thanks that works" code but still far from solving my issue.

For reference i am using asp pages with Javascript to do the popup bit.

What i am trying to achieve is to create a Verify popup which sends form information back to the parent page which then modifies an SQL record set.

The link to the popup page is:-

<input type=button name=choice onClick="window.open('somepage_verify.asp','popuppage','width=700,height=600');" value="Verify">
In the popup window i have some Javascript code (feel free to smile), a session variable which i want to post back to the parent page and some submit form buttons:-

<script language="javascript">
function doUpload() {

<%id = Session("id")%>

<form action="parent_page.asp" method="post" name="uploadnew" target="doUpLoadProc" onsubmit="setTimeout('self.close()',1000)">

<input type="hidden" name="id" value="<%=id%>">
<input type="submit" name="action" value="Verify">
<input type="button" value="Cancel" onClick='window.close()'>
In the Parent page i have some VB code that reads the form data and does the SQL bit which works:-

if Request.form("action")="Verify" then
      sql="select id,sqlverified from sometablename where id='" & Request.Form("id") & "'"
rsUpdateEntry.Open sql, Conn,3,3
      rsUpdateEntry.Fields("sqlverified") = sqlverifiy
What happens is the popup creates a new page which updates the SQL dataset and then closes.

From what i can understand i need to reference the Parent page but other than that a tad lost in the big world of code.

If any of you could point me in the right direction it would be much appreciated.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Submitting a parent form from a child window in IE livehed Other Programming Languages 0 February 15th, 2007 01:07 PM
Reference to parent form from child prashantha Visual Basic 2005 Basics 2 November 15th, 2006 03:54 PM
parent form from child form - urgent plz netfresher C# 1 November 8th, 2006 06:59 PM
parent child form data passing maddy137 ASP.NET 1.0 and 1.1 Basics 0 April 26th, 2006 01:00 PM
problem in posting info frm child form to parent aravwind General .NET 2 July 28th, 2004 06:04 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.