Web Analytics Made Easy -
StatCounter Javascript files are not working on ajax callback - CodingForum

Announcement

Collapse
No announcement yet.

Javascript files are not working on ajax callback

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Javascript files are not working on ajax callback

    Could somebody help me please to explain what I'm doing wrong....
    a have this html file with references to some javascripts (datagrid from http://www.datatables.net) and this html file work ok..I mean javascripts a css styling works with table...
    but when I call this page by ajax and callback (this html page) is forward back into another div , table doesn't work ....just data from page but now functionality from javascript and css styling...
    how should I force callback result to use javascript and css?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html><head>
    		<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
    		
    		
    		<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/media/images/favicon.ico">
    		<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.datatables.net/rss.xml">
    		
    		<style type="text/css" media="screen">
    			@import "media/css/demo_page.css";
    			@import "media/css/demo_table.css";
    			@import "http://www.datatables.net/media/css/site_jui.ccss";
    			@import "media/css/demo_table_jui.css";
    			@import "media/css/themes/base/jquery-ui.css";
    			@import "media/css/themes/smoothness/jquery-ui-1.7.2.custom.css";
    			/*
    			 * Override styles needed due to the mix of three different CSS sources! For proper examples
    			 * please see the themes example in the 'Examples' section of this site
    			 */
    			.dataTables_info { padding-top: 0; }
    			.dataTables_paginate { padding-top: 0; }
    			.css_right { float: right; }
    			#example_wrapper .fg-toolbar { font-size: 0.8em }
    			#theme_links span { float: left; padding: 2px 10px; }
    		</style>
    
    		
    		<script type="text/javascript" src="media/js/complete.js"></script>
    		<script src="media/js/jquery-1.4.4.min.js" type="text/javascript"></script>
            <script src="media/js/jquery.dataTables.min.js" type="text/javascript"></script>
    		<script type="text/javascript" src="media/js/jquery.dataTables.editable.js"></script>
    		<script src="media/js/jquery.jeditable.js" type="text/javascript"></script>
            <script src="media/js/jquery-ui.js" type="text/javascript"></script>
            <script src="media/js/jquery.validate.js" type="text/javascript"></script>
    
    		<script type="text/javascript" charset="utf-8">
    			$(document).ready( function () {
    				$('#example').dataTable().makeEditable({
                        							sUpdateURL: "update.php",
    												sDeleteURL: "delete.php"
    
                        							
    										});
    				
    			} );
    		</script>
    
            
    	</head>
       <body id="index" class="grid_2_3">
    
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
            
            <thead>
            <tr>
            <th>
            ID</th>
            <th>
            user</th>
            <th>
            password</th>
            <th>
            first</th>
            <th>
            last</th>
            <th>
            company</th>
            </tr>
            
                </thead>
            
                <tbody>
            <tr class="even_gradeA" id="1">
            <td>
            1
            </td>
            <td>
            XY
            </td>
            <td>
            passwoed
            </td>
            <td>
            Ja
            </td>
            <td>
            jajovic
            </td>
            <td>
            2
            </td>
            </tr>
            <tr class="even_gradeA" id="2">
            <td>
            2
            </td>
            <td>
            jojo
            </td>
            <td>
            fa25af5301e2dda1fddea740200aa10ab6c70d86
            </td>
            <td>
            jojo
            </td>
            <td>
            jojovicko
            </td>
            <td>
            2
            </td>
            </tr>
            <tr class="even_gradeA" id="3">
            <td>
            3
            </td>
            <td>
            kuk
            </td>
            <td>
            d588aebb93e3adf70eac1fb479d6d53f9dc21816
            </td>
            <td>
            kuk
            </td>
            <td>
            kukovic
            </td>
            <td>
            3
            </td>
            </tr>
            <tr class="even_gradeA" id="10">
            <td>
            10
            </td>
            <td>
            admin
            </td>
            <td>
            f865b53623b121fd34ee5426c792e5c33af8c227
            </td>
            <td>
            admin
            </td>
            <td>
            adminovic
            </td>
            <td>
            3
            </td>
            </tr>
            </tbody>
    </table><button id="btnDeleteRow">Delete</button>
    
    
    
    </body>
    </html>
Working...
X