Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-18-2003, 07:11 PM   #1 (permalink)
CaN Opener
^ reads books
 
CaN Opener's Avatar
 
Join Date: Feb 2003
Location: San Fran
Posts: 66
CaN Opener is on a distinguished road
Reloading a frame set

im creating a website for my friend and i had a question about frame sets.

i want the first page to go to a grafic that has been maped out. then from the various links i want the new page the load but i want a navbar at the bottom. how do i load this frame set when my main frame is a varable?
i would be happy for any post

ty

Can
__________________
there's no place like 127.0.0.1
CaN Opener is offline   Reply With Quote
Old 03-18-2003, 10:11 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
hey can you post some code of your main frameset so your question makes a little more sense? maybe explain it a little more too?
sde is offline   Reply With Quote
Old 03-18-2003, 10:59 PM   #3 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
you can give frames names, and have your links be targeted towards a particular frame.

ex:
<a href="/sidebar.html" target="leftframe">refresh the left frame</a>

the main page frame (the one that contains all other frames) is named "_top" by default.

<a href="/main.html" target="_top">replace all frames on this page by main.html</a>
joe_bruin is offline   Reply With Quote
Old 03-19-2003, 06:55 AM   #4 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
dont use frames, they are evil.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 03-19-2003, 07:41 AM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
Quote:
Originally posted by Admin
dont use frames, they are evil.
hehe, i agree with matt 100% here
sde is offline   Reply With Quote
Old 04-03-2003, 06:29 AM   #6 (permalink)
sno2dude
Registered User
 
sno2dude's Avatar
 
Join Date: Apr 2003
Location: Michigan Tech
Posts: 38
sno2dude is on a distinguished road
Send a message via AIM to sno2dude Send a message via Yahoo to sno2dude
hey now, dont hate on frames...... i <3 frames..... My page You just gotta know how to work them!
sno2dude is offline   Reply With Quote
Old 04-03-2003, 06:30 AM   #7 (permalink)
sno2dude
Registered User
 
sno2dude's Avatar
 
Join Date: Apr 2003
Location: Michigan Tech
Posts: 38
sno2dude is on a distinguished road
Send a message via AIM to sno2dude Send a message via Yahoo to sno2dude
oh, and yes, i know my page is devoid of decent content.... and i need to change the text color.... but still it has a certain something to it i think...... shuddup..... so what if im not creative?!
sno2dude is offline   Reply With Quote
Old 04-03-2003, 07:12 AM   #8 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
sorry dude, frames are bad.

search engines cant bookmark your pages properly, you can print specific pages easily, the reload button doesnt work properly, etc etc etc.....
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 04-03-2003, 07:17 AM   #9 (permalink)
sno2dude
Registered User
 
sno2dude's Avatar
 
Join Date: Apr 2003
Location: Michigan Tech
Posts: 38
sno2dude is on a distinguished road
Send a message via AIM to sno2dude Send a message via Yahoo to sno2dude
i dont care about search pages, if idid i could put Meta tags in my frame page, ive never had a problem with the reload button and printing webpages is bad in general, thats why copy and paste was created.
sno2dude is offline   Reply With Quote
Old 04-03-2003, 08:41 AM   #10 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
hah.

search engines will index the content pages leaving your navigation left out. they might also index your navigation pages leaving your content left out.

printing webpages is bad? says who?

sorry dude, your not gonna win this one.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 04-04-2003, 12:50 AM   #11 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,720
redhead is on a distinguished road
Ok, if this is still an object.. then this is what I would do:
Code:
<html>
<head>
 <title>
  Your title 
 </title>

<script language="JavaScript">
<!--- hide from nasty NS 2.0

