#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    4
    Rep Power
    0
    Hello everybody. Suppose you have this structure :
    <form name="super">
    <form name="sub">
    <input type="hidden" name="whatever" value="4">
    </form>
    </form>.

    How can I access via Javascript to the "whatever" value? I have tried :
    document.super.sub.whatever.value, of course, it doesn't work. Any ideas?

    Thanks!!
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Etobicoke, Ontario, Canada
    Posts
    6
    Rep Power
    0
    but why do you need 2 forms
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    4
    Rep Power
    0
    I need 2 forms just with the idea of setting a big form where you can find subforms to handle user privileges. The subforms would help in the access to diferent pages depending on the privilege.

    I know I could handle this without nesting, but I would like to know if there is a way in javascript to handle this problem : how to access an object stored in a form that's nested in s super-form.


    Thanks!!!

  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Etobicoke, Ontario, Canada
    Posts
    6
    Rep Power
    0
    well as far as my knowledge goes you cannot access elements across nested forms.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    4
    Rep Power
    0
    Yeah! I think I overheated my head! But it's OK!!. You know, it's one of that unanswered questions I had in my folder!

  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    11
    Rep Power
    0
    document.sub.whatever.value

Similar Threads

  1. arrayin in forms (html, javascript)
    By elstudion in forum JavaScript Development
    Replies: 6
    Last Post: October 7th, 2003, 08:56 PM
  2. External JavaScript file problem
    By FTK2003 in forum JavaScript Development
    Replies: 11
    Last Post: September 13th, 2003, 11:21 AM
  3. PHP javascript conflict - checkboxes array forms
    By smakz in forum JavaScript Development
    Replies: 11
    Last Post: November 9th, 2002, 06:56 PM
  4. Need help with a javascript in a form
    By newangler in forum JavaScript Development
    Replies: 3
    Last Post: September 16th, 2002, 06:36 AM
  5. Problems with forms and javascript
    By Ulrik N in forum JavaScript Development
    Replies: 2
    Last Post: September 13th, 2000, 07:55 AM

IMN logo majestic logo threadwatch logo seochat tools logo