Website Design Help Needed, please

Want to just shoot the breeze? Forum 42 is the place!

Moderator: Moderators

Post Reply
bicostp
Moderator
Posts: 10491
Joined: Mon Mar 07, 2005 5:47 pm
Steam ID: bicostp
Location: Spamalot
Contact:

Website Design Help Needed, please

Post by bicostp »

OK, I'm re-doing my website again. (might as well since I've gotta switch hosts anyways :P) I'm using tables and all that fancy jazz, so no more "1994-era n00b web crap" for me. I can do better than that! Shame on me for using frames! :P

(I'm not posting it yet, but the layout is turning out pretty close to that of www.i-mockery.com )

I just hae a few questions regarding php and redirecting and pop-up javascript messages...

1. I want to make an intermediate page which comes up when you click on external links, sort of like this:

<img src="http://img170.imageshack.us/img170/7053/linkbar8qo.gif">

How could I do that? with a frame page and an address that would look something like

Code: Select all

http://bic.wherever.wtf/redirect.php?site=http://www.google.com
? And if so how would it be coded?

2. What's the VBcode code for pop-up messages? (I <i>used</i> to know how to do it, it was a blast to save a copy of the google homepage and add the code to say something like "This is Bill Gates. Prepare to be assimilated." or something like that.) I want to make people get text popup message windows when they use IE. :twisted:

EDIT: I just found <a href="http://www.echoecho.com/jsbrowserdetection02.htm">this page</a> which has a bunch of info on browser detection, but nothing on the popup messages yet...

EDIT 2: http://www.echoecho.com/jsframelinks02.htm This page shows how to make the redirect thingy.

Now all that's left is popup windows and other fun stuff...

3. Any other cool web tricks like that you know of?

Thanks everybody! :)
Last edited by bicostp on Mon Oct 03, 2005 2:35 pm, edited 2 times in total.
marshallh
Moderator
Posts: 2987
Joined: Sat Sep 10, 2005 2:17 pm
360 GamerTag: marshallh
Location: here and there
Contact:

Post by marshallh »

Please don't use frames! Also, it is extremely aggravating to us who have to put up with those stupid javascript message boxes. I suggest you leave those out entirely.
bicostp
Moderator
Posts: 10491
Joined: Mon Mar 07, 2005 5:47 pm
Steam ID: bicostp
Location: Spamalot
Contact:

Post by bicostp »

