Forum Moderators: open

Message Too Old, No Replies

problem with <button>

how to make it valid?

         

KathyJones

3:17 am on Apr 18, 2003 (gmt 0)

10+ Year Member



Here's my code:
<td>
<button>
<name>Click Here</name>
<type>submit</type>
</button>
</td>

The error was:
"element "NAME" undefined (explain...). "

what's wrong?

grahamstewart

3:27 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you mean..

<input type="submit" value="Click Here">

KathyJones

3:27 am on Apr 18, 2003 (gmt 0)

10+ Year Member



the error messages shows that both "NAME" and "TYPE" are undefined, how to define them?

DrDoc

3:28 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Attributes are to be placed inside the tag...

<button type="submit" name="whatever">Click me</button>

However, in this case that's not what you want to do. Instead, this is what you mean:

<input type="submit" value="Click me">

DrDoc

3:29 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how to define them

You can't define them. If they are not valid tags, as defined by the document type you're using, they're not - and there's nothing to do about that.

KathyJones

3:31 am on Apr 18, 2003 (gmt 0)

10+ Year Member



so I did the following, and this time the error says that <input> is not allowed here. Shall I add anything else besides this?

<button>
<input type="submit" value="Click Here">
</button>

DrDoc

3:35 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Take out the <button> and </button> tags. They are not necessary.

KathyJones

3:38 am on Apr 18, 2003 (gmt 0)

10+ Year Member



thank you, but the point was to use the <button> tag, I was just trying to do an example of <button> and see how I can use it. Would you give me a better simple example of how <button> is used then? I appreciate it.

grahamstewart

3:42 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And you can only use <input> inside a <form>.

Kathy: as a general point of netiquette..

Please try to avoid posting loads of threads on essentially the same topic. Its called 'flooding' and it tends to upset some people because other threads get pushed further down the list.

It's usually much better to post a single thread called something like 'Beginner needs help with validation' and then put all your questions in there.

Sorry if that sounds a little snotty, but I thought I better point it out before someone starts flaming you.

ShawnR

3:44 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Kathy

Per my previous post in another thread, it seems to me that you are probably doing things the hard way... I gather you are just using a plain text editor? Admirable! Something like notepad? Probably not that admirable! Try get one that has syntax highlighting, there are plenty of good free-ware or share-ware ones available (e.g. crimson editor or UltraEdit. That way you will be able to see some of your errors as you type, and then can look the correct syntax up on the w3c site.

Shawn

Added: Just read my post, and saw that it may come across unfriendly. Sorry. I did not mean to imply that you shouldn't ask questions; just that for some syntax problems you'd find the answer quicker by just looking it up, rather than by posting the question. Of course, if you get stuck everyone of this board is very helpful...

[edited by: ShawnR at 3:48 am (utc) on April 18, 2003]

DrDoc

3:44 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<button>Any <b>HTML</b> can go here<br>
<img src="http://showcase.netins.net/web/phdss/WebmasterWorldgfx/dlogo.png" alt="Webmaster World"></button>

I believe that should work :)

KathyJones

3:45 am on Apr 18, 2003 (gmt 0)

10+ Year Member



Actually I appreciate your suggestion. (Sorry, beginner html learner, and new to webmasterworld.com!) so how do I make sure I only post one thread, and the following are all regular messages?

DrDoc

3:46 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And, grahamstewart is right... Thanks for stating that in such a nice way though, gs :)

DrDoc

3:47 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how do I make sure I only post one thread

For example, only post further questions in here ;)

grahamstewart

3:48 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try get one that has syntax highlighting, there are plenty of good free-ware or share-ware ones available

Try Textpad [textpad.com] - thats what I use and I'm supposed to be a professional (so I'm told anyway).

grahamstewart

3:53 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how do I make sure I only post one thread

The 'Post New Topic' button creates a new thread (aka topic).
The 'Post Reply' button posts a reply to the thread you are reading.

