![]() |
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! :eek:
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. :confused: Here's my current script: Code:
<frameset rows="98,*" frameborder="no" border="0" framespacing="0">So how do I change/rewrite my script to do what I want please? Please help me, thank-you in advance. :thumbsup: |
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? |
Quote:
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. I'll keep my fingers crossed please! :thumbsup: |
Anybody help please?
|
I'm not sure as to what you are trying to do. Why are you using frames?
|
Quote:
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! :thumbsup: |
deprecated
Thank goodness <FRAMESET> <frame></frame> </FRAMESET> is deprecated. Don't use frames; they just complicate things.
Code:
<frameset cols="25%,*,25%">Quote:
|
Quote:
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 ;) |
Quote:
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. |
Quote:
Yes seemingly frames are a must. I am doing different thing in the different frames and I would be unable to easily do this in one page. I have one slight problem remaining, is there anyway that we can make the modification of the users homepage easier? Ideally running the URL from a text file? Currently my code for the main browsing window (89%) is as follows: Code:
<head>Quote:
--- Quote:
--- 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? |
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. |
How about passing arguments in url instead of storing them in txt file?
I would imagine it's even simpler to create shortcuts/bookmarks than creating txt files ;) if you have your frameset like that: Code:
<frameset rows="98,*" frameborder="no" border="0" framespacing="0">Code:
<script language="javascript">and call your document like that: Code:
http://somedomain.com/document.http?theURL=http://something.com/blah.html...that will work for you assuming i understood purpose of your question.... :D and btw text file aproach won't fly since modern browsers work in sandboxes limiting access to local file system |
Quote:
My problems are: (1) Can you confirm where to put the Javascript please? I assume you mean in index.html? (2) If so, as it's a frameset I don't have any <Body> tags. I though that was the way that Frames were supposed to be coded? OK so I've tried adding it regardlessly. (3) Finally I assume you don't mean save the file like this: Code:
http://somedomain.com/document.http?theURL=http://something.com/blah.htmlCode:
C:\Users\MyComputer\Desktop\index.html?theURL=http://www.google.ieI do like the idea of this workaround, if you could please assist me in getting it working? My Current files read as follows: Index.html Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Quote:
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 have simple example with one iframe here: http://freedockstar.com/test/test.html
if you'll call it with parameter like: http://freedockstar.com/test/test.ht...dingforums.com you'll see what's happening. take look at source. also if you can't make a shortcut to local file with parameters, then sollution is simple. host the file somewhere. U can make shortcuts for websites with GET values afterall (just like you can make shortcut to http://freedockstar.com/test/test.ht...dingforums.com ) |
you could keep it in the text file, request the text file through ajax, then set the location.href to the result from ajax
|
| All times are GMT +1. The time now is 07:24 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.