Click to See Complete Forum and Search --> : open window


Count_Rugen
01-15-2003, 08:13 PM
I dont know a thing about javascript, and am trying to fix a little problem in a site that a friend has worked on.
I need to click on a picture, then have it open in its own window. I am currently using the following line to do so:

<A HREF=\"javascript:location='".$from_file."view.php?sid=$id'; window.open('images/$image', 'image_window', 'HEIGHT=$display_height, WIDTH=$display_width, top=300, left=300, scrollbars=no')\">

which works fine, but causes the main page to reload, which i dont want it to do.

what can i do about this?

fluffycow
01-15-2003, 08:25 PM
the best solution would probably be to do whatever it is you're trying to do with an onclick, with the href set to null(#)

<A HREF="#" onclick="put stuff to do here">

Doing it this way shouldn't refresh the page