473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

help in php and Sajax

Hello ,
I get an error like this : 'object expected' . Can anyone please help ?
The code from the example is is as shown : I used Sajax library
Expand|Select|Wrap|Line Numbers
  1. <?
  2.     require("Sajax.php");
  3.  
  4.     function multiply($x, $y) {
  5.         return $x * $y;
  6.     }
  7.  
  8.     sajax_init();
  9.     // $sajax_debug_mode = 1;
  10.     sajax_export("multiply");
  11.     sajax_handle_client_request();
  12.  
  13. ?>
  14. <html>
  15. <head>
  16.     <title>Multiplier</title>
  17.     <script>
  18.     <?
  19.     sajax_show_javascript();
  20.     ?>
  21.  
  22.     function do_multiply_cb(z) {
  23.         document.getElementById("z").value = z;
  24.     }
  25.  
  26.     function do_multiply() {
  27.         // get the folder name
  28.         var x, y;
  29.  
  30.         x = document.getElementById("x").value;
  31.         y = document.getElementById("y").value;
  32.         x_multiply(x, y, do_multiply_cb);
  33.     }
  34.     </script>
  35.  
  36. </head>
  37. <body>
  38.     <input type="text" name="x" id="x" value="2" size="3">
  39.     *
  40.     <input type="text" name="y" id="y" value="3" size="3">
  41.     =
  42.     <input type="text" name="z" id="z" value="" size="3">
  43.     <input type="button" name="check" value="Calculate"
  44.         onclick="do_multiply(); return false;">
  45. </body>
  46. </html>
Oct 28 '08 #1
1 1323
Markus
6,050 Expert 4TB
Littlecoder, please read the Forum Guidelines especially on How to ask a question. Use didn't use code tags. Please do so in future.

Also, may I ask how this involves PHP? I'm not sure it does; if you get a JavaScript error, then the error is JavaScript - not PHP.

I'll wait for your response and then move this thread if needs be.
Oct 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
4
by: namemattersnot | last post by:
Re, SCENARIO: User clicks a link and a javascript function creates dynamic content in <div id="content"></div> using: document.getElementById("content").innerHTML = something In the page's...
0
by: Clovis818 | last post by:
Well i have a problem i want to be able to run my messenger and music player or every page on my site just right now not much of the site is using Ajax or sajax, is there a way to load a php...
0
by: funkychicken818 | last post by:
From: FunkyChciekn818 - view profile Date: Tues, Apr 25 2006 6:49 pm Email: "FunkyChciekn818" <funkychicken...@gmail.com> show options Reply | Reply to Author | Forward | Print | View...
1
by: danxavier | last post by:
I successfuly installed dd.php and sajax.php files. It runs fine, but I would like to link the $items to an image. I called the field in mysql with the link "pic". Any help would be AWESOME!!! I've...
0
by: The Godfather | last post by:
Hi, i write an entire site using sajax and php and I found it very powerful and useful. But yesterday my client had formatted the ubuntu server and when server is come back online a strange thing...
5
banning
by: banning | last post by:
please feel free to delete this... i am an idiot... here is my code that works in case anyone was curious as to what i was trying to accomplish... <? require("Sajax.php"); function...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.