PDA

View Full Version : Java script


Muho
08-16-2005, 05:35 PM
Hi
My english is very bed, but i'm just confused.
What is korrekt?
<script language='javascript' type='text/javascript'>
or
<script type="text/javascript">.
__________________________________________
version1.4.2
In admin/index.php line 180
<script type="text/javascript">
<!-- BEGIN
function flip(rid)
{
current=(document.getElementById(rid).style.displa y == 'none') ? 'block' : 'none';
document.getElementById(rid).style.display = current;
}
// End -->
</script>

but in templates/image_template.html
line 13

<script language='javascript' type='text/javascript'>
<!-- BEGIN
function flip(rid)
{
current=(document.getElementById(rid).style.displa y == 'none') ? 'block' : 'none';
document.getElementById(rid).style.display = current;
}
// End -->
</script>
Thanks
Muho

http://www.bosnafolk.com/mozaik/slike/

Connie
08-16-2005, 06:25 PM
you must not be confused because of these small differences, both is ok

here in german:
Mit <script type="text/javascript"> leiten Sie einen Bereich für JavaScript innerhalb einer HTML-Datei ein (script = Quelltext, type = Seite MIME-Typ). Die Angabe zum MIME-Typ ist seit HTML 4.0 Pflicht. Mit type="text/javascript" bestimmen Sie den typischen MIME-Typ für JavaScript-Dateien.
Zusätzlich können Sie zur Kennzeichnung der JavaScript-Sprachversion das language-Attribut verwenden, z.B. language="JavaScript" oder language="JavaScript1.2".

in english:<script type="text/javascript"> opens a java-script section inside a HTML-file.
(script =source-code, type = MIME-Typ).
Since HTML 4.0 information for MIME-Type is obligatory.
Using "type="text/javascript"" you define the typical MIME-type for Javascript-Files.
Additionally you can define the Javascript-Version by using the language-attribute, e.g. language="JavaScript" or "language="JavaScript1.2"."

so you see, both is correct. Otherwise our script output would not validate...
and that is something I am very carefully with...

Muho
08-16-2005, 06:45 PM
Thank you so much for your help.
Muho

Connie
08-16-2005, 07:11 PM
you are welcome!

Muho
08-16-2005, 08:11 PM
Thanks Connie one more.
My page www.bosnafolk.com/mozaik/slike is now valid.
The document located at http://www.bosnafolk.com/mozaik/slike/index.php was checked and found to be valid XHTML 1.0 Transitional.
Great. I like Pixelpost.
Muho