Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 24th, 2010, 09:00 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jan 2005
Location: Florida
Posts: 5,091 hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 3 Months 2 Weeks 6 Days 21 h 50 m 36 sec
Reputation Power: 5048
URL to automatically jump to a section of the page

So.. wasn't sure where to put this, but was wondering if there was a way to automatically go to a section of the page by adding something to the URL...

Basically, there's a website that has a bunch of articles on it. One written by someone who wants to link to it in her portfolio. Right now, it's the last article on the page, however, later on, more articles will be added. So, if the article was titled "Summer Beans", is there something I can add to the URL to bring that section of the page to the top of the browser so a visitor doesn't need to scroll down to the bottom (or to wherever the article is located)..?

Thanks.. if you need further clarification, let me know.
__________________
"I don't need to get a life. I'm a gamer. I have lots of lives!"

Reply With Quote
  #2  
Old May 24th, 2010, 10:45 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,383 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 20 h 49 m 30 sec
Reputation Power: 4080
Only if the page has anchor tags in it (<a name="foo"></a>).

Then you can make your URL like this:
http://www.mysite.com/page.html#foo

and the browser will scroll down to the relevant section.

For example, this page has anchor tags on it, and I can bounce you to a specific section like this:
http://www.gnu.org/software/emacs/m...acs.html#Screen
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Last edited by Scorpions4ever : May 24th, 2010 at 10:49 PM.

Reply With Quote
  #3  
Old May 25th, 2010, 10:12 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jan 2005
Location: Florida
Posts: 5,091 hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 3 Months 2 Weeks 6 Days 21 h 50 m 36 sec
Reputation Power: 5048
Quote:
Originally Posted by Scorpions4ever
Only if the page has anchor tags in it (<a name="foo"></a>).

Then you can make your URL like this:
http://www.mysite.com/page.html#foo

and the browser will scroll down to the relevant section.

For example, this page has anchor tags on it, and I can bounce you to a specific section like this:
http://www.gnu.org/software/emacs/m...acs.html#Screen


Thanks for the reply. Was hoping there was some way without using anchors as she doesn't have access to the code. Just an article she wrote that was published on a site. Oh well... Figured I'd try... Thanks

Reply With Quote
  #4  
Old May 26th, 2010, 10:06 AM
srisa srisa is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2006
Location: I'm sneaking up behind you.
Posts: 1,490 srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 19 h 21 m 45 sec
Reputation Power: 831
Have a div (or any element for that matter) with an id, like so <div id="myid"> .
http://mysite.com/mypage.php#myid , you will be taken to the section of the page that contains <div id="myid">.
__________________
Why do we always seek someone, something or some thought? Are we afraid of ourselves?

Reply With Quote
  #5  
Old May 26th, 2010, 12:47 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jan 2005
Location: Florida
Posts: 5,091 hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)hiker User rank is General 61st Grade (Above 100000 Reputation Level)  Folding Points: 33832 Folding Title: Starter FolderFolding Points: 33832 Folding Title: Starter Folder
Time spent in forums: 3 Months 2 Weeks 6 Days 21 h 50 m 36 sec
Reputation Power: 5048
Quote:
Originally Posted by srisa
Have a div (or any element for that matter) with an id, like so <div id="myid"> .
http://mysite.com/mypage.php#myid , you will be taken to the section of the page that contains <div id="myid">.


As I mentioned in my last post, she doesn't have access to the code. I wasn't sure if there was some parameter that you could pass in the URL to essentially search for keywords or something (http://www.domain.com/page.aspx?search=String%20Beans)... Figured there wasn't, but as I've never needed this before, I hadn't done a lot of searching on the matter. When this question was presented to me is when I started looking on google and then asking in here.

Thanks.

Reply With Quote
  #6  
Old May 27th, 2010, 03:36 AM
srisa srisa is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2006
Location: I'm sneaking up behind you.
Posts: 1,490 srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level)srisa User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 19 h 21 m 45 sec
Reputation Power: 831
Sorry, overlooked that part of the post. AFAIK, it is not possible without access to the code.

Reply With Quote
  #7  
Old March 7th, 2013, 05:45 PM
jacob22berk jacob22berk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 6 jacob22berk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 16 m 50 sec
Reputation Power: 0
Is it ever possible to create a URL that jumps to class="foo"?

Is it ever possible to create a URL that jumps to class="foo"?

I have never seen this using regular HTML.

Obviously, jumping to class="foo" isn't the same as jumping to id="bar" (where in the latter, you could simply create a URL of URLgoesHere#bar).

But does anyone know of a Javascript snippet that could force a URL (when clicked) to open the primary URL and jump down the page to say .foo(0) (i.e., the first appearance of class="foo")?

Reply With Quote
  #8  
Old March 7th, 2013, 05:50 PM
jacob22berk jacob22berk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 6 jacob22berk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 16 m 50 sec
Reputation Power: 0
Quote:
Originally Posted by jacob22berk
Is it ever possible to create a URL that jumps to class="foo"?

I have never seen this using regular HTML.

Obviously, jumping to class="foo" isn't the same as jumping to id="bar" (where in the latter, you could simply create a URL of URLgoesHere#bar).

But does anyone know of a Javascript snippet that could force a URL (when clicked) to open the primary URL and jump down the page to say .foo(0) (i.e., the first appearance of class="foo")?


As a side note, it can be simple to find a div (with id="bar") that is close to the class element you are trying to create a URL to jump to, and use that as a sort of hack, i.e., URLgoesHere#BARthatisclosetoFOO

Reply With Quote
  #9  
Old March 8th, 2013, 03:42 PM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
Likely to be eaten by a grue.
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Oct 2006
Location: Pennsylvania, USA
Posts: 9,791 ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)  Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 3 Weeks 14 h 53 m 20 sec
Reputation Power: 6112
Hiker, I had this idea in college, and me and my Exploiting the Information World group hacked at it for nearly a month before giving up. Sadly, the best you can do is abuse the link IDs if there are any, or tell people how to use ctrl+f.
__________________
HEY! YOU! Read the New User Guide and Forum Rules

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > URL to automatically jump to a section of the page

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap