[thelist] IE & JS
VOLKAN ÖZÇELİK
volkan.ozcelik at gmail.com
Fri Oct 7 08:13:15 CDT 2005
or something like:
window.onload=function(){
document.getElementsByTagName("form")[0].onsubmit=form_submit;
//use document.forms[0] for backwards compatibility.
};
function form_submit(evt){
var theForm = new EventObject(evt).getSource();
/*EventObject is a hand-made cross-browser utility. */
theForm.myFieldName ...
}
Admit, I may be an unobtrusion and oo crack.
Cheers,
Volkan.
07.10.2005 tarihinde Robert Vreeland <vreeland at studioframework.com> yazmış:
> I agree, the ideal would be to change the name, but if for some reason you
> feel it is necessary to keep the name you can reference it via a variable by
> passing the form in as a param using the 'this' keyword, like so:
>
> <form action="somepage.asp" method="post" name="submit"
> onSubmit="return A_Function_Call(this)">
> Then in your function you can assign a variable name to the form by :
> function A_Function_Call(theForm)
> {
> theForm.myFieldName .....
> Hope this helps,
>
> Robert Vreeland
>
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of VOLKAN ÖZÇELIK
> Sent: Friday, October 07, 2005 3:23 AM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] IE & JS
>
> > (2) Perhaps 'submit' may not be the best name for your form - try changing
> the form name and see if this gets things working in IE.
> >
> > My 2c,
> >
>
> my 2c either. it causes lots of problems (in IE especially).
>
> Once (upon a time where I was using dreamweaver's wysiwyg and js was scaring
> me, and thinking that IE was the only browser in the world -- long time ago
> I mean :) ) I had had problems accessing a form button with name="submit"
> within js.
>
> --
> Volkan Ozcelik
> +>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
> +> My projects/studies/trials/errors : http://www.sarmal.com/
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester and archives
> of thelist go to: http://lists.evolt.org Workers of the Web, evolt !
>
>
--
Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
+> My projects/studies/trials/errors : http://www.sarmal.com/
More information about the thelist
mailing list