...

View Full Version : how to connect javascript to PHP without ajax



isaac_cm
06-24-2006, 05:26 PM
after I experienced some problem with my host is there any alternatives to ajax

I want to hook some user events (like mouse click) to execute php function

any idea ?

GJay
06-24-2006, 05:31 PM
A request needs to be made to the server. This can either be a standard GET/POST from a link/form submission, or something in the background. The latter method is known typically as AJAX, and can be achieved either with javascript's XMLHttpRequest (or an ActiveX equivalent...) or by loading a hidden iframe (you can probably tap into Flash some how as well...).
Perhaps you could expand on 'Problems with your host'? There's nothing inherent to XMLHttpRequest (probably the most common way to achieve what it seems you want) that will cause server-side problems.

isaac_cm
06-24-2006, 10:57 PM
I upload my site to host company in UK and the site loading is slow and when I try the same site in USA host company the site runs ajax get method faster

so I wish if there is a more standrad way to connect javascript to php I feel that ajax is not a new technology but a work around solution to somthing should be exists in web programming in the first place

any way thanks

Beagle
06-26-2006, 03:53 PM
You latency is different based on your geography. The people using your site from the UK on your UK host will see it run faster.

It's just the truth of the net.

Anyway, like was said, if you're not gonna make requests using Javascript (AJAX) then you're going to have to submit forms like the way people used to do things.

AJAX doesn't run fast or slow because of the host, it's the data pipe. Your page will load just as slowly (or slower) with normal form posts.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum