Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > BOOK: Beginning HTML, XHTML, CSS, and JavaScript
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML, XHTML, CSS, and JavaScript
This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 28th, 2014, 08:25 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Problem Linking back to same page

Hello folks!!!

Its very irritating but I had once easily linked back to links on same page. but somehow this isn't working now.Any help in debugging the following code?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <title>Example Cafe-community cafe in Newquay,Cornwal,UK</title></head>
<body>
<h1>Example Cafe</h1>
<a href=“index.html”>HOME</a>
MENU
<a href=“recipes.html”>RECIPES</a>
<a href=“contact.html”>CONTACT</a>
<p>
<h2><a id=“top”>Example Cafe Menu</a></h2>
<h2><a id=“starters”>Starters</a></h2>
<h2><a id=“main courses”>Main Courses</a></h2>
<h2><a id=“desserts”>Desserts</a></h2>
<a href=“#starters”>Starters</a>|
<a href=“#maincourses”>Main Courses</a>|
<a href=“#desserts”>Desserts</a>
</p>
<h2>Menu</h2>
<h2><a id=“starters”>Starters</a></h2>
<ul>
<li>Chestnut and mushroom Goujons</li>
<li>Paneer Chatpati</li>
<li>Mushroom Fry</li>
<li>Chicken Lollipop</li>
</ul>
<p><small><a href=“#top”>Back to top</a></small></p>

<h2><a id=“starters”>Starters</a></h2>
<ul>
<li>Spinach and ricotta roulade</li>
<li>Beef tornado with mustard</li>
<li>Veg Hakka</li>
<li>Chicken Fried Rice</li>
</ul>
<p><small><a href=“#top”>Back to top</a></small></p>

<h2><a id=“desserts”>Desserts</a></h2>
<ul>
<li>Fruit Delight</li>
<li>Milkshake</li>
<li>Cheesecake</li>
<li>Vanilla creamsticks</li>
</ul>
<p><small><a href=“#top”>Back to top</a></small></p>

</body>
</html>
Reply With Quote
  #2 (permalink)  
Old March 29th, 2014, 12:26 PM
Authorized User
Points: 105, Level: 2
Points: 105, Level: 2 Points: 105, Level: 2 Points: 105, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Try deleting the h2 elements at the top of the page. The id attributes will conflict with those later down the page.

And in the body of the page you seem to have the starters repeated.

Hope that helps!
Reply With Quote
  #3 (permalink)  
Old March 29th, 2014, 02:19 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got the issue rectified. Used the
Code:
name
attribute instead of
Code:
id
attribute. HOwever , still uable to figure out why the id attribute didn't function.
Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross Page Post Back problem akhilesh_g ASP.NET 2.0 Professional 2 December 24th, 2007 03:38 AM
Hot-Linking back to the same document ... asearle XSLT 4 November 15th, 2006 02:43 AM
Problem with Cross Page Post Back keaja ASP.NET 2.0 Basics 1 October 31st, 2006 06:00 AM
Re-linking the front and back end Scripts82 Access VBA 2 February 23rd, 2006 11:26 PM



All times are GMT -4. The time now is 03:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.