Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on redirect

Status
Not open for further replies.

zac9393

Technical User
Apr 14, 2008
2
Hello.

I have on first page, one div element, which, when user clicks, collect coordinates and send them on second page. In that div i have javascript function for collecting coordinates, and javascript function which is making querystring, and send me to another page.

here is function for redirecting:

function Go(x, y) {
var a = document.getElementById("Text3");
var b = document.getElementById("Text4");
c = a.value;
d = b.value;
window.location = "SecondPage.aspx?X = " + c + " &y = " + d;
}

On my first page, on div on which I collect coordinates, i placed some image, and when i click on image, i want to redirect to some another site.

here is html of that image:

<a href="somesite" target="_blank"><img id="img2" src="image.jpg" alt="" /></a>

Problem is that when i click a image, Go function in div element send me to another page, and not to some other site.

I think i must put some code in go function, that says that I'm not clicking a div, than i clicking a image..

If someone can help me in this...
 
I'm no expert but it looks to me like you're setting the image to go to some other page when clicked:
<a href="somesite" target="_blank"><img id="img2" src="image.jpg" alt="" /></a>
This says clearly that the image is an anchor to "somesite".

I think you want a "MAP", not an "IMG".

_________________
Bob Rashkin
 
yes, map is ok, but i used imgs for other reasons, if i put map, i can't place another picture on map image
 
You say div. Where is it? Why is Go function? In the Go() what are they for, x and y? Why query X uppercase and y lowercase? Are you sure what you are doing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top