Stylesheet/JavaScript Problem

Posted on 1998-09-18
Last Modified: 2013-12-16
Go to Notice the Geocities logo at the bottom right hand corner which stays there even when you scroll up and down? How is this feature achieved?

Having examined the code I imagine it's the following:

<DIV CLASS="GeoBranding" ID="GeoBranding" STYLE="position:absolute;top:1;display:none;" ALIGN="right">

<A HREF="/Avenues/Entertainment/?source=watermark&browser=MSIE" TARGET="_top"><IMG SRC="/images/branding/geocities.gif" ALT="Click to see more great pages on Entertainment." BORDER="0"></A><BR>

<SCRIPT LANGUAGE="javascript1.2" SRC="/include/branding/default_ie.js"></SCRIPT>

However, when I load this into my browser it fails to load - I have to Cntrl Alt Delete to exit.

Problem is - I don't understand all that's going on in the above example. Specifically the first line <DIV CLASS etc... The line which states /?source=watermark&browser=MSIE, and the last line referring to the Javascript. I thought that JavaScript requires a declaration before the <head> </head> tags and the full HTML page that the above example was taken from does not.

Any help sorting this out would be appreciated.
Question by:bigstar

Author Comment

ID: 1837953
Edited text of question

Accepted Solution

jbirk earned 50 total points
ID: 1837954
OK, here comes a simple explanation (well sort of)...
The div is a division and it is used now by both Netscape 4 and IE 4 to represent layers when a style is provided (STYLE="position:absolute;top:1;display:none;").  Layers are what make DHTML possible, and opens a whole new world of possibilities.  It would take forever to go into it and explain everything about layers, but if you have specific questions just ask..
Then the link which looks like:
is just a normal link which includes paremeters that are sent to the file, whether it be a cgi program or an html page (which can access those parameters via javascript).

Then the end of it is what's called a javascript include.  What they do there is refer to a file that contains nothing but javascript code.  This code is the code that makes the image follow the page as you scroll.  With IE 4 you can simply type in its location and see the code.  It gets pretty complex though when manipulating layers like that.

Further more it should be mentioned that if you view this same page with Netscape different stuff will be appended to the end of the file because netscape treats layers differently in javascript and html than IE does.



Author Comment

ID: 1837955
Thanks for the response Josh, although I'm little wiser.

Obviously, I've got to understand more about Style Sheets and DHTML than I do at present - which ain't too much.

As for being able to view the source JavaScript by typing the location - I tried this but it didn't work - what do you suggest I type?



Expert Comment

ID: 1837956
It's hard to know the level of the questioner.  Sorry.
Anyway, type this into the location of IE 4:
for the version of the code for netscape:

Again if you any specific question about layers, just ask.  This code covers a lot of aspects of layers/DHTML so a lot of undertsanding is necesary to fully understand the code and how to do it yourself.
Oh, also the code is stored in a different format than windows machines, so you'll see nonprintable characters instead of endoflines.  If you see this just use a program like homesite to view it or simply replace all these characters with EOLs.

LVL 75

Expert Comment

by:Michel Plungjan
ID: 1837957
Type the loaction and the view source
alterntively copy this into an html document, right click and select save link as

<A HREF="">IE</A>
<A HREF="">NS</A>
LVL 10

Expert Comment

ID: 1837958
I have the source code for l here if you want:

hope I ddn't step on anyones toes...

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.


Expert Comment

ID: 1837959
That certainly is an easier way to get the source MasseyM!

Author Comment

ID: 1837960
Guys - I've got a problem. When I follow MasseyM's advice, I get a tiny icon on an otherwise blank HTML page. I think something has gone wrong with relationship between Winzip and my browser (both IE4 and Netscape 4). Now I'm not trying to get a two for one dollop of 50 points, but any ideas?

The usual way I pick up zips now is using a right click and 'Save target' but it won't work in this case.

Expert Comment

ID: 1837961
hmmm.... try reinstalling Winzip?
Or you could goto (in netscape) edit, preferences, navigator, applications, and then scroll down to zip (alphabetical list).  You can then select that, and edit the action the browser takes when encountering that file type.  On my browser it shows:
the mime type:
handled by the application:
C:\PROGRA~1\WINZIP\winzip32.exe "%1"
But you could change it to save it to disk also.
I'm not sure about IE 4.
If this doesn't help, I'd suggest reinstalling Winzip.

Good luck,

Author Comment

ID: 1837962
Well the Deinstall/Reinstall Didn't work, but I've managed to get the file using 'Godzilla'. Can you give me any addresses on the 'Net where i may learn about how to use DHTML layers. This would be the next move wouldn't it?

Expert Comment

ID: 1837963
I think your best bet is to go buy a book.  I haven't read it, but O'reilly has a book entitled Dynamic HTML.  O'reilly books in my experience have all been good, so this one probably is too.


Author Comment

ID: 1837964
I know it's been a good six or seven weeks since I last commented here - so I've returned to apologise for not doing so.

I do so hate it when EE automatically awards points to the last submitted answer (usually with middling points), but I understand why they have to do so.

Anyway, sorry guys you're input is appreciated.

To finish off then: Josh - I have your recommended reading on order. Plus my problem with Winzip and the browser was finally solved with a complete rebuild!

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now