Hi there.
I was wondering if anyone could help me with the use of variables in scripting.
As an example, I have some images I have created which I am using in <a href ...></a>, but until I've finished designing things I won't know how many buttons there'll be or how big I'll want them. Therefore I want the ability to change the width and height values of the image in my HTML file without having to change them here, there and everywhere as I do know.
I've tried:
height_of_button = 31
width_of_button = 118
within <script language="javascript"></script>
but when I attempt
<img src ... height = height_of_button>
or
<img src ... height = &height_of_button>
the image doesn't even get rendered.
Can somebody please tell me how I use variables both:
(1) within the given HTML file
(2) globally amongst various HTML files linked together as a site
Thank you very much.
Russ.
I was wondering if anyone could help me with the use of variables in scripting.
As an example, I have some images I have created which I am using in <a href ...></a>, but until I've finished designing things I won't know how many buttons there'll be or how big I'll want them. Therefore I want the ability to change the width and height values of the image in my HTML file without having to change them here, there and everywhere as I do know.
I've tried:
height_of_button = 31
width_of_button = 118
within <script language="javascript"></script>
but when I attempt
<img src ... height = height_of_button>
or
<img src ... height = &height_of_button>
the image doesn't even get rendered.
Can somebody please tell me how I use variables both:
(1) within the given HTML file
(2) globally amongst various HTML files linked together as a site
Thank you very much.
Russ.