SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Change Div

  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Change Div

    Ok this is what i am trying to do.

    I have a timer. and after 1 sec i want display a div.

    my code:
    Code:
    
    <script type="text/javascript">
    <!--
    function delay(){
        alert("New var")
    	document.div.Temp1.style=""
    // At this time i need to we need to show the content of the div 
    
    }
    //-->
    </script>
    
    <body onLoad="setTimeout('delay()', 1000)">
    <!-- calls the JavaScrip Junction (Works) --> 
    
    <div id="Temp1" style="display:none">
    XXXXXXXXXXXXX
    </div>

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Replace
    document.div.Temp1.style=""
    with
    document.getElementById("Temp1").style.display = "";


Bookmarks

Posting Permissions

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