Which way round should this form tag go?

This is a discussion on "Which way round should this form tag go?" within the Web Page Design section. This forum, and the thread "Which way round should this form tag go? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 16th, 2006, 12:19
Junior Member
Join Date: Jan 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Question Which way round should this form tag go?

Hi...

By default, Dreamweaver 4.0, generates the opening form-tag as follows, if a form-action has not been specified:

<form name="abcForm" method="post" action="" enctype="multipart/form-data">

That is, the 'form name="" comes before 'method=' which comes before the 'action='.

However, someone that has done an ASP script for me (which I know works due to recieving the results of an initial test), has put the opening form-tag in the html document containing the form the other way round; i.e. the 'action=' comes before the 'method=' which comes before 'name=', as follows:

<form action="DummyForm.asp" method="post" name="DummyName">

My questions are, why is there this difference, and would Dreamweaver (or any html editor for that matter) generate the opening form tag in the same way if a form-action was specified?

I will test this in Dreamweaver, but I find this puzzling nevertheless.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 16th, 2006, 12:24
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

Because has has hand coded whereas your generating it. But there is no difference it will still do the actions specified.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 16th, 2006, 20:24
Reputable Member
Join Date: Dec 2005
Location: Texas
Age: 19
Posts: 328
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

ditto wit sypher. It dosnt matter where it goes but with your tags always remember, "first tag open is the last tag ended".
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Mar 17th, 2006, 11:41
Junior Member
Join Date: Jan 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

Many thanks for helping me out.

So from this I take it that either
<form name="abcForm" method="post" action="" enctype="multipart/form-data">
or
<action="" enctype="multipart/form-data" method="post" form name="abcForm">
would be equally valid if no action was specified, and that either
<form action="DummyForm.asp" method="post" name="DummyName">
or
<name="DummyName" method="post" form action="DummyForm.asp">
would be equally valid if an action was specified?

Don't know if I'm understanding your replies correctly...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Mar 17th, 2006, 19:35
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

no :P

the attributes can be in any order. But it must begin with <form as that is the open tag, like <img
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Mar 18th, 2006, 03:59
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

the tag alone would be <form> or <img> although nothing would happen. everything else goes after the tag identifier. <form

then after youve added the details for that tag, you would close it. if it makes sense..

Last edited by benbramz; Mar 18th, 2006 at 04:02.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Mar 19th, 2006, 02:41
Junior Member
Join Date: Jan 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

I get it... So providing the tag starts with a '<' and ends with a '>', it doesn't matter which order everything inbetween is, as long as it makes sense.

Many thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Mar 19th, 2006, 02:55
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

no..

a <form> tag for example, obv starts with <form. it has to start with that, otherwise the browser wont know what tag it is. what you have in the middle can be be any way round, and it has to end with a >

so..

<form name="form1" method="post" action="test.aspx">
correct
<form method="post" action="test.aspx"name="form1">
correct

< method="post" action="test.aspx"name="form1" form>
Incorect
Hope this makes sense
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Mar 19th, 2006, 03:10
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

There are functions and attributes
<form></form> is a function
<img></img> is a function
<b></b> is a function

name="" is an attribute
src="" is an attribute

Maybe ur getting it now??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Mar 19th, 2006, 11:44
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

it not your fault, were just rubbish at explaining...lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Mar 19th, 2006, 16:30
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

hehe true

blame is on benbramz tbh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Mar 20th, 2006, 18:52
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

Quote:
Originally Posted by sypher
There are functions and attributes
<form></form> is a function
<img></img> is a function
<b></b> is a function

name="" is an attribute
src="" is an attribute

Maybe ur getting it now??
Don't kill me...

those are called elements, not functions

I'm not one to step on toes, but since we're all here to teach and learn, I figured I'd pipe up and mention it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Mar 20th, 2006, 21:09
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

functions, elements all the same
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Mar 20th, 2006, 23:09
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

haha we all slip up somtime! lol! (some more then others lol)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Mar 20th, 2006, 23:19
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

I slip up often, it usually happens between the time I wake up and the time I go to sleep. Theres something 'safe' about sleeping, I can't seem to screw it up. =)

Anyway, back on topic!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Mar 21st, 2006, 00:52
Junior Member
Join Date: Jan 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

Thanks all - got it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Mar 21st, 2006, 00:57
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Which way round should this form tag go?

safe sleeping....what about if u fell asleep in control of a car? not safe then is it!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
which, round, form, tag

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Badminton Bible (round 3) MikeHopley Free Web Site Critique 9 Mar 30th, 2008 17:11
Float the Text Round Jack Franklin Web Page Design 1 Mar 25th, 2008 20:33
Badminton Bible (round 2) MikeHopley Free Web Site Critique 27 Dec 31st, 2007 19:58
CSS round corners marSoul Web Page Design 20 Oct 5th, 2007 20:54
silverscribbles, 4th time round silverscribbles Free Web Site Critique 13 Aug 24th, 2007 17:22


All times are GMT. The time now is 03:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved