473,383 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

browser/ecmascript behavior when form controls lack enclosing form tag?

jmp
(I hope this isn't considered too far off-topic.)

I work as a developer on a browser product found on handheld devices,
and I'm trying to specify behavior for the browser to make it "as
compatible as possible" with reference browsers (IE, Firefox, Opera,
NS, etc??) when presented with HTML content containing form controls
(input, textarea, select/option) in the absence of enclosing form
element tags.

Obviously in the absence of scripting, a form control without an
enclosing form has no utility since there is no action associated with
the control. But with ecmascript-mp now supported in the browser of
course everything changes. Since the bulk of my experience up until
very recently has been "script-agnostic" I am scrambling to figure out
what things a content author might want to do with form controls that
could work without the control being in a form block.

Please let's not get into why I am trying to support such a construct,
I'm sure those of you who have worked in a production environment are
familiar with examples of ill-considered and poorly-specified
requirements. Suffice it to say that some customer expects content
with this characteristic to work on the handheld browser.

Does anyone have ideas about what behavior should be supported (for
form controls in the absence of enclosing form tags) for maximum
compatibility with existing browsers and existing content?

Does anyone know of commercial products (web-authoring tools,
server-side HTML generating tools, etc??) that might now or in previous
versions have produced HTML containing form controls without enclosing
form tags?

Again, I hope this isn't considered too far off-topic, if you feel it
is please suggest a better forum - -

Thanks in advance
J

Jun 7 '06 #1
7 1512
jmp wrote:
<snip>
Obviously in the absence of scripting, a form control without
an enclosing form has no utility since there is no action
associated with the control.
The only implication of that is that such controls would be best
created/inserted with scripts, so they were not there whenever they were
useless.
But with ecmascript-mp now supported in the browser of
course everything changes. Since the bulk of my
experience up until very recently has been
"script-agnostic" I am scrambling to figure out
what things a content author might want to do with form
controls that could work without the control being in a
form block.
They would be used for user input.
Please let's not get into why I am trying to support such
a construct,
The would be no point anyway as the construct is legal in HTML and so
must be supported.

<snip> Does anyone have ideas about what behavior should be
supported (for form controls in the absence of enclosing
form tags) for maximum compatibility with existing browsers
and existing content?
All of it of course. The only thing that you cannot do with a form
control that is not in a form is submit its contents/selections to a
server.
Does anyone know of commercial products (web-authoring
tools, server-side HTML generating tools, etc??) that
might now or in previous versions have produced HTML
containing form controls without enclosing form tags?
That would be anything that facilitated the writing of HTML.
Again, I hope this isn't considered too far off-topic,
if you feel it is please suggest a better forum - -


I don't see any reason for not asking here, but if you want
cross-browser compatibility you are going to have to implement the W3C
Core and HTML DOMs (at minimum) so once you have given the control
elements their required interfaces what else do you need to know?