What's so bad about frames? Sure they look kinda schlocky butit's just going to turn out sort of like how the "forums" link on Ben's new homepage did, and only when it's on an external page, not for my pages. (Clicking the links would bring you back to my pages, and there'd be a link that would hide the frame. hmmm, maybe I could set up a cookie system that would remember that setting...

As far as java popups would be, they won't be like the stupid advertizing popups you see asking for your credit score, or giving you the opportunity for a different kind of "score". :lol: They would be simple text popuos that would say a brief message and an OK button. When the OK btton is pressed then it would go away. (and ONLY if you're using Internet Explorer. Hey, I could always ban all IE users from my site... it would be really simple... :twisted:, but I probably won't.

I know you're probably aquainting Javascriprt opoup boxes with joke sites that dispaly hundreds of them, but this would only be one!
marshallh
Moderator
Posts: 2987
Joined: Sat Sep 10, 2005 2:17 pm
360 GamerTag: marshallh
Location: here and there
Contact:

Post by marshallh »

Yes, I'll admit I'm somewhat biased about frames, even though my site has used them heavily for the last 3 years. I'm redesigning them with tables.

As far as cookies go, what hosting service are you using? I think only server-side scripts can assign and modify cookies.
But I'm still pretty sure you can get by without using pop-up boxes. (Most people don't use IE, so noone sees the message, so what's the point of having it there in the first place?)

index.html

Code: Select all

<html>
<head>
<title>bicostp's homepage</title>
</head>

<frameset rows="*,80" frameborder="NO" border="0" framespacing="0"> 
  <frame name="menuFrame" scrolling="NO" noresize src="menu.htm">
  <frame name="mainFrame" src="mainstuff.htm">
</frameset>
<noframes><body bgcolor="#FFFFFF">
Get a browser that supports frames D'OH!
</body></noframes>
</html>
Hope that helps, you'll of course need to create your own menu and mainstuff files.

To get the menu items to show in the lower frame, the links need to be like this:

Code: Select all

<a href="item1.htm" target="mainFrame">Item 1</a>
XPCportables
Posts: 1020
Joined: Mon Aug 08, 2005 3:27 pm
Location: The end of time...

Post by XPCportables »

FIREFOX RULES!!!!!!!!!!!!!!!!!!!!!!!!!!!!
nos_slived
Higher Idiot
Posts: 3476
Joined: Mon Mar 21, 2005 6:32 pm
Location: Burnaby, BC, Canada
Contact:

Post by nos_slived »

marshallh wrote:I think only server-side scripts can assign and modify cookies.
Javascript is client-side, and can be used to set/modify/read cookies.

There are several ways to control the pages in frames, so here are the 3 most common:

Basic HTML Links:

Code: Select all

<a href="http://www.google.ca/" target="mainFrame">Google</a>
Javascript Links:

Code: Select all

<a href="#" onClick="parent.mainFrame.location='http://www.google.ca/';return false;">Google</a>
PHP Links:

Code: Select all

<a href="index.php?site=http://www.google.ca/">Google</a>
Where index.php:

Code: Select all

<?php
$s = $_GET['site'];
if(!isset($s))
  $s = "main.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>nos_slived Fan Club : )</title>
</head>
<frameset cols="*,80" frameborder="NO" border="0" framespacing="0">
<frame src="header.php" name="top" scrolling="NO" noresize frameborder="0" />
<frame src="<?php echo $s; ?>" name="mainFrame" frameborder="0" />
</frameset>
</html>
To detect IE, use:

Code: Select all

<HTML>
<HEAD>
<script>
function browserAlert(){
	if (navigator.appName == "Microsoft Internet Explorer"){
		alert("You use IE");
	}
}
</script>
</HEAD>
<BODY onLoad="browserAlert()">
Body
</BODY>
</HTML>
Last edited by nos_slived on Mon Oct 03, 2005 5:54 pm, edited 1 time in total.
Image
gannon
Moderator
Posts: 6974
Joined: Sun Apr 04, 2004 4:48 pm
Location: Near that one big lake
Contact:

Post by gannon »

nice parse error on line 2 ;)
bicostp
Moderator
Posts: 10491
Joined: Mon Mar 07, 2005 5:47 pm
Steam ID: bicostp
Location: Spamalot
Contact:

Post by bicostp »

OK I got some stuff up and running, but I'm still getting stuck on the navigation bar.

<a href="http://img219.imageshack.us/img219/1994 ... .jpg"><img src="http://img219.imageshack.us/img219/1994 ... omg2ta.jpg" title="Click for a full-size view" width=330></a>
click for a larger view. Don't worry, it looks much better in FrontPage, I just used MS Pain(t) to capture the screenshot to a JPEG.

I want the navigation bar (outlined in red) to be the same on all the pages, but I don't want to have to keep up on a ton of copies of it. I figure I could use an iFrame to display the same nav bar at the top of every page, but I don't have much experience with them. (I know basic HTML already, such as <b>bold</b>, <i>italic</i>, and <s>strikethru</s>, and image and link tags, just not iFrames.) How do you use them? (I tried Google but I must not be entering the right stuff because I can't find any applicable info. :lol:)

Any ideas? Code? Opinions? Advice? ;)
HK-47
Moderator
Posts: 3598
Joined: Thu Jul 15, 2004 2:17 pm
Location: /dev/moderator/
Contact:

Post by HK-47 »

nos_slived
Higher Idiot
Posts: 3476
Joined: Mon Mar 21, 2005 6:32 pm
Location: Burnaby, BC, Canada
Contact:

Post by nos_slived »

gannon wrote:nice parse error on line 2 ;)
Crap, fixed. Thanks gannon. I was going to test that page, but I was too lazy. I think that was a typo, because between Javascript and PHP, it's pretty automatic for me. I should've atleast used my code editor to show any mistakes, but I coded that right on the page.

A great site for coding tutorials is W3Schools. Here is the page for inline frames(iframes). At the bottom of that page, there's a link for their try-it page. That is one of the things that I love about W3Schools' HTML/XHTML tutorials, because they let you try most tags right on the site. Test all the atributes. I'd suggest learning PHP, and using a setup similar to the one I posted(but with an iframe instead), to display all your pages without needing to use the same code(an iframe tag) on every page. Once you learn PHP or ASP, websites are a lot easier(and even more fun) to make. W3Schools has tutorials for both PHP and ASP, PHP.net has tons of information on PHP(including a page for every function, and how to use it), and I believe Microsoft has ASP documentation.

EDIT: Microsoft does have ASP documentation, as well as ASP.NET documentation.
Image
Post Reply