|
Posted by Robert Cummings on 09/30/05 05:56
On Thu, 2005-09-29 at 22:46, xfedex wrote:
> Hi,
>
> I did the "Rasmus' 30 second AJAX Tutorial" just for testing and everything
> works fine, by the way... thanks Rasmus, for this and for all !!.
> My little script have a single <input> and for every keystroke (calling the
> javascript function with onkeyup) the value of the input is parsed by
> another php script that just return the lenght of the string. So, if I start
> typing the word "hello", when i press the "h" key it displays 1, for "ho" it
> displays 2 and so on....very simple, just for testing.
>
> But (theres always a "but"!!) it seems that only work if I call the function
> sndReq(); with onkeyup. If I call the function from a onsubmit it
> returns...nothing!.
> Then alert('response:'+http.responseText); it's EMPTY.
>
> Im absolutely sure that the difference between the two scripts is that the
> one that works is the onkeyup, and the one that not is the onsubmit.
>
> So, anybody knows why this is happening?
Aside from using ajax to clean the toilet once in a while I'm not really
into it. But I do wrangle out some javascript from time to time :) Why
are you using onsubmit? Wouldn't onclick work better?
Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
Navigation:
[Reply to this message]
|