Cool,
Here is what I came up with...
<script type="text/javascript">
<!--
img1=new Image()
img1.src="/xwiki/bin/download/Sandbox/WebHome/AEBtn0.jpg"
img2=new Image()
img2.src="/xwiki/bin/download/Sandbox/WebHome/AEBtn1.jpg"
//-->
</script>
<a href="/xwiki/bin/view/Main/"
onMousedown="document.images\['example'\].src=img2.src"
onMouseup="document.images\['example'\].src=img1.src">
<img src="/xwiki/bin/download/Sandbox/WebHome/AEBtn0.jpg"
name="example"
border=0></a>
glad to see there is more than one way to skin that cat.
Ollie
Mike Oliver wrote:
\]Ok I found the \['example'\] but that leaves
the AEBtn_0.jpb
I am trying to manipulate some image files using JavaScript.
But when I insert a tag as follows the javascript []'s get interpretted as
a
wiki link,
<a href="/Sandbox/WebHome"
onMousedown="document.images['example'].src=img2.src"
onMouseup="document.images['example'].src=img1.src">
<<mg src={image:AEBtn_0.jpg} name="example"
border=0></a>
{image:something.jpg} outputs not just the address of the image, but the
whole img tag. You should use $doc.getAttachmentURL('something.jpg')
--
View this message in context:
http://www.nabble.com/JavaScript-image-manipulation-tp17177802p17179696.html
Sent from the XWiki- Users mailing list archive at
Nabble.com.