Jump to content

[SOLVED] request on other domain


smart85

Recommended Posts

Hi,

I've got problem with AJAX request... I've read forum, but i didn't find solution for this problem.

 

Is there any possibility to make AJAX request for another domain?? I know that AJAX is blocking this kind of requests...

I cann't use file with PHP scripts... only JS. Maybe i can use cookies instead of file with PHP script??

 

Is there any solution for my problem??

Link to comment
Share on other sites

I never heard of an object solution like that, how does that work? I notice that you seem to be specifying a php page on your site:

data="http://mySite.com/script.php"

is that a php page on your site? How does communication between the object and the php page and vice versa work?

Link to comment
Share on other sites

Object is used like simple 'frame'. Inserting one site into another...

 

When you add 'object' tag with data="path_to_your_site" into site on other domain, you can use ajax scripts like you use it on your site...

 

For example:

You have one domain (firstDomain.com), and after page load you want to execute some ajax script from other domain(secondDomain.com/siteWithAJAXScript.htm)... Only way (only way i found), to do that is to execute this ajax from 'object' who is connected with your secondDomain.com.

 

<object width="400" height="400" type="text/html" data="secondDomain.com/siteWithAJAXScript.htm">

</object>

 

On siteWithAJAXScript.htm you must to enter AJAX script who will be execute on firstDomain.com. Script must to have paths to secondDomain.com...

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.