Hello,
I am learning WWW technologies in Linux. I created index.html file which I
can browse with Firefox/Konqueror using URL
localhost/~robert/rozgloszenia/index.html. The page looks fine but there's
one strange problem: I have written some JavaScript code in functions.js
file which seems to be ignored when called although I have JavaScript
enabled in Firefox/Konqueror.
For example in functions.js I have:
function getCurrentYear( )
{
var today = Date();
return today.getFullYe ar();
}
I have written:
<head>
...
<script src="functions. js" language="javas cript"
type="text/javascript"></script>
</head>
and then I have:
<script language="javas cript"
type="text/javascript">doc ument.write(get CurrentDate()); </script>
There's nothing in oputput.
When I have written simple line:
<script language="javas cript"
type="text/javascript">doc ument.write('AB C');</script>
output is correct (ABC characters).
But when I put document.write( 'ABC'); in Test() function in functions.js and
call it:
<script language="javas cript" type="text/javascript">Tes t();</script>
then there's nothing in output.
The file functions.js has -rw-rw-r-- priviledges.
Please help.
Thanks in advance.
/RAM/
I am learning WWW technologies in Linux. I created index.html file which I
can browse with Firefox/Konqueror using URL
localhost/~robert/rozgloszenia/index.html. The page looks fine but there's
one strange problem: I have written some JavaScript code in functions.js
file which seems to be ignored when called although I have JavaScript
enabled in Firefox/Konqueror.
For example in functions.js I have:
function getCurrentYear( )
{
var today = Date();
return today.getFullYe ar();
}
I have written:
<head>
...
<script src="functions. js" language="javas cript"
type="text/javascript"></script>
</head>
and then I have:
<script language="javas cript"
type="text/javascript">doc ument.write(get CurrentDate()); </script>
There's nothing in oputput.
When I have written simple line:
<script language="javas cript"
type="text/javascript">doc ument.write('AB C');</script>
output is correct (ABC characters).
But when I put document.write( 'ABC'); in Test() function in functions.js and
call it:
<script language="javas cript" type="text/javascript">Tes t();</script>
then there's nothing in output.
The file functions.js has -rw-rw-r-- priviledges.
Please help.
Thanks in advance.
/RAM/
Comment