Forum Moderators: open

Message Too Old, No Replies

change frame page with page header

         

J_Man

12:22 am on Jul 28, 2004 (gmt 0)

10+ Year Member



Is it possible to create a dynamic type of page that will change the mainframe with the header, like index.asp&main=updates.html
this way I could include my framed menu without the lack of linking capabilities. Any ideas?

To clarify the index page would be a dynamic page with frames. When you click a link instead of leavind the page header alone, it changes to index.asp&main=blah/link.html this way you can have a framed menu and better linking capabilites.

Also not I'm using collapsable frame menu, that is why this idea would be ideal, rather than a basic .asp header type thing.

RonPK

10:40 am on Jul 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure whether I understand what you're after. Maybe you're trying to use the query string to decide which page to show in the frameset?

In that case, put this script in your index.asp:

<script type="text/javascript"> 
var ls = location.search.substr(1);
var insertme = (ls && (ls.substr(0,5) == "main="))?
unescape(ls.substr(5)) : "intro.html";
var theSet = '<frameset cols="150,*">\n';
theSet += ' <frame src="menu.html" name="menuframe">\n';
theSet += ' <frame src="' + insertme + '" name="mainframe">\n';
theSet += '<\/frameset>\n';
document.write(theSet);
</script>

Now you can make links like href="index.asp?main=somefile.html". Note the use of a question mark: index.asp?... , not index.asp&...

All this only works in browsers with javascript enabled. Search engines will not find it useful.

J_Man

10:48 pm on Aug 1, 2004 (gmt 0)

10+ Year Member



This is what I was looking for before, and I appreciate it, but I really need something that change the URL as the page in the frame changes. For example I click a link on the somefile.html page that goes to stuff.html I need the URL to display

hosting.ok.org/test.asp?main=stuff.html

instead it still displays

hosting.ok.org/test.asp?main=somefile.html

Rambo Tribble

4:40 am on Aug 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Gee, if you could only show whatever URL you wanted in the location bar, it would make phishing so much easier - which is why you won't be able to do this.

J_Man

1:58 am on Aug 4, 2004 (gmt 0)

10+ Year Member



phishing?

RonPK

11:33 am on Aug 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



phishing = fool people into providing personal data such as credit card numbers, account usernames and passwords, et cetera.
Send out spoofed e-mails with "your account has expired, click here to re-register". The link leads to a fraudulent site asking for the personal data. Until MS fixed it, it was possible to fake the URL in IE's address bar.

More info: use your favorite search engine ...

J_Man

2:41 am on Aug 5, 2004 (gmt 0)

10+ Year Member



my site has no registration type stuff, all I want is to show what page a frame is on.

RonPK

6:54 am on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only way to achieve what you're after, would be to load a new frameset everytime someone clicks a link. But in that case, you might just as well drop the use of frames alltogether: you would loose the main benefit of using frames, which is to only load the page that changes and leave the menu as it is.

J_Man

8:09 am on Aug 5, 2004 (gmt 0)

10+ Year Member



maaaannnnnn couldn't a cgi script fake the url so that when a user sends it to someone it'll have the right main=whatever.html

RonPK

9:29 am on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I were to send someone a URL, no cgi-script would be involved.

Besides, how should the script know when to 'fake' the URL and when to leave it as it is?

Good luck.

J_Man

6:12 am on Aug 6, 2004 (gmt 0)

10+ Year Member



yeah... it's not happening, thanks anyway