What I'm trying to do is to create a link on the same page to a java applet link for which I don't have the parameters. Take a look at any of the chessboards at Chesscalisthenics.com
+1
A:
There's no "link" to xy positions, but from Javascript you could use window.scrollTo
.
KennyTM
2010-04-06 07:16:21
A:
This is not supported directly in HTML. There is a workaround: Add the xy position as a query parameter to the URL (like ...?x=...&y=...
) and add an inClick
handler to the link. The handler can examine the URL (this.href
) to get the position.
Aaron Digulla
2010-04-06 07:18:12
A:
Strictly speaking, you can't. But you can fake it - add the x,y as GET variables in the URL query string, like this:
http://yoursite.com/yourpage.htm?x=50&y=50&target=divID
In your javascript, you'd use something like window.scrollTo to jump to those coordinates, which you can pull from the query string.
Make sense?
matt lohkamp
2010-04-06 07:19:29
PS - document.getElementByID() and pass in the target parameter from the URL too, obviously.
matt lohkamp
2010-04-06 07:20:06