PDA

View Full Version : Internalized Web Browser



Shotgun Ninja
01-08-2007, 04:32 PM
Hey guys, I've been trying to make an internalized web browser, but I am dumb and I don't know how. What it is so far is basically this:



<form>
<iframe name="FreeScreen" height="100%" width="100%">
Error! Your browser doesn't support inline frames. What's up with that?</frame></p>
<p>
<input type="text" name="Browserbar" size="53">
<input type="submit" value="Go" name="Go">
<input type="button" value="Back" name="Back" action=">
<input type="button" value="Forward" name="Forward"></p>
</form>


Yeah, it's just the blank form so far, I just started making it. Any help with the scripting would be appreciated. And yes, I know pretty close to nothing about Javascript. But it's a good idea, I guess. Especially for those wishing to remain anonymous in which websites they go to, or at least keep it a bit more private.

Twey
01-08-2007, 05:54 PM
Especially for those wishing to remain anonymous in which websites they go to, or at least keep it a bit more private.Not at all. This isn't a proxy; the connection isn't routed through your server. It's still a normal connection from the client to the server, and no more anonymous than any other connection.

djr33
01-08-2007, 06:46 PM
Good thought, but what Twey says is right. If you want to play with proxies, look into PHP. I wrote a very simple script that does the same kinda thing, but does do it with a proxy, based on a get variable for the URL. (However, it doesn't display images and such, since it just gets the html text.)

Your code also has errors, like <iframe>....</frame>, a close </p> tag with no open (unless it's earlier in the page), a single quote to define the action of a button AND there is no attribute 'action' for a button, just for the form itself.

mburt
01-08-2007, 07:22 PM
Yes, Twey and djr33 are right. Use the <noframes></noframes> tag in replace of this, the tags you use aren't closed properly:


Error! Your browser doesn't support inline frames. What's up with that?</frame></p>
<p>
Should be:

<noframes>Error! Your browser doesn't support inline frames. What's up with that?</noframes>

djr33
01-08-2007, 11:54 PM
Well, doesn't need to be.

As long as he used iframe tags on both ends, the text in the middle will be displayed if the browser doesn't support iframes. The browser would ignore the contents of the tag and not know better than to display the text within. In fact, (though the same principal would work, so that could be ok too), <noframes> almost seems to rely upon the browser recognizing the tag, though, if it didn't, it would act as if there were no tag and just display text.

Shotgun Ninja
01-09-2007, 04:22 PM
Yeah, I haven't been fiddling around with web design in a while. Sorry. And I'm too lazy (and a bit Internet-deprived, I'm doing this from school) to get Dreamweaver or anything good, so I'm stuck using Frontpage. And I've never realy been that good at double-checking my code, or remembering to...

Shotgun Ninja
01-09-2007, 04:28 PM
And also, the <iframe> tag is from the FrontPage plugin, it creates an inline frame, and I'm sure you can figure out what that is.

Shotgun Ninja
01-09-2007, 04:30 PM
Wait. Here's the complete code as FrontPage wrote it (yes, I'm a noob)



<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body>

<form method="POST" name="Browser" action="--WEBBOT-SELF--" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-onSubmit>
<!--webbot bot="SaveResults" u-file="_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p>
<iframe name="FreeScreen" height="100%" width="100%">
Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></p>
<p><input type="text" name="T1" size="53">
<input type="submit" value="Go" name="Go">
<input type="button" value="Back" name="Back">
<input type="button" value="Forward" name="Forward"></p>
</form>
<p>&nbsp;</p>

</body>

jscheuer1
01-09-2007, 05:49 PM
This last looks as though it is intended for a server that supports FP extensions. I had wanted to comment earlier that trying to make a mini-browser has been worked at before. I've never seen an implementation of this that used only javascript that was satisfactory for use by the general surfing public. There have been implementations done by/for an individual to enable them to surf in a customized fashion in - say IE 6, to allow for a sort of tabbed browsing in that browser.

The problem is that while one can mimic many of the behaviors of a browser using javascript, not all of them may be faithfully reproduced.

Here is a script that accepts the limitations of this approach while delivering a high degree of utility:

http://www.dynamicdrive.com/dynamicindex3/tabdocviewer.htm

It is not a mini-browser but, has many nice features.

Twey
01-09-2007, 08:10 PM
And I'm too lazy (and a bit Internet-deprived, I'm doing this from school) to get Dreamweaver or anything good, so I'm stuck using Frontpage.You've never managed to get a text editor working? A simple text editor (Notepad, for example) will work far better than Frontpage or the WYSIWYG mode of Dreamweaver (or any WYSIWYG editor, in fact). If you're feeling fancy, you can get something a bit more advanced, like Kate (http://kate.kde.org/) (KDE) or vim (http://www.vim.org/) (just about anything; see also Cream (http://cream.sf.net/) [Windows]).

mburt
01-09-2007, 08:15 PM
In fact, with these programs, I find, everytime you switch back to the "design" mode it rewrites the code you've written instead of the way you wrote it.
eg:

<input...
might come out as

<INPUT...
Not a real big issue, but this is why I prefer notepad :)

