onLoad and onClick

Discussion in 'JavaScript' started by power2b, Mar 26, 2011.

  1. #1
    Hello,

    I need some help to setup a div with onClick and onLoad. I am ready to pay for this.

    Please PM with your MSN or anything else.

    Thanks!
     
    power2b, Mar 26, 2011 IP
  2. Deu

    Deu Peon

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #2
    what exactly you wanna do?
     
    Deu, Mar 26, 2011 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I can add something like this to your site for a small fee. PM me if your interested.
    
    <html>
    <head>
    <style type="text/css">
    #test {
    	background-color: #eee;
    	width: 200px;
    	height: 200px;
    	line-height: 200px;
    	text-align: center;
    }
    </style>
    <script type="text/javascript">	
    	function loadDiv() {
    		var div = document.getElementById("test");
    		div.innerHTML = "<h1>ONLOAD</h1>"
    	}
    	
    	function changeDiv() {
    		var div = document.getElementById("test");
    		div.innerHTML = "<h1>ONCLICK</h1>"
    	}
    </script>
    </head>
    <body onload="loadDiv()">
    <div id="test" onclick="changeDiv()"></div>
    </body>
    </html>
    
    Code (markup):
     
    Last edited: Mar 26, 2011
    Cash Nebula, Mar 26, 2011 IP