Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6388187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:14:52+00:00 2026-05-25T03:14:52+00:00

If i have a website1.com and website2.com , can I send data ( ex:

  • 0

If i have a website1.com and website2.com, can I send data ( ex: value from input ) from website2.com to website1.com and receive result? with no page refresh or redirect. I’d like to use only javascript & ajax, no PHP or jQuery. If it is possible give me an example how to do it.

I thought about creating an script element ( with javascript) on website2.com with src like : website1.com?data=<value from input>, and when script element loads the src, it will show me an result, but maybe there is a better option to do this.

PS: I will have more separated datas to send.

Note: this is not XSS, just a public project for websites, which will need to update datas every x minutes and to send some data to website1.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:14:53+00:00Added an answer on May 25, 2026 at 3:14 am

    Since XmlHttpRequest does not work cross-domain, you have to use JSONP. Basically, this is adding a script tag dynamically as you’re suggesting to do. Then, the server uses your GET datas, does whatever it wants, and usually “prints” a callback function.

    When you call a file using the script tag, it will evaluate everything displayed. This is why, if, on the server side, you’re doing :

    <?php
    echo 'alert(1);';
    ?>
    

    This will be evaluated as javascript. You can then easily understand how to use a callback function (another GET parameter).

    Also, in jQuery, there is an option called ‘jsonp’ when you call $.ajax (using “callback” as default GET parameter, but can be changed).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just purchased a website template from DreamTemplate.com, and have tried to send a
I have to send an XML request to recover data from a remote server
Can anyone help on how can I do to send the data from a
I'm creating a web page that user can send pm , receive it,add contact,response
I have an website where people can place a vote like this: http://mysite.com/vote/25 This
I have two websites: http://example.com http://example.com/sub I have a page, let's say: http://example.com/sub/page1 Is
I have two websites, let's say they're example.com and anotherexample.net . On anotherexample.net/page.html ,
I ask this because I am creating a spider to collect data from blogger.com
I currently have three websites all running from the same DB example websites: www.mysite.com
Say I have a website called a.com , and when a specific page of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.