SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2004
    Location
    united states
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    obtaining the form element of an select

    Hello

    I have the following html code:
    Code:
    <form name="temp" method="get">
      <select name="name" onChange="f()">
        <option value="10"selected>10</option>
        <option value="25">25</option>
        <option value="50">50</option>
      </select>
    </form
    when a change in selection is made, I would like to obtain the form element in the f() function.
    I know that it can be done using the form name or index.
    I am looking for a way to do it via the <select> element itself.
    Something along the line of:
    Code:
    onChange="f(this.parent)"
    is this possible? a browser compatible method is prefered

    thanks

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Use this.form instead .


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •