Click to See Complete Forum and Search --> : browser in webpage
skytq
05-03-2005, 10:23 PM
anyone know where to get or how to do this script?
http://bj.melawati.com/browser.gif
i have a project, need to finish soon, my client wants his website can be also used as a browser. really need help from u guys.
thanx in advance :)
grailquester5
05-03-2005, 10:34 PM
Firstly, that whole thing is a .gif, not a site or script.
That aside, the setup is frames. Top frame has a form with a user input field for the URL and the submit button is labed "GO". On the submit, the input field is passed to a script which opens the URL (probably using the javascript "window.open()" function) in the lower frame, the target of the form in the upper frame.
skytq
05-03-2005, 10:52 PM
i know it's a gif. i did tht as an example -.-"
ok, now the real problem, im a script noob. can someone help me wif the codes? really need it. thanx. :D
NogDog
05-03-2005, 11:03 PM
Sometimes, even though "the customer is always right," we need to guide clients to the really "right" direction. What is the added value of making a web site function as a browser within a browser? If I browse to that site, I'm not going to use the form to navigate to other web pages, I'm going to either choose one of my favorites/bookmarks from my browser's menu or type in a location in my browser's navigation toolbar. And on top of that, frames are now considered something that should be avoided for a number of reasons (including search engine ranking).
I realize you already have a client now with certain expectations, and it may not be feasible to redirect those expectations now; but at least for future projects, please take this advice under consideration.
skytq
05-03-2005, 11:11 PM
they're going to use this for a seminar, tht's why im willing to help. i just need the codes for the browser script. HTML i can do it myself. hope u guys dun think this as a burden.
skytq
05-04-2005, 12:09 AM
prob solved. thanx anyways noobies. ^^ do let me know if u want me to share this. it's kinda useful tho.
NogDog
05-04-2005, 01:29 AM
prob solved. thanx anyways noobies. ^^ do let me know if u want me to share this. it's kinda useful tho.
I can think of at least 2 different ways to do it: one with Javascript and one with server-side scripting (PHP for example). I was just too lazy to spend the time to figure out all the details.
In the PHP version, in the portion of the main frameset page where you define the frame for the bottom portion of the screen, you'd have something like:
<?php
# for this example, name of url input field is "url"
$frameSrc = (isset($_POST['url'])) ? $_POST['url'] : "http://www.yoursite.com/default_page.html";
echo "<frame src='$frameSrc'>\n";
?>