By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,246 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,246 IT Pros & Developers. It's quick & easy.

GET url plus #gohere

P: n/a
I have a page with a number of images. Before each image, there is a
link <a name="#image_id"></a> with the appropriate image_id value. The
page can be reached by way of a GET form. The question is how to include
the #image_id in the GET url in such a way that the browser will
automatically scroll to that image.

The GET url:
http:\\baseurl.com\form_action?value1=something&va lue2=something#image_id
only works in Windows IE, not Mozilla or MAC Safari.

In Mozilla, the url that shows up at the top of the page has the
#image_id dropped:
http:\\baseurl.com\form_action?value1=something&va lue2=something
and the browswer sits at the top of the page and doesn't scroll down.

Does anyone know how to get this to work cross-browser?

(unfortunately, I can't give the working url as it is on a site that
requires a log in. I hope I've given enough information. Please let me
know if there is any more info that would be helpful.)

Thank you,
--
Christine

Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Christine Forber" <fi*******@lastname.net> wrote in message
news:ll*********************@twister01.bloor.is.ne t.cable.rogers.com...
I have a page with a number of images. Before each image, there is a
link <a name="#image_id"></a> with the appropriate image_id value. The
page can be reached by way of a GET form. The question is how to include
the #image_id in the GET url in such a way that the browser will
automatically scroll to that image.

The GET url:
http:\\baseurl.com\form_action?value1=something&va lue2=something#image_id
only works in Windows IE, not Mozilla or MAC Safari.

In Mozilla, the url that shows up at the top of the page has the
#image_id dropped:
http:\\baseurl.com\form_action?value1=something&va lue2=something
and the browswer sits at the top of the page and doesn't scroll down.

Does anyone know how to get this to work cross-browser?

(unfortunately, I can't give the working url as it is on a site that
requires a log in. I hope I've given enough information. Please let me
know if there is any more info that would be helpful.)

Thank you,
--
Christine


The user has to d/l the whole page of pics and then be sent to one by a
form?

Why on earth do you want to do that? If I understand you, they hit a form
button and then the browser d/l's a whole page of pics and goes to one of
them. Unless all your users have a supersonic connection speed this is
doomed. Put each pic on its own page and both of these problems are solved.

Is there some sort of computation that's done to the form to choose the pic
you're shunting them to? If not, why not a simple A link?
Jul 20 '05 #2

P: n/a
Christine Forber wrote:
I have a page with a number of images. Before each image, there is a
link <a name="#image_id"></a> with the appropriate image_id value.


The 'name' attribute value shouldn't include the '#' sign. It is
used where you specify an URL to designate the particular anchor:

<a name="image_id"><img alt="[ img_id ]" src="..."></a>

and you could have a link element (A with 'href') which points to
the above anchor:

<a href="#image_id">ImgID</a>

if the link is in the same document or if the link is in external
document:

<a href="<URL_path>#image_id">...

Probably, if you want to include '#' in the anchor name you should
escape it in the URL and the 'href' value:

<a href="#%23image_id">...

but I'm not 100% sure if this would work, too.

--
Stanimir
Jul 20 '05 #3

P: n/a
Neal wrote:
"Christine Forber" <fi*******@lastname.net> wrote in message
news:ll*********************@twister01.bloor.is.ne t.cable.rogers.com...
I have a page with a number of images. Before each image, there is a
link <a name="#image_id"></a> with the appropriate image_id value. The
page can be reached by way of a GET form. The question is how to include
the #image_id in the GET url in such a way that the browser will
automatically scroll to that image.

The GET url:
http:\\baseurl.com\form_action?value1=something& value2=something#image_id
only works in Windows IE, not Mozilla or MAC Safari.

In Mozilla, the url that shows up at the top of the page has the
#image_id dropped:
http:\\baseurl.com\form_action?value1=something& value2=something
and the browswer sits at the top of the page and doesn't scroll down.

Does anyone know how to get this to work cross-browser?

(unfortunately, I can't give the working url as it is on a site that
requires a log in. I hope I've given enough information. Please let me
know if there is any more info that would be helpful.)


The user has to d/l the whole page of pics and then be sent to one by a
form?

Why on earth do you want to do that? If I understand you, they hit a form
button and then the browser d/l's a whole page of pics and goes to one of
them. Unless all your users have a supersonic connection speed this is
doomed. Put each pic on its own page and both of these problems are solved.

Is there some sort of computation that's done to the form to choose the pic
you're shunting them to? If not, why not a simple A link?


The user does a search and gets a bunch of images (thumbnails) that meet
the search criteria. They may then choose to do a number of actions on
any of these images, eg download the high res version or save the image
into a "lightbox" for future reference. To save into a "lightbox", they
click on a link that sends the request to the server in the form of a
GET url. The server does the processing and returns the user to the same
page, with the GET url. We want the user to be returned to the point on
the webpage where they were before, to the image that was added to the
"lightbox". The url shown above, takes the user to the image in question
in IE, but not in Mozilla or Safari. In those two browsers, the user is
returned to the top of the page, not scrolled down to the image.

--
Christine

Jul 20 '05 #4

P: n/a
Stanimir Stamenkov wrote:
Christine Forber wrote:

I have a page with a number of images. Before each image, there is a
link <a name="#image_id"></a> with the appropriate image_id value.

The 'name' attribute value shouldn't include the '#' sign. It is
used where you specify an URL to designate the particular anchor:

<a name="image_id"><img alt="[ img_id ]" src="..."></a>

and you could have a link element (A with 'href') which points to
the above anchor:

<a href="#image_id">ImgID</a>

if the link is in the same document or if the link is in external
document:

<a href="<URL_path>#image_id">...


Thank you. Removing the "#" (and the spaces that somehow had crept into
the anchor tag and weren't obvious when editting in NotePad) solved the
problem. The <a
href="<URL_path>form_action?value1=something&value 2=something#image_id">
works properly now in IE, Mozilla and NS.

--
Christine

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.