simple jquery fetch from mysql
Posted
by JPro
on Stack Overflow
See other posts from Stack Overflow
or by JPro
Published on 2010-04-06T15:22:28Z
Indexed on
2010/04/06
15:23 UTC
Read the original article
Hit count: 417
I am trying to use jQuery with MYSQL and I wrote something like this :
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
function example_ajax_request() {
$('#example-placeholder').html('<p>Loading results ... <img src="ajax-loader.gif" /></p>');
$('#example-placeholder').load("loadres.php");
}
</script>
</head>
<body>
<div id="query">
<select name="show" id="box" >
<option value="0">Select A Test</option>
<option value="All">--All--</option>
<option value="M1">Model1</option>
</select>
<input type="button" onclick="example_ajax_request()" value="Click Me!" />
</div>
<div id="example-placeholder">
<p>Placeholding text</p>
</div></body>
</html>
Basically I want to pass parameters to the loadres.php
file. But unable to figure out the exact way to do.
Any help is appreciated.
Thanks.
© Stack Overflow or respective owner