View Full Version : Specific linkage to off-site data?
Other than referencing anchors, such as:
<a href="whatever.html#some_name">link</a>
Is there a way to configure a link so it targets a specific section on another site's page?
pardicity3
04-17-2003, 01:20 AM
If you are trying to link to someone else's site, a site that you have no control over, the only way to target a specific part of their page would be if they already had anchor names in place. I.e. if the site you are linking to has a <a name="content"></a> on their page then you could link to them the following way and the page would scroll to that location: <a href="http://theirsite.com/home.html#content">Blah</a>.
Actually, now that I think about it, I am pretty sure that there is a javascript function scrollto(x,y); of something like that which would allow you to scroll to a certain section even if the site didn't have anchor name tags. I will look into this some more and try and post back soon, but hopefully someone will give you the answer before I can get back :thumbsup:.
pardicity3
04-17-2003, 01:31 AM
It seems I was wrong about the possibility of using the scrollto() function. It appears that scrollto() only works on the current page open, or in other words, you can only scroll your site. It looks like you may just have to get lucky and hope the other site has anchor names?
Well, that's too bad... it would be a useful feature in html :(
Thank you for looking into it :)
sage45
04-17-2003, 04:58 PM
Always remember that HTML will only work off of the loaded page... In other words, once you parse/load a new page, the previous page and it's variables are gone...
-sage-
redhead
04-17-2003, 05:25 PM
hmm... a thought: could you open it in a new window using javascript and give that window a name, and then use javascript to scroll the new window? something like this:
windowname.window.scrollto(x,y);?
would that work? i havent used javascript for a while... but methinks there is a possibility of that working...
pardicity3
04-17-2003, 09:36 PM
Seems quite reasonable redhead, though I don't think I want to take a stab at trying it ;)! Maybe if the mods find it neccesary, this post can be moved to JS where more help might be able to be given?
sage45
04-17-2003, 09:39 PM
Your wish is my command...
*thinks about that*
To an extent... :p
Moving to Javascript Help...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.