chetanmadaan
02-05-2010, 02:19 AM
guys,
i found this script over googling.
this is a very basic yet poweful thing.
it displays a html page on click and shows a loading image.
(this is all done using axax)
The problem is that this script only displays one html document and we are looking to display more.
Thanks.
http://www.electrictoolbox.com/load-content-jquery-ajax-loading-image/
coding as following
<script language="javascript">
function example_ajax_request() {
$('#example-placeholder').html('<p><img src="http://www.electrictoolbox.com/images/ajax-loader.gif" width="220" height="19" /></p>');
setTimeout('example_ajax_request_go()', 2000);
}
function example_ajax_request_go() {
$('#example-placeholder').load("sample_tutorials.html");
}
</script></p>
<p><input type="button" value="Click Me!" onclick="example_ajax_request()" /></p>
<div id="example-placeholder">
<p>Placeholding text</p>
</div>
now the sample_tutorials.html is the file which is being displayed and what i need is to display more a new file on each click.
thanks.
i found this script over googling.
this is a very basic yet poweful thing.
it displays a html page on click and shows a loading image.
(this is all done using axax)
The problem is that this script only displays one html document and we are looking to display more.
Thanks.
http://www.electrictoolbox.com/load-content-jquery-ajax-loading-image/
coding as following
<script language="javascript">
function example_ajax_request() {
$('#example-placeholder').html('<p><img src="http://www.electrictoolbox.com/images/ajax-loader.gif" width="220" height="19" /></p>');
setTimeout('example_ajax_request_go()', 2000);
}
function example_ajax_request_go() {
$('#example-placeholder').load("sample_tutorials.html");
}
</script></p>
<p><input type="button" value="Click Me!" onclick="example_ajax_request()" /></p>
<div id="example-placeholder">
<p>Placeholding text</p>
</div>
now the sample_tutorials.html is the file which is being displayed and what i need is to display more a new file on each click.
thanks.