Exemple #1
0
?>
=' + encodeURIComponent(event.value),
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        handler(XMLHttpRequest.responseText);
                    },
                    success: function(data, textStatus, XMLHttpRequest) {
                        handler(data);
                    }
                });

            });
            
            // Hides the page during initialization
            document.write('<style type="text/css"> .page { display: none; } </style>');
            
        </script>
    </head>
    <body>
        <div class="page">
            <h1>jQuery Address Crawling</h1>
            <ul class="nav"><?php 
$crawling->nav();
?>
</ul>
            <div class="content"><?php 
$crawling->content();
?>
</div>
        </div>
    </body>
</html>
Exemple #2
0
                var handler = function(data) {
                    $('.content').html($('.content', data).html()).parent().show();
                    $.address.title(/>([^<]*)<\/title/.exec(data)[1]);
                };

                // Loads the page content and inserts it into the content area
                $.ajax({
                    url: location.pathname + '?<?php echo(Crawling::fragment); ?>=' + encodeURIComponent(event.value),
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        handler(XMLHttpRequest.responseText);
                    },
                    success: function(data, textStatus, XMLHttpRequest) {
                        handler(data);
                    }
                });

            });
            
            // Hides the page during initialization
            document.write('<style type="text/css"> .page { display: none; } </style>');
            
        </script>
    </head>
    <body>
        <div class="page">
            <h1>jQuery Address Crawling</h1>
            <ul class="nav"><?php $crawling->nav(); ?></ul>
            <div class="content"><?php $crawling->content(); ?></div>
        </div>
    </body>
</html>