Forum Moderators: open

Message Too Old, No Replies

Browse Web Inside of a Frame

         

cpetty

11:12 am on Mar 27, 2008 (gmt 0)

10+ Year Member



I still pretty new at HTML and web development but theres one thing i want so bad but has me stumped. I want to be able to let my vistors browse the web with a frame on my website. Specifically i want the address bar in one frame and the sites opening in another. can someone please help thanks!

tedster

3:03 pm on Mar 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, cpetty.

What you are asking for is basic frames functionality, nothing fancy at all. There are excellent tutorials on the W3Schools website - the information about frames starts here: [w3schools.com...] If you run into a specific issue as you work with developing your source code, we'd be glad to help.

cpetty

9:41 pm on Mar 27, 2008 (gmt 0)

10+ Year Member



I think you might have missunderstood my question. I know how to make frames..what i need to know how to make is a working address bar. thanks

tedster

9:50 pm on Mar 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're right - I misunderstood what you meant. By address bar you mean an input where someone can type a web address and have that url load in the other frame.

What you need is a form input for the type-in area. When the form is submitted, its action attribute should be a script that changes the web location that is loaded in the other window.

cpetty

10:16 pm on Mar 27, 2008 (gmt 0)

10+ Year Member



yep thats exactly what i need. can i get you to write me one?

mikedee

2:10 pm on Mar 28, 2008 (gmt 0)

10+ Year Member



You have to also make sure to add an event handler to the frame so that when the user clicks a link the address updates.

I don't think it is as straightforward as it might sound, there may be problems with XSS protection.

Why would you want to do this anyway? Surely the user already has a working addressbar (complete with advanced security features)? Creating a frames browser is very 20th century. Some sites have framebusters which will ruin your effect as well.

cpetty

7:12 am on Mar 29, 2008 (gmt 0)

10+ Year Member



I have the frame made and the address bar made as well as the event handler, but what i need is the action for the form.....everything seems to work and post to the correct frame but i am unable to load webpages because i do not seem to have the correct action...thanks for your help in advance.

tedster

7:47 am on Mar 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's the part of your challenge that goes beyond this particular forum - it's just not a job that HTML can accomplish.

So you'll probably need some kind of server-side script, and what kind you use will depend on what your web hosting supports. We have dedicated forums here for Perl, PHP and ASP/.NET, plus a Website Technologies Forum for the rest of the alphabet soup that might come into play - although not too likely in this case.

You could possibly do this with Javascript on the client side (yet another of our forums!) but not all your visitors will have Javascript working, and there are also the cross-site scripting (XSS) concerns that mikedee mentioned as well.