Re: XHTML doesn't allow name attributes for form tag

Tilmann Singer <[email protected]> Thu, 16 Mar 2006 18:00:49 +0100
Newsgroups gmane.comp.web.tclwebtest
Message-ID <[email protected]>
Hey Vinod!

* Vinod Kurup <[email protected]> [20060316 17:05]:
> I'm not sure if this list is still active, but I'll give it a shot. In XHTML,
> using a 'name' attribute in 'form' elements has been deprecated.
> 
> http://www.w3.org/TR/xhtml1/#h-4.10
> 
> So, I've been switching my forms to use the 'id' attribute. But now
> "tclwebtest::form find ~n" doesn't find things in the id attribute. Makes
> sense, of course, but I'm wondering if we could somehow add the ability to
> search the id attribute. Either with a new flag (~i?) or by having ~n search
> both for name and id.
> 
> Does this sound reasonable? Could someone point me to where I should start
> looking to make this change?

Sounds reasonable, I would add the value of the id attribute to
~n. Just don't know what to do when both id and name are set to
different values, hm.

Anyway if you want to do that, look into lib/tclwebtest.tcl in the
proc ::tclwebtest::deal_with_field , appx. line 3079

All these calls would need to be changed to conditionally also get the
attribute id somehow:

to: set a_result(name) [get_attribute $full name]

add: set a_result(name) [get_attribute $full id]

Looking at the code I'm really wondering why this call is repeated for
each field type, it could be propably done only once.


greetings



-- 
http://tsinger.com                            +49-176 20 19 51 69


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642