473,236 Members | 1,751 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,236 software developers and data experts.

IE name="name" & form.name property bug

We just discovered another IE bug.

When an html form contains an element with a name of `name` IE's
internal index screws up the .name property of the containing form to
point to the bad element object instead of containing the string name
property of the form.

Here is the simplified test case:

<html>
<head>
<title>IE Name="name" Bug</title>
<script>
function showFormName(){
alert(
"Text should say `fmTest`~~~> "+
oF["good_name"].form.name+"\n\n"+
"Second test: Test .value prop~~> "+
oF["good_name"].form.name.value
)
}
</script>
</head>
<body>
<form name="fmTest">
<script>oF=document.forms["fmTest"]</script>
Good:
<input type=text name="good_name" value="Good Elem Name">
<script>showFormName()</script>
Bad:
<input type=text name="name" value="Bad Elem Name">
<script>showFormName()</script>
</form>
</body>
</html>

Probably not a good idea to use just `name` anyway `tbName` or similar
is better coding practice any how. We are customizing a system that
uses form element names that match attribute names in our business
object server. `name` is actually the core business object `name`
attribute. We are working around by customizing the TCL core code to
look for obj_name instead.

JsD
Jul 23 '05 #1
6 2271
Java script Dude wrote:
We just discovered another IE bug.
It isn't necessarily a bug and it certainly isn't restricted to IE.
When an html form contains an element with a name of `name` IE's
internal index screws up the .name property of the containing form to
point to the bad element object instead of containing the string name
property of the form.

<snip>

"The Most Common Mistake":-

<URL: http://jibbering.com/faq_notes/form_....html#faComMis >

Richard.
Jul 23 '05 #2
Richard Cornford wrote:

<snip>

"The Most Common Mistake":-

<URL: http://jibbering.com/faq_notes/form_....html#faComMis >


HTTP/1.1 404 Object Not Found
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #3
*Randy Webb* wrote:
*Richard Cornford* wrote:
"The Most Common Mistake":-
<URL: http://jibbering.com/faq_notes/form_....html#faComMis >


HTTP/1.1 404 Object Not Found


http://www.jibbering.com/faq/faq_not....html#faComMis
--
Andrew Urquhart
- FAQ: www.jibbering.com/faq/
- Archive: www.google.com/groups?q=comp.lang.javascript
- My reply address is invalid, see www.andrewu.co.uk/contact/
Jul 23 '05 #4
Andrew Urquhart wrote:
*Randy Webb* wrote:
*Richard Cornford* wrote:
"The Most Common Mistake":-
<URL: http://jibbering.com/faq_notes/form_....html#faComMis >


HTTP/1.1 404 Object Not Found

http://www.jibbering.com/faq/faq_not....html#faComMis


Thanks, I knew it was in there somewhere :)

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #5
Randy Webb wrote:
Andrew Urquhart wrote:

<snip>
http://www.jibbering.com/faq/faq_not....html#faComMis


Thanks, I knew it was in there somewhere :)


Sorry, it had just occurred to me that I forgot the /faq and I was about
to post a correction. I won't bother now.

Ricahrd.
Jul 23 '05 #6
> >> http://www.jibbering.com/faq/faq_not....html#faComMis

Thanks Richard,

I'll be sure to check the FAQ before any more similar posts.

Tim
Jul 23 '05 #7

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

Similar topics

2
by: John Davis | last post by:
I want to know what's the differences between Request.Form("Field Name") and Request.QueryString("Field Name") OR they function exactly the same, which is to return the value of the field?? ...
4
by: Marc Elser | last post by:
Hi Everybody, Can someone please tell me how to access the form name if there's a form field named "name", for example: <form name="myform"> <input type="text" name="name" value="Marc">...
3
by: Pavils Jurjans | last post by:
Hello, I have bumped upon this problem: I do some client-side form processing with JavaScript, and for this I loop over all the forms in the document. In order to identify them, I read their...
7
by: charliewest | last post by:
Using .Net Compact Framework, I have an ImageButton control (derived from the Button control) this is wired to a click event. The click event's receives the standard arguments (sender, e). How is...
0
by: Joeyej | last post by:
Hi - I'm trying to move/use a web form (containing some javascript field checks) previously hosted on a Windows 2000 server. However, the FORM METHOD="post..." command in the form (shown below)...
4
by: ajschuster | last post by:
I cannot get my Javascript to work in Firefox. I am just trying to access the .name property of a DIV tag but it keeps coming back as "undefined". The same code works in IE and it works in...
2
by: Me | last post by:
I am passing on the input name to my asp page using Response.redirect "mypage.asp?name=" & name and the resulting url looks like 'companyname/mypage.asp?name=" & name I would like it to appear...
6
by: Dick Watson | last post by:
I had a page that works when setup like this: === <form name="frmCalc" action=""> <script type="text/javascript"> function btnCalc_onclick(abc) { return "got here with " + abc; }
1
by: mark | last post by:
Forgive me if this seems like a stupid question but I need help... I'm trying to do a simple online form that emails me the results from a few fields. Here is the code: <form...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.