PDA

View Full Version : Shake Image Script



conewar
06-14-2007, 06:48 PM
Hi,
First i am not professional and sorry for my bad english...

i am using Shake Image Script on a page. but the codes


<a class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stop and onmouseout etc.. are not valid Xhtml as a result of W3...

The Script which i used on page on this link
http://www.dynamicdrive.com/dynamicindex4/shake.htm
The page i am trying to make is here

http://www.sigmamerkezi.com.tr/test1/
My Link is between code tags; pls copy/and paste to browser...

My question is that, if it is possible to write codes valid W3 ?
Or i can forget to use that script ?

coothead
06-15-2007, 08:21 AM
Hi there conewar,

and a warm welcome to these forums. ;)

Use lower case for all xhtml so...

onmouseover and onmouseout
Also note that...

<script language="JavaScript1.2">
...is deprecated and should be changed to...

<script type="text/javascript">
...for validation purposes. ;)
coothead

conewar
06-15-2007, 05:43 PM
coothead

Thank you for your help and that was more than a help, that is a small but higly effective hint for me.

:) ty again..

coothead
06-15-2007, 07:45 PM
No problem, you're welcome. ;)

Twey
06-15-2007, 08:36 PM
Also note that using XHTML for general use on the Web is currently a bad idea, since IE doesn't support it. Stick to HTML 4.01 Strict.

skripter
06-17-2007, 08:50 AM
Also note that using XHTML for general use on the Web is currently a bad idea, since IE doesn't support it. Stick to HTML 4.01 Strict.


Is there a reason why you prefer strict over 'transitional;? Strict seems so rigid and inflexible but then there is much I yet have to learn.


Thanks.

Twey
06-17-2007, 08:25 PM
The HTML 4.01 Transitional DOCTYPE was created to maintain rough compatibility with HTML 3.2 and thus ease the transition to HTML 4. This, however, was a good ten years ago: there's no reason that anybody should still be using it or the bad coding practices it allows. XHTML 1.0 Transitional, even ignoring IE, is just as bad, since it is based on HTML 4.01 Transitional, and so, again, allows a lot of sloppy coding practices left over from HTML 3.2.

skripter
06-17-2007, 09:47 PM
Thank you for your reply.

I often use the W3Schools tutorials as an aid to learning scripting codes, and they have mentioned that they find the 'strict' version as too strict and therefore prefer and use the 'transitional' version.

Twey
06-17-2007, 11:38 PM
Beware W3Schools. A lot of its information is misleading or simply wrong, and some vital points are missing entirely. It's a decent reference for the experienced web developer, but take it with a pinch of salt.

skripter
06-18-2007, 04:07 AM
I find your scripting skills, as well as the others, to be phenomenol. I remember you mentioned that you self -taught yourself and primarily used online tutorials.

How long did it take you to get to the superior level you have now?

Are there any particular tutorial you favor or have used while learning the scripts?

Thank you once again.

Twey
06-18-2007, 05:14 PM
I couldn't actually say. I did start off with various tutorials to learn the basics, but that was about a decade ago, and I can't remember which ones I used now. Above that, I've mostly learnt from these forums (study some of mwinter's code, it's inspired) and hanging around IRC (##javascript on Freenode, to be precise).