Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Web Programming with HTML, XHTML, and CSS, 2nd Edition ISBN: 978-0-470-25931-3
This is the forum to discuss the Wrox book Beginning Web Programming with HTML, XHTML, and CSS, 2nd Edition by Jon Duckett; ISBN: 9780470259313
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Web Programming with HTML, XHTML, and CSS, 2nd Edition ISBN: 978-0-470-25931-3 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 Search this Thread Display Modes
  #1 (permalink)  
Old May 9th, 2009, 06:45 PM
Registered User
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default forms

Im a complete beginner. I have been reading chapter 5 on forms but when i try to validate the code on page 146 i am told that it is in error. I am told that a form element cannot hold input children. The input element has to be enclosed in a p element for example.
Is this true? is the code on page 146 incorrect? or am i doing something unbelievably stupid
Reply With Quote
  #2 (permalink)  
Old December 6th, 2009, 11:51 AM
Registered User
 
Join Date: Dec 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What you have to remember is that many of the code examples shown are examples on ONLY that part of the code. The author is assuming that you'll understand that the example (below) is nested inside the basic shell that you learned in chapter 1.

Remember that when you see:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<form action="http://www.example.org/search.aspx" methog="get" name="frmSearch">
Search:
<input type="text" name="txtSearch" value="Search for" size="20"
maxlength="64" />
<input type="submit" value="Submit" />
</form>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

what they're saying is this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title></title>
</head>
<body>
<form action="http://www.example.org/search.aspx" methog="get" name="frmSearch">
Search:
<input type="text" name="txtSearch" value="Search for" size="20"
maxlength="64" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For the examples to show on a web page you need to include - at an absolute minimum - the following tags:
<html>
<head>
<title>
</title>
</head>
<body>
The code from the examples here.
</body>
</html>

Adding those should make the code show up as intended on the web page.

What I did was make a HTML starting template and when I start a new HTML page I start with the template that follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title></title>
</head>
<body>


</body>
</html>

Then I just put the curser between the <title> tags or the <body> tags to start writing.

Hope this helps if you're still around.

Last edited by edwait; December 6th, 2009 at 11:57 AM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forms ghall202 Access VBA 5 February 13th, 2007 10:32 AM
Forms and Sub forms Mink Access 1 December 1st, 2004 08:38 AM
Opening forms from other forms Paulsh Access VBA 1 September 30th, 2004 06:54 PM
regarding Forms spraveens Beginning PHP 4 February 16th, 2004 03:31 PM



All times are GMT -4. The time now is 06:13 AM.


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