I have a variable number of images - of a house (the rooms) - that I want to show on a web page. I want to preload these images for fater showing. I use the "onmouseover = " to display these images on the right of a screen when you hold the mouse over a thumbnail on the left of a screen.
When I hard code this routine it works great. The problem I have is the file locations are in a mysql database. I can pull them out and into a php variable $TheDiskLocation. I need to then get the value to a javascript routine to preload the images. How can I get the value to javascript from php?
I have been trying to use an input field that php can update and that javascript can then read also. Is this the way?
If you have an the following input field:
<input type="text" name="TheDiskLocation">
and your read the mysql database and do say:
$TheDiskLocation = $row['filelocation'];
Does this update the input field just by placing the value in the php variable $TheDiskLocation? If so I can then read the value with javascript with something like:
document.form.TheDiskLocation.value.
Can't seem to get the above to process to work.
Any help you would be greatly apprecaited.
Thx