not a big javascript guru so I need some help...
this is my JS
the link to call up the function...
now, I need to be able to define the var IMAGEVAR in the link, so that when it when you click it it redirects to a different page based on whatever the IMAGEVAR is.
for example, the image is '16' when you click the link, it needs to ask you to confirm (which it does fine) then redirect you to
can someone give me some pointers?
or point me to a site that can help me with this?
Thanks,
this is my JS
Code:
<script language="JavaScript">
function myConfirm(){
var answer=confirm("Are you sure you want to remove this image \? If this image is in use some items may not display correctly.")
if(answer)
window.location="image.php?in=remove&previmage=IMAGEVAR"
}
</script>
the link to call up the function...
Code:
<a href="javascript:void(0)" onclick="myConfirm()">[Remove Page]</a>
now, I need to be able to define the var IMAGEVAR in the link, so that when it when you click it it redirects to a different page based on whatever the IMAGEVAR is.
for example, the image is '16' when you click the link, it needs to ask you to confirm (which it does fine) then redirect you to
Code:
image.php?in=remove&previmage=16
can someone give me some pointers?
or point me to a site that can help me with this?
Thanks,