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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querystrings inside frames

Status
Not open for further replies.

colzboppo

Programmer
Sep 20, 2001
9
GB
I have a cute little page that Pulls stories from a DB, and well, its uses a querystring to pull certain ID numbered records from the DB. I didn't use the POST method, as I wanted to be able to link to the news page with a specific story in mind. Well, I can only pass a query string to just the page, is there any way to pass it THROUGH the frameset?
 
what i understand is that now you pass something like : url?var1=val1&var2=val2 to your page, and you'd like it to work when url is a frameset - right ?

- if you pass it from an inside frame (say frameset is only 2 frames named frame1 and frame2), to pass it from frame1 to frame2 simply do :
top.frame2.location=url?var1=val1&var2=val2
or : <a href=&quot;url?var1=val1&var2=val2&quot; target=frame2> ... </a>

- if you pass it from a non framed page to the frameset and want a frame to receive it :
either use server side code to actually build the frame src (the best solution to me)
or build a javascript function to retrieve passed params, and dynamically build the frameset source. To retrieve passed params : faq216-343 and to build the frameset source, just document.write
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top