So generally speaking, use 'Post New Topic' to start a new thread on a particular subject, and then just keep reading it and using the 'Post Reply' button.

ShawnR

3:56 am on Apr 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"...Try Textpad..."

... and if you really get sophisticated, you could probably define a macro in textpad to open up your browser and look up the word that the cursor is on, in the w3c site.

Shawn

KathyJones

11:13 pm on Apr 18, 2003 (gmt 0)

10+ Year Member



Thanks for all! I've actually been using Dreamwaver MX as an editor. By the way, what are some other tood tutorial/learning sites for resources related to HTML, XHTML, CSS, and JavaScript? (besides w3c which is confusing at times)

takagi

12:03 am on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try DevGuru. From this HTML overview [devguru.com] you can also go to other topics like XHTML, CSS and JavaScript through the <Quick References> at the left side of their page.

txbakers

2:25 am on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I also recommend w3schools.com .

I still visit their site and get information .

tedster

6:10 am on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Besides using online references, I recommend building a physical reference library in the areas of technology you use frequently. O'Reilly is kind of the standard, and I've got quite a few dog-eared "animal" books on my shelf.

In some ways I'm old fashioned about print references. Before a company publishes a book, I feel they research more thoroughly. I've seen too much that was just plain wrong online to trust the web as my only source of information. And I've banged my head trying to do what some web page told me was right, only to discover it wasn't right at all.

It's good to have a second opinion at times like that.

ShawnR

6:26 am on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not used Dreamwaver MX before, but I am surprised it doesn't have features to highlight incorrect syntax, and context sensitive help to show correct syntax, examples, etc. I know other much cheaper web editing packages do.

(Not saying you shouldn't use on-line references, tutorials, and this board as aditional resources, just saying I am surprised)

Further to Ted's post re building a physical reference library, I have sometimes found very good deals at discount outlets, where they try to get rid of a previous edition of a book at about 10% of list price because the new edition has come out. Technology moves so quickly, so if you choose wisely you can get books that are still very relevant (e.g. HTML 4.01, XHTML 1.0). Because of the price difference you can afford to buy a beginner book, an intermediate book and a couple of advanced references, and still come out on top...

Shawn

KathyJones

9:01 pm on Apr 20, 2003 (gmt 0)

10+ Year Member



So what's the easiest way to validate a site that I build?
I usually go to the validate site [validator.w3.org...] browse for my html file, and click validate. But every time I fix something and need to validate it again, I need to go back, browse again for the file and click again to validate. Is there an easier way of doing this? (just like compiling our code in any other language, there's always a command, keyboard shortcut, or button to compile, something quick and easy like that....)

txbakers

9:24 pm on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like the validator here, because you can simply paste in your HTML code.

Since I'm using ASP/JSP, I don't get to see the code until it is rendered through View Source. Then I just cut paste into the validator here:

www.htmlhelp.com/tools/validator/direct.html

KathyJones

9:35 pm on Apr 20, 2003 (gmt 0)

10+ Year Member



I found out how to use the validator in Dreamwaver MX which has a keyboard shortcut. It shows the syntax errors, and I think this is the highlight feature in common editors that Shawn was talking about (am I right?). But are these editors' validators the same as the validator at [validator.w3.org?...] In other words, can I just trust it and assume there the web page contains no errors if it passes dreamwaver's validator?

ShawnR

10:43 pm on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know Dreamweaver, so not sure how good its validator is. Either way, to be sure you should validate properly before publishing. Just use the built in tool to speed things up.

In addition to a validator, I would have thoght Dreamweaver has:
- syntax highlighting (all 'tags' are coloured one colour, all 'attributes' are coloured another, 'comments' a third colour, etc)
- auto-completion (for example when you type <tab it fills in <table).
- wizard features (e.g. "insert a table here")
- Language reference (e.g. show me all the legal attributes of the <table> tag, and an example of how to use)

Have a look in the help menu. I'd be surprised if it didn't have these features, given how expensive it is.

Shawn