Closed Thread Icon

Preserved Topic: JS above HTML tag? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17958" title="Pages that link to Preserved Topic: JS above HTML tag? (Page 1 of 1)" rel="nofollow" >Preserved Topic: JS above HTML tag? <span class="small">(Page 1 of 1)</span>\

 
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 05-10-2001 23:21

Greets!

Okay - I have a template that uses a bunch of XSSI. One of the scripts in an included page needs a variable set. That variable is set based on the content page - thus, it's always different.

I could split my header template into two, calling the first part with an SSI call, then setting the variable, then calling the second part via SSI. That seems like a mess. I played around with setting the variable at the very top of the page, above the <HTML> (which is in the header template), and this seems to work. Doesn anyone know of any problems I might run into with having javascript code above the <HTML>?

A test page can be seen at http://www.macombsheriff.com/3.0/development/news.htm - this has the variable ('pagetitle') set at the very top. It's later used in the breadcrumbs, the document.title, and the EMAIL THIS PAGE script at the bottom.

Pat Richard
A pixel is worth a thousand words.
http://www.gurusnetwork.com
ICQ 23113317

[This message has been edited by Pugzly (edited 05-10-2001).]

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 05-11-2001 00:37

Well, I don't know if *this* deviation from standard will cause anything to fail. But I have come across things like this where one browser would be forgiving and another would say to take a hike! I would suggest trying resulting page out on every combination of platform/browser to be safe. But you never know if the next release will choke on it.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 05-11-2001 00:45

Oh wow! You've dumped NN4. Ok, well that's one off my list.

I tested your sample page with IE5.5/PC, Mozilla 0.8.1/PC, IE5/Mac, and NN6/Mac. They all worked just fine

« BackwardsOnwards »

Show Forum Drop Down Menu