Jump to content

Letter size Change

- - - - -

  • Please log in to reply
3 replies to this topic

#1
mihosa

mihosa

    Newbie

  • Members
  • PipPip
  • 19 posts
Hello. I would like to know how it is possible to insert an external file of javascript code in html files.

I have a javascript code for changing the size of the letters in a website, and i would like to linked it in all the pages of my website.

Below, I am uploading two files, one with the javascript code, and another html file, in which i would like to insert the javascript code.

I am waiting for your response

Thanks in advance !!!

Attached Files



#2
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
You'll want to put the Javascript into it's own file (preferably with a .js extension). Then you will want to put this line into the <head> of each page:
<script type="text/javascript" src="[javascript filename]"></script>
Have fun :D
Latinamne loqueris?

#3
mihosa

mihosa

    Newbie

  • Members
  • PipPip
  • 19 posts
Hello !! First of all thanks for the reply. I tried your code but unfortunately, didn't work for me. :mad:

I cannot understand what i am doing wrong.



That's the code I am using for calling the js file as you told me before:





<html>
<head>
<script type="text/javascript" src="changelettersize.js"></script>
</head>


and this is the javascript file I use

[ATTACH]4309[/ATTACH]





but still don't working :confused::confused::confused:

Attached Files



#4
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
  • Maybe the changelettersize.js file is not in the same folder as the html file.
  • Or maybe it DOES work, but the javascript itself is not working properly.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users