Old 8th July 2008, 00:56   #1
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
html + strict + javascript

Hi guys I need some help. I'm making a web page in "strict" mode, you know:
code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


but in my script part, I need (just to be sure) that my script must be run on "JavaSCript1.2". "strict" doesn't allow me to use:
code:

<script language="JavaScript1.2">


So any ideas about it? Thanks!


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 8th July 2008, 01:20   #2
mikm
Major Dude
 
mikm's Avatar
 
Join Date: May 2001
Location: somewhere else
Posts: 1,255
I'm sure there is some Javascript magic you could use to make an educated guess based on which browser the user has.

powered by C₂H₅OH
mikm is offline   Reply With Quote
Old 9th July 2008, 00:38   #3
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
I guess, I could :\


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 9th July 2008, 10:45   #4
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
From W3C:

'
The "language" attribute of the script element was deprecated in HTML 4.01.

The "language" attribute of the script element is not supported in XHTML 1.0 Strict DTD.
'

better to not rely on a specific version though... from what I understand the version numbers are a token effort. better to check the browser you are running as mikm suggests. its not an educated guess... its actually a better solution imo.

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 10th July 2008, 18:52   #5
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
What the hell are you doing that you need to provide Javascript1.2 as the language?

zootm is offline   Reply With Quote
Old 11th July 2008, 22:26   #6
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Quote:
Originally posted by zootm
What the hell are you doing that you need to provide Javascript1.2 as the language?
I'm going to use some methods that they use 1.2, mostly DHTML and some fancy form methods.


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 11th July 2008, 23:59   #7
Nunzio390
Nugatory Aluminator
Look it up

 
Nunzio390's Avatar
 
Join Date: Oct 2002
Location: Tharsis Ridge (Martian lowlands)
Posts: 8,588
Send a message via AIM to Nunzio390 Send a message via Yahoo to Nunzio390
Why not just use this...

<script type="text\javascript">

script content/functions here

</script>

Or, use an external .js file (as I always do) like so...

<script type='text/javascript' src='name-of-external-file.js'></script>

and the above will just call in a file containing the script content/functions

Either of the above should work and also conform to W3C rules and guidelines. You should also be able to use DHTML and form methods.

Don't email or PM me concerning Winamp. Instead, either start a NEW TOPIC or post a REPLY in the appropriate thread in these forums. This will also benefit others who may have a similar question or problem. But before posting, please first Search the forums and read all FAQs and all Sticky threads.

ORB Remote Broadcast

[ Automated Jukebox | Nunzio's Home | Wacky Videos | Solve the Prunella Puzzle! ]
[ LINE RIDER! | My Resume | Virtual Chess | Composite Sketch | My Niece's Band ]
[ Plugins by Joonas | DrO's Winamp Plugins and Extras | K-Jöfol ]
Nunzio390 is offline   Reply With Quote
Old 12th July 2008, 13:12   #8
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
Quote:
Originally posted by Joel
I'm going to use some methods that they use 1.2, mostly DHTML and some fancy form methods.
If these aren't supported in newer browsers implementations of modern JS, they won't be available at all. I'm pretty sure the version is ignored.

Also JS 1.2 is ancient. There's good ways to do most things these days, and you'll be better for it if you use them.
Quote:
Originally posted by Nunzio390
Why not just use this...
The problem isn't that he doesn't know how to include JS, it's that he thinks that specifying the version in the "language" attribute will allow him to choose an archaic version of Javascript to run the script under. It won't in any browser I'm aware of.

zootm is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Community Center > General Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump