Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Object doesn't support this property or method


Message #1 by "Ali Benzes" <alib@k...> on Fri, 1 Nov 2002 09:14:12 +0200
Thanks Stan.
Index worked.Others not worked('I dont understand this.All True').

**********************
     Best Regards
	Ali Benzes
**********************


-----Original Message-----
From: Sten Hougaard [mailto:STG@e...]
Sent: Friday, November 01, 2002 9:27 AM
To: JavaScript HowTo
Subject: [javascript_howto] Re: Object doesn't support this property or
method


Hi Ali,

"document.form" is NOT an object, unless that you have a HTML element
with the ID set to "form"...

However - you are very close to doing the right thing! :-)

The "document" object contains a collection of the forms on the page,
it is called "document.forms". This being a collection it will contain
the forms that is on your webpage. You can then point at the one you
need
in 3 ways:

  By index: "document.forms[0]" - to access the FIRST form on the page

  By name: "document.forms['myform']" - to access the named form
"myform"

  By id: "document.myform" - will access the element with the id
"myform"
  (for instance: <form id=3D"myform">)

Make your choice! :-)

Cheers,


Sten Hougaard
EDB Gruppen, Denmark





                    "Ali Benzes"

                    <alib@k...       To:     "JavaScript HowTo"
<javascript_howto@p...>               
                    et>                  cc:

                                         Subject:     [javascript_howto]
Object doesn't support this property or  
                    01-11-2002            method

                    08:14

                    Please respond

                    to "JavaScript

                    HowTo"









I am receiving an "Error: Object doesn't support this property or
method"
Here is the code:

<script language=3D"javascript">
function gonder()
{
document.form.action=3D'linkpage.asp';
document.form.submit();
}
</script>

**********************
           Sayg=FDlar=FDmla
            Ali Benze=FE
**********************




---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20





---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20


  Return to Index