SAJAX .. introduction help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • banning
    New Member
    • Aug 2007
    • 42

    SAJAX .. introduction help

    please feel free to delete this... i am an idiot... here is my code that works in case anyone was curious as to what i was trying to accomplish...

    Code:
    <?
    	require("Sajax.php"); 
    
    	function sayhi(){
    		return "Name: Tom / Age: 26";
    	}
    	
    	sajax_init();
    	// $sajax_debug_mode = 1;
    	sajax_export("sayhi");
    	sajax_handle_client_request(); 
    	
    ?>
    
    <html>
    	<head>
    		<title>Multiplier</title>
    	
    	<script>
    	
    		<? sajax_show_javascript(); ?>
    					
    			function sayhi(result) {
    				document.getElementById('canvas').innerHTML += '<p>'+result+'</p>';
    			}
    			
    		</script>
            
    </head>
    
    <body>
        
        <div id="canvas" style="border: solid 1px black; margin: 1em; padding: 1em;"></div>
        <input type="button" name="check" value="Say Hi" onclick="x_sayhi(sayhi);">
        
    </body>
    </html>
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Could you please add some explanation / comments to this code. It would make it easier for our members to comprehend what exactly is going on and how it works.

    moderator

    Comment

    • banning
      New Member
      • Aug 2007
      • 42

      #3
      Originally posted by ronverdonk
      Could you please add some explanation / comments to this code. It would make it easier for our members to comprehend what exactly is going on and how it works.

      moderator

      hey sorry i ended up dropping SAJAX and going with prototype/scriptaculous

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Does this mean that this thread is closed?

        Ronald

        Comment

        • banning
          New Member
          • Aug 2007
          • 42

          #5
          yea, do i have to do something special when a problem is solved or a thread i started is closed?

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            No, it's fine. Just that members know it is virtually closed.
            See you around here.

            Ronald

            Comment

            Working...