just a little page code help

A forum for, well, anything really.
Gripes, moans, ideas or just general chit chat. EXCEPT SPAM!!! - Don't just register to post here - IT WILL GET DELETED!!!
Post Reply
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

just a little page code help

Post by Ruth »

1. This is going to sound nuts, but how exactly do they now put midis on a webpage....<embed etc is said to be invalid...someone said something about object classid dah dah dah dah...whatever more I thought that's what they used to play like songs, or ra files or mpegs or something...

2. same thing with javascript. What do you do with the 'language' that was always in the codes?

Code: Select all

<SCRIPT language="JavaScript"> <!--
      jsv=1;
      //--> </SCRIPT>
  <SCRIPT language="JavaScript1.1"> <!--
      jsv=2;
      //--> </SCRIPT>
They tell you it's wrong but it's almost like you have to take new graduate level training to fix whatever the changes have become.

Geesh, if it ain't broke don't fix it!!!
waitman
Beginner
Beginner
Posts: 5
Joined: Thu May 13, 2004 8:22 am
Location: Buena Park
Contact:

google is your friend

Post by waitman »

embed midi

http://www.angelfire.com/fl5/html-tutorial/music.htm

That 'object classid" stuff would be less compatible with the population.

The "language" element tells the browser the minimum version (in your example javascript) that would be needed to run the enclosed code. different versions exist in different versions of the various browsers. you might have one visitor that only has JavaScript1.1 installed, another with 1.3, etc etc.

You could use it to write alternate code for compatibility with older browsers. For example, you might have something dancing a jig with 1.3 that just don't work in 1.1, so you make him just sit there with your 1.1 code. at least it wouldn't be totally broken.

Best Regards,
[/url]
Waitman Gobble
http://emkdesign.com/
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Thanks, that's what I actually use, the only reason for the question was that I was trying to use the validation thing for the first time, [someone said I should validate my pages] and it kept telling me that various things like height, src, width etc., were not 'valid attributes' of the element. I figured there had been some kind of change from years ago when I learned that code, and of course the validation only gives you some goobledegook about 'foo' when you try to get more info. I thought 'foo' was some kind of an exclamation. Anyway, that code is still what I see everyplace so that's what I'm using and 'foo' on them if it won't validate! :P

about the javascript, I understand that part, but what do you do now with the =language? I mean it's an already existing script, can i go in and change that script language=javascript to script type=text/javascript?. I think that's the way they want it written now, something like that. I just didn't know if I could do that in an already written script.


Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Ruth, you're usually safe by not specifying a particular version of JS (unless you know for sure the script really needs it).

So...

Code: Select all

<script language="Javascript" src="whatever.js" type="text/javascript"></script>
...should work for most everything.

The above for calling from a source file, of course, but the same thought holds true for embedded code.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

John,
It's not my code :lol: and I'm actually removing it since it never gets used, but I still wanted to know what you do with something like that,

Code: Select all

<SCRIPT language="JavaScript1.1"> <!-- 
      jsv=2; 
      //--> </SCRIPT>
can you do the now required text/javascript1.1 like so to make it validate. Again, it's just because I'm curious on how you make something like that validate and still not 'change' the code since it tells you not to modify it.

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Specifically what error are you getting when you try to validate that?
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Code: Select all

required attribute "TYPE" not specified
<SCRIPT language="JavaScript1.1"> <!--
 
so they want the type=text/javascript I guess. But, I never fixed it because I wasn't sure how to do that with the 1.1 on the javascript part.

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

It would still be the same, regardless of the "flavor" of JS you are calling (1.1, 1.2, etc.)...

Code: Select all

<script language="Javascript1.1" type="text/javascript"> <!-- etc.
John
Post Reply