what do you think about his?

68 views
Skip to first unread message

Massimo Di Pierro

unread,
Jan 8, 2013, 2:31:00 PM1/8/13
to web2py-developers

Niphlod

unread,
Jan 8, 2013, 2:57:08 PM1/8/13
to web2py-d...@googlegroups.com
shallowly "voting" for having a default of #. Seems that asp.net use that .
However, maybe we can fix "once and for all" just specifying the same url that generates the page ?

On Tuesday, January 8, 2013 8:31:00 PM UTC+1, Massimo Di Pierro wrote:

Jonathan Lundell

unread,
Jan 8, 2013, 3:04:15 PM1/8/13
to web2py-d...@googlegroups.com
On 8 Jan 2013, at 11:57 AM, Niphlod <nip...@gmail.com> wrote:
shallowly "voting" for having a default of #. Seems that asp.net use that .
However, maybe we can fix "once and for all" just specifying the same url that generates the page ?

Do we necessarily know how to do that? It's effectively what # does, but # leaves the knowledge of the current URL to the client/browser.

I think it'd be good to do.

Michele Comitini

unread,
Jan 8, 2013, 3:35:56 PM1/8/13
to web2py-developers
isn't action optional? instead of empty we can take it out



2013/1/8 Jonathan Lundell <jlun...@pobox.com>:
> --
> -- mail from:GoogleGroups "web2py-developers" mailing list
> make speech: web2py-d...@googlegroups.com
> unsubscribe: web2py-develop...@googlegroups.com
> details : http://groups.google.com/group/web2py-developers
> the project: http://code.google.com/p/web2py/
> official : http://www.web2py.com/
>
>

Michele Comitini

unread,
Jan 8, 2013, 3:47:44 PM1/8/13
to web2py-developers
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

excerpt: "The action and formaction content attributes, if specified,
must have a value that is a valid non-empty URL potentially surrounded
by spaces."

2013/1/8 Michele Comitini <michele....@gmail.com>:

Jonathan Lundell

unread,
Jan 8, 2013, 3:51:55 PM1/8/13
to web2py-d...@googlegroups.com
On 8 Jan 2013, at 12:47 PM, Michele Comitini <michele....@gmail.com> wrote:
> http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action
>
> excerpt: "The action and formaction content attributes, if specified,
> must have a value that is a valid non-empty URL potentially surrounded
> by spaces."

But does no-action mean the same thing as current-page?

'#' has always seemed like a hack. (Though a convenient hack when you really do want the action to be the current page.)

Massimo Di Pierro

unread,
Jan 8, 2013, 3:56:28 PM1/8/13
to web2py-d...@googlegroups.com

On Jan 8, 2013, at 2:51 PM, Jonathan Lundell wrote:

> On 8 Jan 2013, at 12:47 PM, Michele Comitini <michele....@gmail.com> wrote:
>> http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action
>>
>> excerpt: "The action and formaction content attributes, if specified,
>> must have a value that is a valid non-empty URL potentially surrounded
>> by spaces."
>
> But does no-action mean the same thing as current-page?
>
> '#' has always seemed like a hack. (Though a convenient hack when you really do want the action to be the current page.)

I agree. So why does ASP do it?

Michele Comitini

unread,
Jan 8, 2013, 4:00:13 PM1/8/13
to web2py-developers
html5 has different ways to address the submission target.
is "#" a workaround for some IE bug/wrong implementation?

2013/1/8 Massimo Di Pierro <massimo....@gmail.com>:

Niphlod

unread,
Jan 8, 2013, 4:00:16 PM1/8/13
to web2py-d...@googlegroups.com
I'm just thinking it had to be the simplest thing to make it work both for html4 and html5

Massimo Di Pierro

unread,
Jan 8, 2013, 3:41:12 PM1/8/13
to web2py-d...@googlegroups.com
For now I have committed the change proposed (action="#").
I still do not understand the pros and cons of one approach over the others:

action = ""
action = "#"
action = None

Are they all supported by all browser and all html version? If not which ones is the most friendly?

Massimo

Jonathan Lundell

unread,
Jan 8, 2013, 8:56:15 PM1/8/13
to web2py-d...@googlegroups.com
On 8 Jan 2013, at 12:41 PM, Massimo Di Pierro <massimo....@gmail.com> wrote:
>
> For now I have committed the change proposed (action="#").
> I still do not understand the pros and cons of one approach over the others:
>
> action = ""
> action = "#"
> action = None
>
> Are they all supported by all browser and all html version? If not which ones is the most friendly?

Action = "" isn't legal for HTML5, though presumably browsers don't care.

action = None might not have the same semantics as action = "" (is my worry).

So action = "#" seems like the best bet.


Bruno Rocha

unread,
Jan 8, 2013, 9:35:49 PM1/8/13
to web2py-d...@googlegroups.com
Use the current URL() is not an option?

Massimo DiPierro

unread,
Jan 8, 2013, 10:58:48 PM1/8/13
to web2py-d...@googlegroups.com
This would make the FORM helper dependent on current. I would like to avoid that.

On Jan 8, 2013, at 8:35 PM, Bruno Rocha wrote:

Use the current URL() is not an option?

Reply all
Reply to author
Forward
0 new messages