Posts: 164
Name: James
Location: marbella & surrey
|
i have mapped image on my page which changes the text in a div element below the image, a caption changer if you will.
for some reason the caption doesn't change at all. is it not possible to edit a div elements value at runtime?
i have a workaround that i'd rather not use. i could just make the div an input.
javascript console shows no errors.
code as follows:
Code:
<area shape='rect' coords='{$row_img['coords']}' href='#' onclick='javascript:document.getElementById(\"img_caption\").value=\"" . $row_img['name'] . "\";'>
BTW: the slahes are used because the whole line is printed in a php echo.
the div element code is as follows:
Code:
<div id="img_caption" class="p"></div>
it's pro'lly something simple like wrong quotes or something but normally my sloppy code is easily debugged in the jsconsole but it reports all is well.
any input would be great.
thanks
p;
__________________
thatVilla.com - private villas direct from the owners - travel links always needed.
Last edited by purk : 09-09-2006 at 09:24 AM.
|