View Full Version : Opening in Same window - with PHP getString

06-07-2007, 03:06 AM
Ok, I have a site that requires a horizontal scrolling image viewer. I want to be able to have the user click on the image and open the same page but with the variable I need in the getString so I can pull the information out of the database that will go along with that picture. I was wondering how I would change it from what it does now (which is open a new window) to keeping it in the same window with everything else I need. Thanks!

function onclickHandler(e)
// Browser compatibility code
var targ;
if (!e){var e = window.event;}

if (e.target)
{ targ = e.target;
var xpos=(e.pageX); var ypos=(e.pageY);}

else if (e.srcElement)
{ var xpos=(event.x); var ypos=(event.y);
targ = e.srcElement;}

// Strip file name from image src
var spath=targ.getAttribute('src');
ifm= spath.substring(strippedPathLength+1,wholePathLength);
// Store file name in holder for use by popup windoow
// Open the window at location of thumbnail image
var pos = "left="+xpos+",top="+ypos;