djr33
01-09-2007, 10:19 PM
Dreamweaver isn't so bad in that sense. Then again, i usually just use the code view.

As for the code here.... it's nothing much. Yes, it's an iframe. We all know what that is.... and it displays another page.

No proxy. Nothing that would make it anonomous. The only thing it would do is give a smaller space for the window, fewer controls and not work in older browsers.

Shotgun Ninja
01-10-2007, 04:53 PM
1. If they are going to be USING the Internet, they won't HAVE any older browser than the ones that support iframes, which is after IE4. (Well, the chances of that are extremely slim.)

2. I found a script on here that uses tabs to display pages in a frame, and I switched to using that for a while. But I'm going to try to modify it so that people can enter in the URL in a browser bar on the page, and open it in the frame. Is there anything you guys could help me with pertaining to that?

3. I just use FrontPage's code view, too, and I use the Folder view to navigate. Well, I also use the Normal view to get forms the right size, but that's just an aesthetics thing.

4. Forget that I ever mentioned the word 'anonymous'. The script I found on here that I am modifying only displays the frame URL in the browser bar if a check box at the bottom is checked. But I'm not going to be doing that...

5. Notepad is good. If I knew more about Javascript and CSS (Which I actually know pretty decently, check out my MySpace if you don't believe me, it's http://www.myspace.com/inmyblacktrenchcoat), then I would use Notepad more, but I don't. And I'm lazy, and dont have much spare time.

Twey
01-10-2007, 06:04 PM
1. If they are going to be USING the Internet, they won't HAVE any older browser than the ones that support iframes, which is after IE4. (Well, the chances of that are extremely slim.)It's not just older browsers. No text-based browsers, to my knowledge, support iframes; this probably means screenreaders don't either. The <iframe> element is also not part of HTML Strict.
2. I found a script on here that uses tabs to display pages in a frame, and I switched to using that for a while. But I'm going to try to modify it so that people can enter in the URL in a browser bar on the page, and open it in the frame. Is there anything you guys could help me with pertaining to that?Just set the iframe's src property.
3. I just use FrontPage's code view, too, and I use the Folder view to navigate. Well, I also use the Normal view to get forms the right size, but that's just an aesthetics thing. Try using relative sizing instead.
4. Forget that I ever mentioned the word 'anonymous'. The script I found on here that I am modifying only displays the frame URL in the browser bar if a check box at the bottom is checked. But I'm not going to be doing that... No, it opens a new window if that checkbox is ticked.
5. Notepad is good. If I knew more about Javascript and CSS (Which I actually know pretty decently, check out my MySpace if you don't believe me, it's http://www.myspace.com/inmyblacktrenchcoat), then I would use Notepad more, but I don't. And I'm lazy, and dont have much spare time.Notepad's OK. There are better editors, though, with features like syntax highlighting, auto-tidying, &c. The thing that bugs me most about Notepad is its inability to read or write anything except ASCII with \r\n linebreaks.