473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Send GET request to server1 with Javascript then AjaxAnywhere.getAJAX(server2Url, "someZone")

How can I do that? Is it possible to send a server request (i.e. GET)
without refreshing the web page? Using Javascript? Or Ajax (i.e.
AjaxAnywhere)?

Or if there's a way (i.e. using AjaxAnywhere) to send the 1st GET
request without updating any zone to server #1? If so, then I can
send the 2nd GET request to server #2 and update a particular zone in
the web page.

Thanks,
Jimmy

Aug 3 '07 #1
5 3107
Thanks for comment.

In short, can you or where can I find sample of Javascript that does
GET request without refreshing the page?

Thanks,
Jimmy

P.S.

By the way, there is "prototype.js" in our project. Is there pre-
written anything in there we call for this purpose?

http://ajaxanywhere.sourceforge.net/

Aug 3 '07 #2
Jimmy wrote:
In short, can you or where can I find sample of Javascript that does
GET request without refreshing the page?
As I wrote (and you did not care to quote[1]), that depends on what you
are trying to achieve *exactly*. What are you requesting from the
server and what are you going to do with the response?
By the way, there is "prototype.js" in our project. Is there pre-
written anything in there we call for this purpose?
Yes, but you should dump it anyway and use your own code instead.
See my sig.
PointedEars
___________
[1] http://www.jibbering.com/faq/faq_notes/clj_posts.html
http://netmeister.org/news/learn2quote.html
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not the
best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Aug 3 '07 #3
I'm trying to send a GET request from server #1 to server #2.

e.g. URL to perform task in server #2
http://server-2:8080/anotherWebApp/t...assword=passwd

I like to use javascript to send the above GET request (in a test.jsp
of someWebApp.war in server #1) to anotherWebApp in server #2.

Then, I like to hit server #1 from test.jsp (using Ajax?) to update a
zone (testZone) inside test.jsp.

e.g. URL to pick up the latest change in server #1 (Ajax call in
test.jsp)
http://server-1:8080/someWebApp/upda...&zone=testZone

Hope this make the question more clear, thanks again.
Jimmy

Aug 3 '07 #4
Allow me to ask this question differently ...

Does the web browser allow Ajax to send a GET request (in the
Javascript code inside the JSP) to make a different & remote server?
Or does this GET request can only send back to the server where the
JSP is in? Just wondering if there's any security issue here which
blocking the request to go out.

If the above is true, then ...

1) create zone to update JSP with Ajax in server #1
2) send GET request (using Ajax) to server #1 with Javascript function
inside JSP
3) server #1 recieve request (from browser in this case) then map to
GET request of server #2
3) server #1 send GET request to server #2 (server-to-server GET
request to perform some task on server #2)
4) server #1 get result from server #2 then process it
5) update zone by sending another GET request to server #1

Thanks for comment,
Jimmy

Aug 10 '07 #5
Allow me to ask this question differently ...

Does the web browser allow Ajax to send a GET request (in the
Javascript code inside the JSP) to make a different & remote server?
Or does this GET request can only send back to the server where the
JSP is in? Just wondering if there's any security issue here which
blocking the request to go out.

If the above is true, then ...

1) create zone to update JSP with Ajax in server #1
2) send GET request (using Ajax) to server #1 with Javascript function
inside JSP
3) server #1 recieve request (from browser in this case) then map to
GET request of server #2
3) server #1 send GET request to server #2 (server-to-server GET
request to perform some task on server #2)
4) server #1 get result from server #2 then process it
5) update zone by sending another GET request to server #1

Thanks for comment,
Jimmy

Aug 10 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: reneeccwest | last post by:
How can I simulate HTTP post request by JavaScript? When I select from <SELECT> combo box. onClick will call JavaScript function. I want this function to send HTTP POST request with the selected...
5
by: Prabhat Nath | last post by:
Hi All, Is that possible that I can send request to IIS Server after a .ASP page is displayed? My Requirement is: Clinet will Fill the Details in one Request Form after the details are...
1
by: nic | last post by:
Hi, I have a page where I need to send a request to another website, get the response and display it on the page. Does anyone know of any examples on how to do this? Thanks
0
by: Kevin Burton | last post by:
I have an HttpModule that during the learning process I have wired up all events that are possible to handle just to see what is available and when things occur. There are two events that I don't...
1
by: Kevin | last post by:
I need to send a request to a jsp with data added to the http request header. I am using Webclient to send the request and I am putting the returned string (html) into a label on my aspx page but...
1
by: mich dobelman | last post by:
I am using the snoopy.class.php to send some http request. Does anyone know if it allows to send request with specific encoding? What i want to do is sending japanese as a parameter. But always...
17
by: harmiksingh | last post by:
Hi, I am trying to create and send a HTTP Request from a .js file to my server. But when I do this using the GET method and send the necessary parameters along in the URL, i have a problem. That...
0
by: panku007 | last post by:
Hi all, I have one jsp page in that page three frames are created and one of three frame, one jsp page is displaying and from that page i want to send request to servlet from one frame...
1
by: mvenkatesan | last post by:
hi I sent soap xml to web server for reqeust but webserver doesnot send request what is the problem? I written some tag soap envelop, encoding and request tag where is put webserver address?...
13
by: mofmans2ndcoming | last post by:
Hi all, I have looked through MSDN on this one and can't seem to find the answer anywhere. I have created a JavaScript that will launch a meeting request for an address selected from a list....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.