![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
|
How?!?!?!?!?!?!?!
How Does The Javascript "#" Deal Work? For Example : http://websiteurl.com/websitefile.html#content If You Know Explain How I Setup The Code For My Site.
|
|
|
|
|
|
#3 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)
|
Re: How?!?!?!?!?!?!?!
Hey, i haven't done this is js, though i know it can be done....
Basicallyyyyy: - Set up a form with the action being the new page and the method being "post" Code:
<form action="nextPage.html" method="post"> <input type="text"...> <submit value="submit" /> </form> Anyway, theres an in-depth description here: http://www.htmlgoodies.com/beyond/ja...le.php/3471111 Of course if you dont want it to be form-based then you can make the item's hidden then modify them using js(in the origional page)... e.g. (<input type="hidden"...>.............. [hiddenItem].value=value to pass) Then there isn't an annoying form on your site's main page which doesnt need to be there... Also, (the reason this isn't commonly done) is that a lot of people disable javascript hence most scripts should be "unobtrusive" in that your site functions the same way and does not rely on javascript for functionality. (normally this is used as a way to pass info in PHP) Cheers, Jamey |
|
|
|
|
|
#5 (permalink) |
|
Design Team Member
Join Date: Feb 2008
Location: Deming, NM
Posts: 288
OS: XP SP2 & Vista
|
Re: How?!?!?!?!?!?!?!
Taken from www.w3schools.com
Code:
<html> <body> <p> <a href="#C4">See also Chapter 4</a> </p> <p> <h2>Chapter 1</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 2</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 3</h2> <p>This chapter explains ba bla bla</p> <h2> <a name="C4">Chapter 4</a></h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 5</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 6</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 7</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 8</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 9</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 10</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 11</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 12</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 13</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 14</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 15</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 16</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 17</h2> <p>This chapter explains ba bla bla</p> </body> </html> Hope that explains it for you.
__________________
|
|
|
|
|
|
#8 (permalink) |
|
Registered User
Join Date: Mar 2008
Location: South East England
Posts: 72
OS: Windows Vista 32bit Home Premium
|
Re: How?!?!?!?!?!?!?!
Now i know the problem i am pretty sure that the '#' takes you to a specific span/div ID in the page
For example the #content on the end of the url is taking you to the 'content' (main infomation part) div on the web page Last edited by Killer Squirrel : 07-09-2008 at 03:38 AM. |
|
|
|
![]() |
| Thread Tools | |
|
|