Is it possible for a hyperlink to call TWO URLs?

C

Chris Ianson

Hi, I have a page, with an inline frame.

When someone clicks a hyperlink I want it to go to a bookmark within the
inline frame AND THEN call a bookmark in the parent frame.

The reason for this is the bookmark in the inline frame causes the parent
frame to scroll down, which I do not want. I will therefore have a bookmark
in the parent to scroll back up again.

Any ideas oh knowledgeable ones?

Thanks ! :)
 
J

Jonathan N. Little

Chris said:
Hi, I have a page, with an inline frame.

When someone clicks a hyperlink I want it to go to a bookmark within the
inline frame AND THEN call a bookmark in the parent frame.

By bookmark I am assuming you mean and 'anchor' on the page or the
'fragment' of a URL (the part after the '#')
The reason for this is the bookmark in the inline frame causes the parent
frame to scroll down, which I do not want. I will therefore have a bookmark
in the parent to scroll back up again.

Not without reliance on JavaScript because the fragment is not
transmitted, but is handled in the browser. Frames, iframes -- all the
same, what at first seems like a simple solution winds up plague with
'little problems'.

URL? You might better solve your problem by dropping the iframe.
 
C

Chris Ianson

Not without reliance on JavaScript because the fragment is not
transmitted, but is handled in the browser. Frames, iframes -- all the
same, what at first seems like a simple solution winds up plague with
'little problems'.

URL? You might better solve your problem by dropping the iframe.

Thanks, sadly no URL as yet, and for reasons I won't go into, I have to have
the iframe there.

So there's really no way to call two URLs from one hyperlink?

E.g. say I wanted: [Click here]
And when they click there, it opens 2 windows - google.com and yahoo.com?

Thanks.
 
J

Jonathan N. Little

Chris said:
Thanks, sadly no URL as yet, and for reasons I won't go into, I have to have
the iframe there.

Surprise, surprise! Amazing how often we here that here. Usually the
reasons are not good ones.
So there's really no way to call two URLs from one hyperlink?

E.g. say I wanted: [Click here]
And when they click there, it opens 2 windows - google.com and yahoo.com?

Again no, not without requiring JavaScript. Period. But there is most
likely a much better way to do what you want if we had more information.
 
C

Chris Ianson

Surprise, surprise! Amazing how often we here that here. Usually the
reasons are not good ones.

I have a panoramic image that I want users to be able to scroll left and
right through. *Please*, no advice needed or requested on other ways to do
that because it needs to be done in HTML and an iframe is the only way.

I have placed the panoramic in an iframe, and it works perfectly. The
scroll bar of the iframe allows you to scroll left and right along the
image.

When I was users to be able to jump to the next image, I have a hotspot in
the panorama, and it loads a new image into the iframe and jumps them to the
bookmarked place on the new image.

However the downside is this causes the browser's *main* window to scroll
down to the bottom for some reason.

I simply want it to either not do that, or to scroll back up again.
So there's really no way to call two URLs from one hyperlink?

E.g. say I wanted: [Click here]
And when they click there, it opens 2 windows - google.com and yahoo.com?

Again no, not without requiring JavaScript. Period. But there is most
likely a much better way to do what you want if we had more information.

Hope you understand now, and that I'm not into dodgy sites if that is what
you were implying, but thanks for your faith :p
 
S

Spartanicus

Chris Ianson said:
I have placed the panoramic in an iframe, and it works perfectly. The
scroll bar of the iframe allows you to scroll left and right along the
image.

When I was users to be able to jump to the next image, I have a hotspot in
the panorama, and it loads a new image into the iframe

Therein may lie your problem, place the link to change to the next image
on the page itself, then you can use the target attribute to load the
image into the iframe.
and jumps them to the
bookmarked place on the new image.

You're not making any sense, bookmarks are a browser property.
 
C

Chris Ianson

Spartanicus said:
Therein may lie your problem, place the link to change to the next image
on the page itself, then you can use the target attribute to load the
image into the iframe.

Have tried that but it doesn't change the problem.
You're not making any sense, bookmarks are a browser property.

name="place1" is referred to sometimes as a 'bookmark'. A place within the
web page that the browser can jump to. E.g. index.htm#place1 will take me
to that bookmark.

I want users to be able to jump to different parts of the long panoramic
image I have placed in the iframe.

I have achieved this without any need for flash or QuickTime, by drawing a
layer on the image, and placing a bookmark in it. Now users can jump to
different parts of the image. It works perfectly, except the browser also
scrolls the main window all the way down, which causes the iframe position
to scroll up the page. It stays in view, but the stuff above it does not,
and that's the problem.

