2 Replies - 745 Views - Last Post: 06 December 2009 - 12:57 PM

#1 MrGravity  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-December 09

How do you target a frame in your address bar?

Posted 06 December 2009 - 11:01 AM

First of all, thanks for looking at my post. Here's what I'm trying to do, I'll explain it as simple as possible.

Say I have a webpage, http://www.site.com
And say on that webpage is an -iframe- called "fullFrame"
By default, fullFrame contains http://www.google.com

So to recap, when you go to www.site.com, a frame is there by default that has www.google.com in it. Cool?

My question is this: using your address bar in your browser, what link can you type to override that frame's source when you get to the page?

So far, I have built this link, but it doesn't work:
http://www.site.com/...//www.yahoo.com

Theoretically, that link should open www.site.com normally, but when it gets there, instead of the -iframe-opening www.google.com, it will override that and open www.yahoo.com instead.

Phew. Any ideas? I've looked all over the internet for this and can't find it.

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: How do you target a frame in your address bar?

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4444
  • View blog
  • Posts: 12,318
  • Joined: 18-April 07

Re: How do you target a frame in your address bar?

Posted 06 December 2009 - 12:22 PM

Well you can't override it unless you have access to the code of the page itself. If it is your page, you can code the page to accept the parameter (if it is present) and use it as the source of the iframe. You could do this using a server side language like PHP or ASP or you could use a javascript solution. But if it is not your page which you can control, you can't simply pass it a URL, using the frame name, and get it to load that instead of the intended page the designer has.

If it is your page, then let us know the language you are using and we can certainly help you code up something that will accept URL parameters to load the iframe with.

:)
Was This Post Helpful? 0
  • +
  • -

#3 MrGravity  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-December 09

Re: How do you target a frame in your address bar?

Posted 06 December 2009 - 12:57 PM

Thanks everyone, but I was able to get the answer here:
http://answers.yahoo...i...AAkMmEf&r=w
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1