var urlArray = new Array("main.html", "firstpage.html",
secondpage.html", "thirdpage.html");

/*
 * this is a simple function to decide main contence,
 * given a url like: url/&something it will give the main contence
 * something.html
 * unless its a special something like lovene etc..
 */

function decideMain(url){
  var INDEX = url.indexOf("?");
// if a regular url no need to play the BIG boss here..
  if(INDEX == -1)
    return "main.html";
  var searchThing = url.substring(INDEX+1);
  for(var i = 0; i < urlArray.length; i++)
    if(urlArray[i].indexOf(searchThing) > -1)
      return urlArray[i];

// if everything fails.. we can return the something.html page..
  return (searchThing + ".html");
}

var MAIN = decideMain(document.location.href);

document.write(
"<FRAMESET ROWS=\"*, 135\" noresize border=\"0\">\n" +
"  <FRAME NAME=\"main\" SRC=\"" + MAIN +"\" noresize SCROLLING=\"auto\" border=\
"0\">\n" +
"  <FRAME NAME=\"menu\" noresize SRC=\"menu.html\" SCROLLING=\"no\" border=\"0\"
>\n" +
"</FRAMESET>\n"
);
// End of hiding..  -->
</script>
<!--- For those who cant even allow javascript.. -->
<noscript>
<FRAMESET ROWS="*, 135" noresize border="0">
  <FRAME NAME="menu" noresize SRC="menu.html" SCROLLING="no" border="0">
  <FRAME NAME="main" SRC="main.html" noresize SCROLLING="auto" border="0">
</FRAMESET>
</noscript>
<!--- If your using IE 2.0 or older, it's just too bad.. -->

</head>
<body BGCOLOR="#FFFFFF" ALINK="#0099FF"  LINK="#0099FF" VLINK="#0099FF" TEXT="#0
00000" TOPMARGIN="16" LEFTMARGIN="16" MARGINWIDTH="16" MARGINHEIGHT="16">
<center>
<table border="0" cellspacing="0" cellpadding="0" width="90%">
 <tr>
  <td>
   Too bad, your browser dosn't support frames
  </td>
 </tr>
</table>
</center>
</html>
It will do what the description of the function is telling..
Just make your image map to parse the desired thing, like <a href='my_frame.html?what_to_se'> and it will load your fram-page with the main contence beeing 'what_to_see.html', if the '?wat_to_se' should match anything mentioned in the urlArray, it will load the mainsource as beeing the match. If you parse it with the usual <a href='my_frame.html'> it will just load main.html as the main source..

Hope this is what you were looking for, and I'm sorry I didnt answer it sooner, eventho I was aware of this..

But as the others claim, frames are bad..... Use php, and just have a show_menu() function you just call from what ever page you need it shown in..

Then again, if you havn't got the support for php you're forced to use frames.. (but frames are bad...)
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 04-04-2003, 06:47 AM   #12 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
you can also use SSI's to include navigation
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 04-07-2003, 09:24 AM   #13 (permalink)
sno2dude
Registered User
 
sno2dude's Avatar
 
Join Date: Apr 2003
Location: Michigan Tech
Posts: 38
sno2dude is on a distinguished road
Send a message via AIM to sno2dude Send a message via Yahoo to sno2dude
printing webpages is bad cuz it screws up all the formatting this is why its all about the copy paste and then reformatting it so that it actually prints right...... and if you have a problem with that you can kiss my @$$ i doubt anyone is going to want to print anything off of my totally non-informitave webpage and i doubt anyone will need to search Google for it.
sno2dude is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacking your Linksys WRT54G sde Linux / BSD / OS X 18 04-20-2005 03:37 PM
OpenGL.dll Mr.Anderson Platform/API C++ 3 08-13-2004 10:07 AM
Can draw one Frame in a variable? mauriciorein Java 1 06-10-2004 04:06 AM
what language is this? sde All Other Coding Languages 10 05-25-2004 03:57 PM
I am a newb, how do you set multiple parts of an image as a link? I sniper baby HTML, XML, Javascript, AJAX 5 02-10-2003 06:40 PM


All times are GMT -8. The time now is 09:56 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting