Click to See Complete Forum and Search --> : passing variables into an iframe


fogofogo
02-14-2007, 10:25 AM
Hello all,

I'm not sure if this is even possible, but i'm trying to pass some variables, that have been taken from the parent page's querystring, and pass the variables into an iframe that has loaded into the parent page.

Is this possible?

Thanks

russell
02-14-2007, 11:00 AM
easiest way is to have the parent page pass it as querystring to the iframe. there are other methods as well, but thats easiest.

Dim myVar
myVar = Request.QueryString("myVar")

Response.Write "<iframe src=""myPage.asp?myVar=" & myVar & """></iframe>" & vbCrLf

fogofogo
02-14-2007, 11:12 AM
Thanks Russell, I'm sorry, I should also have mentioned, i don't have access to the parent file :confused:

russell
02-14-2007, 11:13 AM
if both files live on the same domain, u can use javascript to parse the parent url (parent.location)