Is anyone able to advise how to call a 2nd bookmark that will reset the main
page position within the window, all from the one user click?

If it needs to be JavaScript, so be it. I'm open to suggestions, cheers
guys.
 
S

Spartanicus

Chris Ianson said:
name="place1" is referred to sometimes as a 'bookmark'.

By the ignorant perhaps, for the rest of us it's a name attribute with
presumably a named link end for use with a link fragment identifier.
I want users to be able to jump to different parts of the long panoramic
image I have placed in the iframe.

This really needs an url for us to make sense of what you are trying to
do. Upload an example it if it isn't online already.
 
B

Blinky the Shark

Chris said:
I have achieved this without any need for flash or QuickTime, by drawing a
layer on the image, and placing a bookmark in it. Now users can jump to
different parts of the image. It works perfectly, except the browser also
scrolls the main window all the way down, which causes the iframe position
to scroll up the page. It stays in view, but the stuff above it does not,
and that's the problem.

Chris, how many browsers have you checked this in?
 
M

Mark Parnell

Deciding to do something for the good of humanity, Chris Ianson
Have tried that but it doesn't change the problem.

That definitely doesn't sound right. We definitely need a URL.
name="place1" is referred to sometimes as a 'bookmark'.

I've certainly never heard it called that before. A bookmark is in most
browsers what IE calls a "Favorite".
 
D

Dan

Chris said:
I have achieved this without any need for flash or QuickTime, by drawing a
layer on the image, and placing a bookmark in it. Now users can jump to
different parts of the image. It works perfectly, except the browser also
scrolls the main window all the way down, which causes the iframe position
to scroll up the page. It stays in view, but the stuff above it does not,
and that's the problem.

It would really help if we could see an actual URL that demonstrates
this effect, so we don't just have to make blind guesses as to the
actual code you are using. A simple targetted hyperlink doesn't have
the "jumping" effect that you're citing, so perhaps you're doing some
silly thing like using an "onclick" JavaScript event on a hyperlink to
"#" alone, which indeed causes a pointless "jump" in the original page.
The best solution to this is not to do that; simply use the
destination URL in the "href" attribute and use a "target" attribute to
target the iframe. If for some reason it's actually necessary to have
an action take place in an "onclick" event without a real target URL in
the "href" attribute, you can end the JavaScript code with "return
false;" to suppress the jump, but you're still introducing
accessibility problems by not having your site work without Javascript.
 
M

Mark Parnell

Deciding to do something for the good of humanity, Blinky the Shark
They got four out of that? Not bad.

The 3rd one was the best though. Wasn't overly impressed with #4. They
went 3D, and didn't do a great job of it. Then again, it was an
improvement over Grim Fandango. :)
 
G

Guybrush Threepwood

On Thu, 23 Mar 2006 17:28:17 -0800, Blinky the Shark wrote:

[snip]

Something completely off-topic, but in your signature you state you kill
all posts coming from Google Groups. I see you also use Pan. How do you
kill by newsreader? Never got that working...
 
J

JDS

I have a panoramic image that I want users to be able to scroll left and
right through. *Please*, no advice needed or requested on other ways to do
that because it needs to be done in HTML and an iframe is the only way.

Ah, grasshopper, but that is not so. There are several viable
alternatives to producing your desired result:

* Flash
* Java applet
* Javascript/Ajax thing (a la Google Maps)
* CSS: 'overflow' and 'scroll'

Probably some others. There is always another way to do something. Not
all suggested are the "best" way; I would try for the CSS method, as it
fits your "must be done in HTML" requirement (alhtough I bet that is
broken in MSIE).

later...
 
B

Blinky the Shark

Guybrush said:
On Thu, 23 Mar 2006 17:28:17 -0800, Blinky the Shark wrote:

[snip]

Something completely off-topic, but in your signature you state you kill
all posts coming from Google Groups. I see you also use Pan. How do you
kill by newsreader? Never got that working...

Explained in general terms if you follow that sig link. :)

Pan/slrn/Xnews/others syntax:

%BOS
[*]
Score:: =-9999
Message-ID: googlegroups.com
%EOS

That's cheap (efficient) scoring. If you filter on the User-Agent header
it's expensive, since that's not included in the server's XOVER database.
So stick with what I've shown.

Put it at the top of your Score file. The equals symbol in the Score line
means "stop processing this post after this rule", so the post is plonked
before any other rules even get a look at it.

In Filters, uncheck the option to show posts with a -9999 score.

Enjoy the Improved Usenet. ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top