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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
Thread Tools
Old 07-07-2008, 07:44 PM   #1 (permalink)
Registered User
 
XP On CD's Avatar
 
Join Date: Jul 2007
Location: My Computer Screen
Posts: 38
OS: XP SP3 Home

My System

Send a message via ICQ to XP On CD Send a message via AIM to XP On CD Send a message via MSN to XP On CD Send a message via Yahoo to XP On CD Send a message via Skype™ to XP On CD
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.
XP On CD is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-08-2008, 04:28 PM   #2 (permalink)
Registered User
 
Join Date: Mar 2008
Location: South East England
Posts: 72
OS: Windows Vista 32bit Home Premium

My System

Re: How?!?!?!?!?!?!?!

I dont know what you mean, could you explain in a bit more detail
Killer Squirrel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-08-2008, 05:40 PM   #3 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
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>
- In "nextPage.html" parse the window.location property... e.g. Split it by # then use the second array item to decide what to do...(sorry just found a tute you can read so no point me explaining in depth).

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
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-08-2008, 05:52 PM   #4 (permalink)
Registered User
 
XP On CD's Avatar
 
Join Date: Jul 2007
Location: My Computer Screen
Posts: 38
OS: XP SP3 Home

My System

Send a message via ICQ to XP On CD Send a message via AIM to XP On CD Send a message via MSN to XP On CD Send a message via Yahoo to XP On CD Send a message via Skype™ to XP On CD
Re: How?!?!?!?!?!?!?!

When The URL Has A # In It It Takes You To A Part Of That Page.
XP On CD is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-08-2008, 06:26 PM   #5 (permalink)
Design Team Member
 
Jaxo's Avatar
 
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>
The code is bold red. First link points to page link of chapter 4. I believe the target "#" does not need to be a link itself, but the above route works.

Hope that explains it for you.
Jaxo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-08-2008, 07:20 PM   #6 (permalink)
Registered User
 
XP On CD's Avatar
 
Join Date: Jul 2007
Location: My Computer Screen
Posts: 38
OS: XP SP3 Home

My System

Send a message via ICQ to XP On CD Send a message via AIM to XP On CD Send a message via MSN to XP On CD Send a message via Yahoo to XP On CD Send a message via Skype™ to XP On CD
Re: How?!?!?!?!?!?!?!

Perfect! Let Me Try Though.
XP On CD is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-08-2008, 07:22 PM   #7 (permalink)
Registered User
 
XP On CD's Avatar
 
Join Date: Jul 2007
Location: My Computer Screen
Posts: 38
OS: XP SP3 Home

My System

Send a message via ICQ to XP On CD Send a message via AIM to XP On CD Send a message via MSN to XP On CD Send a message via Yahoo to XP On CD Send a message via Skype™ to XP On CD
Re: How?!?!?!?!?!?!?!

Ok, Close It.
XP On CD is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-09-2008, 03:37 AM   #8 (permalink)
Registered User
 
Join Date: Mar 2008
Location: South East England
Posts: 72
OS: Windows Vista 32bit Home Premium

My System

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.
Killer Squirrel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 03:45 PM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82