29 users online (1 members and 28 guests)  


  Results 1 to 2 of 2

Related

  1. how to stop javascript via another javascript    Forum: Javascript Forum
    Replies: 0
  2. Replies: 8
  3. Javascript And XML    Forum: Javascript Forum
    Replies: 2
  4. Replies: 5
  5. JavaScript    Forum: Javascript Forum
    Replies: 2
  1. #1
    Drumpound's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2004
    Posts
    1

    Question Javascript/css

    I'm using this script to change css styles

    <script language="JavaScript">
    function change(id, newClass) {

    identity=document.getElementById(id);

    identity.className=newClass;

    }
    </script>

    onClick="change('1', '2);

    Would it be possible to do an onload on a page that would set the css style on a page in another frame.

    any ideas?

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Not sure if this would work, but you could try -

    Code:
    parent.framename.getElementById(id);
    And it might work. Have a play.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread