If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

errrr I'm trying to...

OK, I've been at this for a while now and I've been Googling so much that I've seen the first four or five pages of search results for a number of different search terms. My eyes are now turning square and frankly it's time for me to ask for help please!

What I want to do is to write a plain text file containing a websites URL. Then I want to be able to load the site mentioned in the text file in a new tab using my non default browser (Firefox). The problem is that I am using FRAMES and I'm punching above my weight.

Plain text is plain text. You can’t do anything with it in a browser except display it as and where it is.
I’m not completely getting what you are trying to do yet. Do you want to click the URL in the text file to load a new page or is the new page supposed to open as soon as the text file is loaded in the browser?

Plain text is plain text. You can’t do anything with it in a browser except display it as and where it is.
I’m not completely getting what you are trying to do yet. Do you want to click the URL in the text file to load a new page or is the new page supposed to open as soon as the text file is loaded in the browser?

Thanks for replying Stephan, this idea is for part of my local intranet.

Basically I'm trying to put a banner in the top frame and have the bottom frame work as normal. However I want the users to have the ability to change their homepage easily and simply without having to edit any of the webscript.

Top frame (approx 100 pixels high) - Centered company intranet banner, I'm using hotspots on the banner image to link to other important pages.

Main frame - Displaying the users homepage, in this frame they are free to browse the net.

The hardship that I am trying to overcome is having a local text file (or something similiar) containing the users home page, so that each user can have their own homepage and it is easy to edit their individual homepages from machine to machine. They cannot edit their own homepage url as I have disabled it from Internet Options using Internet Explorer.

Of couse if somebody has a better way of doing all of this then I am willing to change how I've gone about doing this!

A web page with frames is actually made up of several pages put together into one. This page for example is made of three pages: One for the top, another for the main section, and a third one which brings them together.
You can see that this page has two frames, the top frame containing the page with the title, and the bottom frame containing the page with the sidebar and main content. Webpages within the frames are written just like any other html file but the page which brings them together has it's own set of html tags. Here's how the code looks for this page:

Notice that the html file starts out just like any other web page except there are no body tags. In their place are the opening and closing frameset tags.

The rows attribute in the frameset tag makes horizontal frames, vertical frames are made with the cols attribute. The numbers determine how much of the web page the frames will take up, in the example the top frame takes 25% and the second frame 75% of space. The percentages need to be distributed so that they add up to 100% and notice they are enclosed in quotation marks. Each percentage is separated by a comma.

Next come the frame tags, they are single tags so they have a slash at the end. The src attribute is telling the browser which web page is to display in the frame by default (when the visitor arrives on the web page). In the example the first frame holds a web page with the file name "title.html" and the second frame holds a web page named "main.html".

More frames can be put on a web page by adding more frame tags to the code. To remove frame borders add the border="0" attribute into the opening frameset tag like so:

<frameset rows="25%,75%" frameborder="0">

Linking From Framed Web Pages
To get links working properly on framed web pages, each frame needs to be named so that the anchor tags will know into which frame to send the destination web page when a link is clicked. This is done by putting the name attribute into the frame tags like so:

<frame src="main.html" name="myframe" />
The name of the frame can be anything, once the frame is named, the link is directed to it through the target attribute in the anchor tags:

<a href="testage.html" target="myframe">Your link</a>
The target attribute told the link to send the web page into a frame named myframe. The target attribute can also force links to break out of frames completely and load like a regular web page when its value is set to "_top" like so:

Top frame (approx 100 pixels high) - Centered company intranet banner, I'm using hotspots on the banner image to link to other important pages.

Main frame - Displaying the users homepage, in this frame they are free to browse the net.

The hardship that I am trying to overcome is having a local text file (or something similiar) containing the users home page, so that each user can have their own homepage and it is easy to edit their individual homepages from machine to machine. They cannot edit their own homepage url as I have disabled it from Internet Options using Internet Explorer.

Of couse if somebody has a better way of doing all of this then I am willing to change how I've gone about doing this!

I think I get it. You want to have your company banner at the top of the browser regardless of where your users go.
Unfortunately, many sites use code to force themselves out of frames, so there really isn't a perfect solution. Most places, jsut control the users homepage via a GPO, and add it to their favorites via gpo as well. They should know how to use favorites by now

Top frame (approx 100 pixels high) - Centered company intranet banner, I'm using hotspots on the banner image to link to other important pages.

Main frame - Displaying the users homepage, in this frame they are free to browse the net.

The hardship that I am trying to overcome is having a local text file (or something similiar) containing the users home page, so that each user can have their own homepage and it is easy to edit their individual homepages from machine to machine. They cannot edit their own homepage url as I have disabled it from Internet Options using Internet Explorer.

