Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Bookmarks and Querystrings
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

TerryG
Junior Member

United Kingdom
179 Posts

Posted - 04 March 2002 :  09:54:11  Show Profile
Do bookmarks like "mypage.asp#mybookmark" work with QueryStrings, for example
"mypage.asp?doSearch=True#myBookmark".

I tried it and was very surprised that they didn't. Was not totally sure if bookmark should go after filename or after the querystring so tried both but neither worked. However I just noticed the following. PageA.asp contains a link to pageB.asp with a whole load of Querystrings appended to the URL like
A Href="PageB.asp?doSearch=True" etc but no bookmark.
Having used the link to get to PageB.asp if I click a link on pageB.asp to a bookmark on the same page it gets appended to the URL in the address bar ie
pageB.asp?doSearch=True#myBookmark
and it works, but like I said when I code it like that it does not seem to work, any ideas?

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 04 March 2002 :  10:14:42  Show Profile
http://www.frutzle.com/forum/forum.asp?FORUM_ID=17#top works like a charm... well, #top doesn't really say much as you can't scroll the page but it loads the correct page.



http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

TerryG
Junior Member

United Kingdom
179 Posts

Posted - 04 March 2002 :  10:25:28  Show Profile
When I said it didnt work I meant the page loaded OK but not at the bookmark, is that what you are getting?

Used the link to your forum -- WOW

Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 04 March 2002 :  11:07:04  Show Profile
let's just assume ASP and PHP should work the same when it comes to anchors:
http://www.vbulletin.com/forum/misc.php?s=320a914d2bde96fcf7b859837b1aa34b&action=faq&page=1#custom

That too works for me...



http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 04 March 2002 :  11:56:32  Show Profile
It won't work if you are using URL Redirection

I tested the following links

This won't work
http://www.forumsquare.com/forum/statistics.asp?themeid=26#themes

This works

http://68.37.57.141/forum/statistics.asp?themeid=26#themes

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Edited by - GauravBhabu on 04 March 2002 11:58:41
Go to Top of Page

TerryG
Junior Member

United Kingdom
179 Posts

Posted - 05 March 2002 :  03:38:45  Show Profile
Why is that a redirection, isn't it the address of the same page just specified in different ways?

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 05 March 2002 :  07:13:17  Show Profile
I host my sit from my Home PC. So when you type in the domainname it is redirected to my IP address.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

TerryG
Junior Member

United Kingdom
179 Posts

Posted - 05 March 2002 :  09:27:27  Show Profile
quote:

I host my sit from my Home PC. So when you type in the domainname it is redirected to my IP address.


Thanks, now I understand.
Dont know why I thought it didnt work when I 'tested' it because I just did it again and it was fine. However like a number of occasions in the past talking to you people has helped me realise that what I was trying to do was a little optimistic anyways. My target page was not specified in the <a href='tagetpage.asp'> but in an onClick event ie
Response.Write"<A href=""#"" onClick = ""self.close();window.opener.location.href='page2.asp?doSearch=" & Request.Form("doSearch") & "&SrchText=" & Request.Form("srchText") & "&ddPostCode=" & Request.Form("ddPostCode") & "&findTennant=" & Request.Form("TennantID") & "'"">Close Window</A>"
Maybe I should not be surprised that appending a bookmark did not work! Anyway I got over it by passing the bookmark as another name/vale pair in the querystring which is used by a little javascript function on page2.asp to find the right bit of the page.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07