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

Paaing variable in the url 1

Status
Not open for further replies.

seanbo

Programmer
Jun 6, 2003
407
GB
I have a frames page called index.htm. two of the frames in it ('left' and 'right') need to be filled with html pages specified in the url. in other words, i want to be able to use a url like this -

(i am just guessing at what this will look like)

- to get the specified pages into the correct frames. if nothing is passed, i want the frame to be blank (about:blank). what do i need to put into my index.htm to allow me to acheive this?

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
- update -

i think i'm talking about using 'GET'.

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
<FRAMESET COLS=&quot;50%,50%&quot;>
<FRAME SRC=&quot;webpage1.html&quot;>
<FRAME SRC=&quot;webpage2.html&quot;>
</FRAMESET>


Is this what you are looking for?


When in doubt, deny all terms and defnitions.
 
no. i want to set the pages by passing parameters.

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
seanbo,

I've seen a couple of questions from you on this topic. Let me go over it for you:

AFAIK you *cannot* send values from one page to another using only JavaScript! Feel free to correct me if I'm wrong...

You have to use a server side script language like PHP or ASP to pick up parameters/values.

However, if you just want one click to update more than one frame, it can be done like this:

Code:
<HTML>
<HEAD>
  <SCRIPT LANGUAGE=&quot;JavaScript&quot;>
    function update(){
      parent.f1.location.href=&quot;[URL unfurl="true"]http://www.w3schools.com/html/html_reference.asp&quot;;[/URL]
      parent.f2.location.href=&quot;[URL unfurl="true"]http://www.w3schools.com/css/css_reference.asp&quot;;[/URL]
    }
  </SCRIPT>
</HEAD>
<BODY>
  <CENTER>
    <IFRAME SRC=&quot;[URL unfurl="true"]http://www.google.com&quot;[/URL] NAME=&quot;f1&quot; WIDTH=&quot;95%&quot; HEIGHT=&quot;40%&quot;>
    </IFRAME><BR><BR>
    <IFRAME SRC=&quot;[URL unfurl="true"]http://www.filesearching.com&quot;[/URL] NAME=&quot;f2&quot; WIDTH=&quot;95%&quot; HEIGHT=&quot;40%&quot;>
    </IFRAME><BR><BR>
    <A HREF=&quot;javascript:update()&quot;>Help me!</A>
  </CENTER>
</BODY>
</HTML>

My example uses IFRAMEs, but they act the same as FRAMEs.

If this does not fulfill your needs, then post a link to a page that can do what you want to do.

Good luck §;O)


Jakob

PS. Notice the links to <- VERY useful!!
 
firts of all, you can send variables from one page to another using javascript. the website i'm building now already passes variables from one page to another to control a swf.

secondly, who said anything about javascript? i just want a way of getting a parameter using GET, then use it to set the content of a frame

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
Who said anything about javascript? I did!! -trying to provide help!

Sorry, but I can't see where you're going from here. I'll monitor this thread with great interrest to see how it turns out §;O)



Jakob
 
looks like it is. i'll get back if i encounter any further problems. ta.

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top