How to count frames with javascript

Hi, I work with a tool that uses javascript. One particular form that I'm working with, has several frames, and I need to pass the value of one frame, to another. Problem is, since my company doesn't have access to the "black box" code of the application, and of course, no tutorials are available that would show us the structure of a page, I have to idea how to pass this value. I was hoping of finding out the names of the frames used, I'm using the Form OnAfterLoad event handler. Any ideas?
horaliaAsked:
Who is Participating?
 
mr_egyptianCommented:
I don't really understand the question.  Here's a function that should return frame names within an (x)html frameset.
  function getfnames(){
      var str = '';
      var f = top.frames;
      for(var i = 0; i < f.length; i++){
          str += 'Frame ' + (i + 1) + ', Name: ' + f[i].name + '\n';
      }
      alert(str);
  }

Open in new window

0
 
horaliaAuthor Commented:
I actually wanted to know how to access all the elements in the frames. I already found out that there are three frames. What I need to know now, are the elements that each frame has so I can figure out which one I need to pass. Let me give you a little more explanation... The web page contains different forms, each form has its own events. I want to use a value contained in frame a in frame b. It's a real pain working with propietary software, you have to hack the system in order to make things work...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.