Of couse if somebody has a better way of doing all of this then I am willing to change how I've gone about doing this!

OK...I think I know what you want now. But first: GET RID OF FRAMES!!!!
Second, what you are looking to do is typically done on the server side, not the client side like you are trying to do. It usually requires a membership login so each user can be served their own page and make changes to their own page only. For an example, think of Facebook (I will assume you have a facebook account). Everyone signs in and has their own homepage. Within your home page you can make a lot of changes such as who is allowed to access your homepage, which emails you get and so on. All info that you edit is saved in a database on a server and retrieved from the database when you login from any PC, MAC or mobile device. In short, it is all server based.

I think I get it. You want to have your company banner at the top of the browser regardless of where your users go.
Unfortunately, many sites use code to force themselves out of frames, so there really isn't a perfect solution. Most places, jsut control the users homepage via a GPO, and add it to their favorites via gpo as well. They should know how to use favorites by now

Thanks DanInMan, yes I understand unfortunately for example some users will not be connected to the company network. For example a laptop which has been taken out into the field or taken home etc. It may then be connected to a users home network or 3G dial up USB modem.

---

Originally Posted by fireplace_tea

OK...I think I know what you want now. But first: GET RID OF FRAMES!!!!
Second, what you are looking to do is typically done on the server side, not the client side like you are trying to do. It usually requires a membership login so each user can be served their own page and make changes to their own page only. For an example, think of Facebook (I will assume you have a facebook account). Everyone signs in and has their own homepage. Within your home page you can make a lot of changes such as who is allowed to access your homepage, which emails you get and so on. All info that you edit is saved in a database on a server and retrieved from the database when you login from any PC, MAC or mobile device. In short, it is all server based.

Let me know if I understood what you are looking to do. Thanks.

Thanks Fireplace_Tea, as per WaxDoc's advise I have now rewritten my pages (but am still using frames) and I think that is what DanInMa was saying. My answer is the same, unfortunately it's not 100% practical to do it all server side.

---

OK so to roundup, my thanks to everybody who has helped so far. My pages have been successfully rewritten and are still functioning with FRAMES! (Unfortunately I'm unaware of a solution to rid myself of frames and still do everything that I want to do)

The minor issue that I am now faced with is trying to make it easier to adjust the homepage. If anybody can suggest a method of reading the homepage from a text file then that would be fantastic.

Another alternative would be to link a popup dialogue box requesting the homepage if we could somehow store it in a file so that it can be called from the mainframe html file?

Suggestions and solutions please?

Last edited by SpongeRob; 10-07-2012 at 04:53 PM.
Reason: I forgot to anwser the other two users :-(

I am getting a better picture of what you are trying to do. The BEST thing you can do is learn Java and write a client application. Java is designed and allowed to dive into the OS file system, where JavaScript\HTML\CSS are not designed to dive into the OS file system (thus physically can not do it). There may be some weird way to do it with another small language...I suggest you do a google search and see what you can find out. You will want a language that can access the OS file system and talk to your webpage.

OH, and as far as getting rid of frames, try using normal CSS layout techniques and see if iFrames will do the trick for you.

I am getting a better picture of what you are trying to do. The BEST thing you can do is learn Java and write a client application. Java is designed and allowed to dive into the OS file system, where JavaScript\HTML\CSS are not designed to dive into the OS file system (thus physically can not do it). There may be some weird way to do it with another small language...I suggest you do a google search and see what you can find out. You will want a language that can access the OS file system and talk to your webpage.

OH, and as far as getting rid of frames, try using normal CSS layout techniques and see if iFrames will do the trick for you.

Thanks Fireplace_Tea, yeah I would love to learn Java and have looked a sections before. Main reason I haven't done anything further is that I've always managed to somehow do whatever I am trying to do either by figuring it out myself of by getting help from other people.

I've Googled for this for many hours without much luck, ironically it seems to be a possibility for Mac OS. I'll certainly look into the CSS and iFrames idea, but unfortunately that still wouldn't get me around the text homepage issue currently faced. Thanks for your help so far up to this point.

In fact a big thank-you for everybody who has contributed thus far. Fingers crossed Patryk's solution will solve my problems if I can get it working!

you could keep it in the text file, request the text file through ajax, then set the location.href to the result from ajax

<DmncAtrny> I will write on a huge cement block "BY ACCEPTING THIS BRICK THROUGH YOUR WINDOW, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE INSTALLATION OF THIS BRICK INTO YOUR BUILDING."
<DmncAtrny> And then hurl it through the window of a Sony officer
<DmncAtrny> and run like hell