Richard.
Jun 7 '06 #2
jmp wrote:
(I hope this isn't considered too far off-topic.) <snipped />
Does anyone have ideas about what behavior should be supported (for
form controls in the absence of enclosing form tags) for maximum
compatibility with existing browsers and existing content?
support for all the onXxxx() events, I suppose?

Does anyone know of commercial products (web-authoring tools,
server-side HTML generating tools, etc??) that might now or in
previous versions have produced HTML containing form controls without
enclosing form tags?


All I know of...

It is one of the most commonly used concepts, as long as scripting
is available.

--
Dag.

Jun 7 '06 #3
jmp
Richard Cornford wrote:
jmp wrote:
<snip>
Obviously in the absence of scripting, a form control without
an enclosing form has no utility since there is no action
associated with the control.
The only implication of that is that such controls would be best
created/inserted with scripts, so they were not there whenever they were
useless.


Ok, sure. That's up to the content author anyway.

<snip>
what things a content author might want to do with form
controls that could work without the control being in a
form block.


They would be used for user input.


Well, Ok but is there some way to use the user input (beyond simply
being rendered) in the absence of script?

<snip> the construct is legal in HTML and so
must be supported.

sorry, I only just learned that after I made the post. This browser
started out as requiring XHTML compliant content and has subsequently
become more and more relaxed. However the most recent releases of it do
not create boxes in the tree for any form control that is not a child
of a form. Since previously we didn't have script support, customers
didn't care.
<snip>
Does anyone have ideas about what behavior should be
supported (for form controls in the absence of enclosing
form tags) for maximum compatibility with existing browsers
and existing content?
All of it of course. The only thing that you cannot do with a form
control that is not in a form is submit its contents/selections to a
server.


Well, Ok, does that mean such a form control should be somehow
addressable by script via the document.forms property or the
document.forms.elements property? I'm guessing not since there's no
way to address the non-existent form, but I'll admit to being new to
ecmascript, maybe I missed something?

When you say "all of it" I feel a bit stupid, like I should be able to
rattle off all of the support that is required. Ok, I'll try: must be
properly rendered, CSS applies normally, all attributes processed,
script event handling supported, um, um, what haven't I covered?

Given my former complete ignorance about script and admittedly mistaken
view that form controls without enclosing form tags had no use beyond
rendering, is there anything you might imagine I would find
non-intuitive about the way such form controls are used by content
authors and handled by browsers?

<snip> Richard.


Thanks for your help

Jun 7 '06 #4
jmp
Dag Sunde wrote:
jmp wrote:
(I hope this isn't considered too far off-topic.) <snipped />

Does anyone have ideas about what behavior should be supported (for
form controls in the absence of enclosing form tags) for maximum
compatibility with existing browsers and existing content?


support for all the onXxxx() events, I suppose?


Ok, I'm with you there.

Does anyone know of commercial products (web-authoring tools,
server-side HTML generating tools, etc??) that might now or in
previous versions have produced HTML containing form controls without
enclosing form tags?


All I know of...

It is one of the most commonly used concepts, as long as scripting
is available.


Ok, I guess I'm just surprised to hear that - I would have assumed that
most content authors would have used an enclosing form to gain its
various benefits. I wonder what are the most common use cases that
omit the enclosing form?
--
Dag.


Thanks

Jun 7 '06 #5
On Wed, 07 Jun 2006 16:09:33 -0700, jmp wrote:
Dag Sunde wrote:
jmp wrote:
> (I hope this isn't considered too far off-topic.)

<snipped />
>
> Does anyone have ideas about what behavior should be supported (for
> form controls in the absence of enclosing form tags) for maximum
> compatibility with existing browsers and existing content?


support for all the onXxxx() events, I suppose?


Ok, I'm with you there.
>
> Does anyone know of commercial products (web-authoring tools,
> server-side HTML generating tools, etc??) that might now or in
> previous versions have produced HTML containing form controls without
> enclosing form tags?


All I know of...

It is one of the most commonly used concepts, as long as scripting
is available.


Ok, I guess I'm just surprised to hear that - I would have assumed that
most content authors would have used an enclosing form to gain its
various benefits. I wonder what are the most common use cases that
omit the enclosing form?


As far as I know the only benefits of having a form element are that it
lets you submit the input to a server using standard cgi protocols. If you
don't want to do that, you don't need the form elements.

E.g. I'm writing a panoramic image viewer. This has a control on it which
lets you choose a different image resolution. The value of this is used to
choose which image to request from the server, but this is handled within
javascript, not by the browser's built in cgi-handling code, so no form
element is needed.

It sounds like you are trying to avoid specifying the whole of javascript
+ Document Object Model, which may not be such a good plan, from my
limited knowledge.

Jun 8 '06 #6
jmp wrote:
Richard Cornford wrote:
jmp wrote: <snip>
<snip> what things a content author might want to do with form
controls that could work without the control being in a
form block.
They would be used for user input.


Well, Ok but is there some way to use the user input (beyond
simply being rendered) in the absence of script?


No, but you are writing a scriptable browsers so it can be scripted.
<snip>
the construct is legal in HTML and so
must be supported.

sorry, I only just learned that after I made the post. This
browser started out as requiring XHTML compliant content
and has subsequently become more and more relaxed.


It is legal in XHTML as well.
However the most recent releases of it do not create boxes
in the tree for any form control that is not a child of a
form.
Then you had a bug to fix.
Since previously we didn't have script support,
customers didn't care.
You already pointed out that such a control could be used purely for
display. That may not be a good plan but it is allowed, and so may
happen.
<snip>
Does anyone have ideas about what behavior should be
supported (for form controls in the absence of enclosing
form tags) for maximum compatibility with existing browsers
and existing content?


All of it of course. The only thing that you cannot do with
a form control that is not in a form is submit its
contents/selections to a server.


Well, Ok, does that mean such a form control should be
somehow addressable by script via the document.forms
property or the document.forms.elements property?


Without a form that would not make sense.
I'm guessing not since there's no way to address the
non-existent form, but I'll admit to being new to
ecmascript, maybe I missed something?
Such a control may be addressed with - getElementById -, -
getElementsByName -, - getElementsByTagName -, as
children/descendants/siblings of other elements and so on.
When you say "all of it" I feel a bit stupid, like I should
be able to rattle off all of the support that is required.
At the very least you should be able to rattle off the interfaces
defined in the W3C HTML DOM specification for the various form controls.
Ok, I'll try: must be properly rendered, CSS applies normally,
all attributes processed, script event handling supported, um,
um, what haven't I covered?
The DOM interfaces?
Given my former complete ignorance about script and
admittedly mistaken view that form controls without
enclosing form tags had no use beyond rendering,
is there anything you might imagine I would find
non-intuitive about the way such form controls are used by
content authors and handled by browsers?


The vast majority of people writing web content have little
understanding of the technologies they use and many work on the basis or
coincidence, mystical incantation because things 'worked' (by some very
superficial definitions of 'work'). Not only should you expect what they
do to be non-intuitive, you can expect it often not even to be rational.

Richard.
Jun 8 '06 #7
jmp wrote:
Dag Sunde wrote:
jmp wrote:
(I hope this isn't considered too far off-topic.)

<snipped />

Does anyone have ideas about what behavior should be supported (for
form controls in the absence of enclosing form tags) for maximum
compatibility with existing browsers and existing content?


support for all the onXxxx() events, I suppose?


Ok, I'm with you there.

Does anyone know of commercial products (web-authoring tools,
server-side HTML generating tools, etc??) that might now or in
previous versions have produced HTML containing form controls
without enclosing form tags?


All I know of...

It is one of the most commonly used concepts, as long as scripting
is available.


Ok, I guess I'm just surprised to hear that - I would have assumed
that most content authors would have used an enclosing form to gain
its various benefits. I wonder what are the most common use cases
that omit the enclosing form?


* An "in-page" finance calculator.
* A button for show/hide the details part of a page
* A game of "tic-tac-toe"?
* An "Old-style" AJAX implementation, where the posting is done from
a hidden iframe, but all the controls are on the visible page.
* the list goes on...

--
Dag.
Jun 8 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: David | last post by:
On a page optimised for IE, I'd like to check if the browser type is other than IE, so I can direct them to another page. How can I modify the code below to redirect to indextext.asp if they...
2
by: Rory Plaire | last post by:
Hi, I've been working with the J# browser control. I understand that v1.1b is scriptable, but can't find any examples on how to do this. Can someone point me in the right direction? thanks,...
17
by: lawrence | last post by:
How is it possible that the question "How do I detect which browser the user has" is missing from this FAQ: http://www.faqts.com/knowledge_base/index.phtml/fid/125 and is only here on this...
6
by: Daniel Kabs | last post by:
Hello there, I have a Nokia 6630 phone that is based on the Series 60 Software Platform. -> http://www.series60.com/ These "smartphones" are said to support HTML 4.01 and "a subset of...
12
by: Simula | last post by:
Hello All, Does anyone have any knowledge of when version 4 will be released? I think that version 3 was finalized in 1999 and it would be really nice to have the class keyword and statically...
1
by: Jonathan Yong | last post by:
I observe a very weird behavior when dynamically create web control and bind events to it. Create a C# ASP.NET application, Put a PlaceHolder and Textbox onto the Web form, and try with the 4...
112
by: Tom | last post by:
This is very strange: I have a Windows Form with a Panel on it. In that panel I dynamically (at run time) create some labels, as so: for i=1 to x dim ctlNew as New Label() with ctlNew...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
34
by: dhtml | last post by:
I made a change to the FAQ of javascript to EcmaScript. I got some feedback that the newsgroup is CLJ and the language is commonly referred to as JavaScript. Therefore, the word in the FAQ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.