Gossamer Forum
Home : General : Internet Technologies :

validation javascript - in header or body - does it matter?

Quote Reply
validation javascript - in header or body - does it matter?
Hi All

I have some validation javascript that I'd like to add to some pages.

I know that it's supposed to go into the head, but could the same validation code be put into the body if that's all I had access to?

In fact, could I put a remote call for the validation code into the body, as well?

Many thanks Smile

------------------------------------------
dog tags
Quote Reply
Re: [DogTags] validation javascript - in header or body - does it matter? In reply to
Hi,

As long as you have it wrapped with a <script ..> .. </script> tag, then you should be able to use it anywhere on the page (not 100% sure on compatabiliy between browsers though).

e.g;

Code:
<html>
<head>
...
<script>
....
</script>

</head>
<body>
normal content here
</body>
</html>

Code:
<html>
<head>
..
</head>
<body>
<script>
....
</script>

normal content here
</body>
</html>

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] validation javascript - in header or body - does it matter? In reply to
Thanks, And Smile

------------------------------------------
dog tags

Last edited by:

DogTags: May 13, 2005, 3:49 AM