www.webdeveloper.com
Results 1 to 2 of 2

Thread: DOM and frames...

  1. #1
    Join Date
    Aug 2007
    Posts
    8

    DOM and frames...

    I can't seem to figure out what the correct DOM path is, or the DOM in general really. I've read it over and over but I cannot navigate for the life of me. If you have a good DOM reference please share it with me as I cannot figure it out.

    Anyways, I have a page with frames and each frame has its own form. I want to use some javascript in one frame to submit the forms in all the other frames.

    My HTML structure is like this:

    Code:
    <html><head></head>
    <frameset rows="50%,50%">
      <!-- Top row -->
      <frame src="pxlF.html" name="main" id="main1">
      <!-- Bottom rows -->
      <frameset cols="16%,16%,16%,16%,16%,16%">
        <frame src="frames/08142007_121920/frame_0.html" name="A">
        <frame src="frames/08142007_121920/frame_1.html" name="B">
        <frame src="frames/08142007_121920/frame_2.html" name="C">
        <frame src="frames/08142007_121920/frame_3.html" name="D">
        <frame src="frames/08142007_121920/frame_4.html" name="E">
        <frame src="frames/08142007_121920/frame_5.html" name="F">
      </frameset>
    </html>
    Frames A thru F contain forms. Help appreciated...

  2. #2
    Join Date
    May 2005
    Location
    Dirty Jersey
    Posts
    1,401
    http://www.w3schools.com/htmldom/default.asp

    w3schools can give you the basics (in a very understanable way) to just about any language.

    as far as frames, you can use the DOM noted below to traverse your frame objects:

    Code:
    document.frames[integer]
    and then, use the properties and methods available to that frame

    i belive you can reference your frames directly by their name instead of by an integer value, but i tried to test on my system and ran into other types of problems that prevented me from validating it.

    1. If you reply to my post, and your reply would then appear directly beneath my post, DON'T QUOTE MY ENTIRE POST!!! IT'S REDUNTANT!!! IT'S ASININE!!!! IT'S REDUNDANTLY ASININE!!!!! DON'T DO IT!!!!
    2. jQuery extends the functionality of JavaScript. If you don't know JavaScript, give up on that jQuery script and learn JavaScript. You'll save yourself a lot of frustration, I promise.
    3. Use the [code][/code] tags. Otherwise, you may be left wondering why no one responded to your eyesore of a thread.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles