form-tak php and javascript

form-tak php and javascript

am 12.08.2007 12:13:44 von Michael Schrading

Hello world :-)

My problem ist to have a line like this



the function running() is a Javascript- function which should call a =
php-script, just to set a value in a variable and to know that the form =
has been submitted, and than close this php script.=20

But how to start a php-script within a Javascript-function which will do =
this??

I know it's sunday, but... :-)=20

please for a help or hint wouild be fine.

Michael

Re: form-tak php and javascript

am 12.08.2007 12:41:53 von Ulf Kadner

Michael Schrading wrote:

> But how to start a php-script within a Javascript-function which will do this?

Not really a PHP problem...
Youre javascript keyword to search for is: Ajax (XmlHttpRequest)

So long, Ulf

--
_,
_(_p> Ulf [Kado] Kadner
\<_)
^^

Re: form-tak php and javascript

am 12.08.2007 12:55:50 von Michael Schrading

Thanks Ulf.

One solution to start for me was like =
window.location.href=3D"php-script"; without Ajax but I'm not sure to =
loos the session on doing this!?

Thank you for the hint

Michael

"Ulf Kadner" schrieb im Newsbeitrag =
news:f9mo2q$b6u$00$1@news.t-online.com...
> Michael Schrading wrote:
>=20
>> But how to start a php-script within a Javascript-function which will =
do this?
>=20
> Not really a PHP problem...
> Youre javascript keyword to search for is: Ajax (XmlHttpRequest)
>=20
> So long, Ulf
>=20
> --=20
> _,
> _(_p> Ulf [Kado] Kadner
> \<_)
> ^^

Re: form-tak php and javascript

am 12.08.2007 14:39:49 von Ulf Kadner

Michael Schrading wrote:

> One solution to start for me was like window.location.href="php-script";

Better to doit with a hidden Iframe (0x0 pixel size) if you will dot use
ajax.

And if you will send the session-ID simple prepend it to the used url.

PS.:
I can see you are a german. Why you dont ask youre PHP questions in
de.comp.lang.php.misc? There is no problem if you doit here but maybe
its easier for you to ask in german?

>> --
>> _,
>> _(_p> Ulf [Kado] Kadner
>> \<_)
>> ^^

A bad newsreader you use. Signatures will never be replied.

--
_,
_(_p> Ulf [Kado] Kadner
\<_) Mitglied der Freizeitvögel? ;-)
^^

Re: form-tak php and javascript

am 12.08.2007 15:57:39 von julienplee__hosted__

Le Sun, 12 Aug 2007 12:13:44 +0200, Michael Schrading a écrit :

> Hello world :-)
>
> My problem ist to have a line like this
>
>
>
> the function running() is a Javascript- function which should call a
> php-script, just to set a value in a variable and to know that the form
> has been submitted, and than close this php script.
>
> But how to start a php-script within a Javascript-function which will do
> this??
>
> I know it's sunday, but... :-)
>
> please for a help or hint wouild be fine.
>
> Michael

Hello,

With this sunny sunday, I guess I won't stay long at home :)
However I'll take a few seconds for answering you.

You can give a try to Ajax requests. I allows lightweight server script
call through HTTPXmlRequest and should be OK with most browsers. I used
to create a SCRIPT element for almost the same purpose but it could'nt
work on Safari as Safari refused to load an external source during
creation.

http://developer.mozilla.org/fr/docs/AJAX


Have a nice sunday computing!


Julien

Re: form-tak php and javascript

am 12.08.2007 19:02:44 von Michael Schrading

=20
> PS.:
> I can see you are a german. Why you dont ask youre PHP questions in=20
> de.comp.lang.php.misc? There is no problem if you doit here but maybe=20
> its easier for you to ask in german?

Cause it isn't in my newsgroup list. But thanks alot for Deine Hilfe.

Michael

Re: form-tak php and javascript

am 13.08.2007 08:19:35 von FFMG

Julien Plée;86402 Wrote:
>
> You can give a try to Ajax requests. I allows lightweight server
> script
> call through HTTPXmlRequest and should be OK with most browsers. I
> used
> to create a SCRIPT element for almost the same purpose but it could'nt
> work on Safari as Safari refused to load an external source during
> creation.
>
> http://developer.mozilla.org/fr/docs/AJAX
>
>
> Have a nice sunday computing!
>
>
> Julien

Merci Julien,

If you want the link in German,
http://developer.mozilla.org/de/docs/AJAX
Or in English, http://developer.mozilla.org/en/docs/AJAX

FFMG


--

'webmaster forum' (http://www.httppoint.com) | 'Free Blogs'
(http://www.journalhome.com/) | 'webmaster Directory'
(http://www.webhostshunter.com/)
'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php) | 'Free URL
redirection service' (http://urlkick.com/)
------------------------------------------------------------ ------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=19300

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).