I noticed you are using innerHTML. That may only work with IE.
Also, you have this:
I saw no items called largePhoto. Also, since you mentioned that this is in a loop, if you have two items with the same id, js will get confused and not do anything.
so if I add the ID="LargePhoto" in my image in the cfloo
p it will not work properly either. Is there a better way to write this section so it will work in all browsers and give ea
ch image an ID? I'm trying to pass the actual image size to this as well. I have it set as 2 tables in the databas
e. here is my query:
<CFQUERY name="cuMag" datasource="#APPLICATION.dataSource#">
SELECT Name, MYFile, Body, hight, width
Any help would be more then appreciated.
To get js to work, any object you wish to reference has to exist exactly once. If you are doing something inside a loop, you will have to do something to make any relevent element names unique.
For troubleshoot js, I usually use window.alert(); It's tedious, but, a combination of outputting variables and moving the line calling the alert eventually allows me to figure out why things are not working.