Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Iframes and passing data

Status
Not open for further replies.

GaryC123

Programmer
Sep 10, 2002
1,041
NO
I want to move from an HTML page to a page with an iFrame but I'm not sure how to get the data from the previous page in the iFrame
Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
I'm not quite sure I follow, I'll list some examples and you can tell me which one is closest :)
A) Page with an iframe sending data to a page inside
the iframe:
1) Data to be sent to an ASP page:
Using javascript on the parent page, change the
src of the page in the iframe to the new address
with querystring variables on it to hold the data
2) Data to be sent to already loaded page for use
in javascript:
You can create a javascript function in the child
page that accepts the data you need to send, then
reference the iframe.functionname(variables) to
call it from the top page
B) A form is submitted to a page with an iframe and you
want to be able to access that form data inside
the page with the iframe
1) First Option: Use method=Get for your form and simply
write the iframe tags with Response.Write. Set the
source and querystring for the iframe:
Code:
Response.Write &quot;<iframe src='wherever.asp?&quot;&Request.QueryString&&quot;'></iframe>&quot;
2) Second Option: Do it the hard way. The previous form
method=POST
Write the tags like the first oprion but fill the
querystring variables in by hand. This requires
either hardcoding the variables and writing the
corresponding values, or looping through the
Request collection writing name and value pairs
with &amp;'s

I hope one of these is close, if not, or you would likemore detail, please clarify for me, I am feeling a little dense tonight :)

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
With enough resources, time, and coffee, anything is possible.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top