GulfImages
Technical User
Hello All,
I have a shopping cart I'm working on for my website and I have a table with 2 cells side-by-side. The first cell has a picture, the second a form with print sizes, pricing etc.. I decided to build this table with JS because I have some pricing and discount structure in a JS file that I can change, just in that file, and update all my gallery pages.
In my JS file I have to items that I would like to reference a file name from the HTML page but cannot figure out how to do it.
Here are the items:
'<img id="imgborder" src="1771.jpg" width="450" height="300">',
I would like to set a variable or whatever in my html for the name of the file "1771.jpg" and reference it into the <img> tag shown above. Can it be done?
I also have this function in my JS:
'SetImg (\'1771_thm.jpg\');',
I would like to be able to reference the name of that file "1771_thm.jpg" from my HTML page into my script.
Can I declare a variable in the HTML page than reference it into the above statements?
Thanks,
Bobby
I have a shopping cart I'm working on for my website and I have a table with 2 cells side-by-side. The first cell has a picture, the second a form with print sizes, pricing etc.. I decided to build this table with JS because I have some pricing and discount structure in a JS file that I can change, just in that file, and update all my gallery pages.
In my JS file I have to items that I would like to reference a file name from the HTML page but cannot figure out how to do it.
Here are the items:
'<img id="imgborder" src="1771.jpg" width="450" height="300">',
I would like to set a variable or whatever in my html for the name of the file "1771.jpg" and reference it into the <img> tag shown above. Can it be done?
I also have this function in my JS:
'SetImg (\'1771_thm.jpg\');',
I would like to be able to reference the name of that file "1771_thm.jpg" from my HTML page into my script.
Can I declare a variable in the HTML page than reference it into the above statements?
Thanks,
Bobby