www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to use innerHTML on an element of a different frame??

  1. #1
    Join Date
    Apr 2013
    Posts
    2

    How to use innerHTML on an element of a different frame??

    Following are my frames:

    <frameset cols="600,*">
    <frame name="a" src="a.html">
    <frameset rows="300,*">
    <frame name="b" src="b.html">
    <frame name="c" src="c.html">
    </frameset>
    </frameset>

    The content of c.html:
    <p> Price <span id="price">0</span> </p>

    The content of b.html:
    <button type="button" onclick="myfunc()"></button>

    Now, in the javascript myfunc() function, I want to use innerHTML on <span> element of file c.html. How can I access the id of the span element?

    Thanks a lot for any help.

  2. #2
    Join Date
    Mar 2011
    Posts
    1,145
    Do yourself a favor and redesign this page without using <frame>s before you put any more time into this project. There are alternatives that provide the same functionality without the limitations of <frame>s. Good luck!
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Apr 2013
    Posts
    2
    What is that alternative? Thank you.

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