Hi ,
i used the Sajax library.But an error occurs : 'object expected'. Can anyone help ?
The code is as shown below :
<?
require("Sajax.php");
function multiply($x, $y) {
return $x * $y;
}
sajax_init();
// $sajax_debug_mode = 1;
sajax_export("multiply");
sajax_handle_client_request();
?>
<html>
<head>
<title>Multiplier</title>
<script>
<?
sajax_show_javascript();
?>
function do_multiply_cb(z) {
document.getElementById("z").value = z;
}
function do_multiply() {
// get the folder name
var x, y;
x = document.getElementById("x").value;
y = document.getElementById("y").value;
x_multiply(x, y, do_multiply_cb);
}
</script>
</head>
<body>
<input type="text" name="x" id="x" value="2" size="3">
*
<input type="text" name="y" id="y" value="3" size="3">
=
<input type="text" name="z" id="z" value="" size="3">
<input type="button" name="check" value="Calculate"
onclick="do_multiply(); return false;">
</body>
</html>
PHP and Sajax
Moderator: General Moderators
Re: PHP and Sajax
Post the HTML of your page.
-
littlecoder
- Forum Commoner
- Posts: 26
- Joined: Fri Oct 17, 2008 4:36 am
Re: PHP and Sajax
Hi,
But the button is of type 'button' and not 'Submit' . So i doubt whether POST will help ?
But the button is of type 'button' and not 'Submit' . So i doubt whether POST will help ?
Re: PHP and Sajax
littlecoder wrote:Hi,
But the button is of type 'button' and not 'Submit' . So i doubt whether POST will help ?
As defined here.post, v:
16a. to send (a message) to a newsgroup.