P
pramodrathod007
Hi All,
Is there any way to modify the response got from the script tag's
source URL (src="url")?
I want to restrict the response from loading into the document.
Below is the scenario
-------------------------------
I am using the script tag to send an asynchronous request to a servlet
of other domain.
(As AJAX can not be used to send a cross-domain request)
<script type="text/javascript" src="http://domain:port/app/servleturl?
parm1=val1" />
The above script tag is generated dynamically through javascript and
appended into the head tag.
In the response I am getting the html text
("<html><head><script>window.close();</script></head></html>") which
is causing a syntax error on IE.
Sample test code:
<html>
<head>
</head>
<body>
<!-- Asynchronous request-->
<script src="http://www.google.com"></script>
</body>
</html>
Here I am only bothered about sending the request and don't want do
anything with the response from the servlet.
Is there any way to catch the response text for the script tag as we
do with the XMLHttpRequest object?
Thanks.
Regards,
Pramod
Is there any way to modify the response got from the script tag's
source URL (src="url")?
I want to restrict the response from loading into the document.
Below is the scenario
-------------------------------
I am using the script tag to send an asynchronous request to a servlet
of other domain.
(As AJAX can not be used to send a cross-domain request)
<script type="text/javascript" src="http://domain:port/app/servleturl?
parm1=val1" />
The above script tag is generated dynamically through javascript and
appended into the head tag.
In the response I am getting the html text
("<html><head><script>window.close();</script></head></html>") which
is causing a syntax error on IE.
Sample test code:
<html>
<head>
</head>
<body>
<!-- Asynchronous request-->
<script src="http://www.google.com"></script>
</body>
</html>
Here I am only bothered about sending the request and don't want do
anything with the response from the servlet.
Is there any way to catch the response text for the script tag as we
do with the XMLHttpRequest object?
Thanks.
Regards,
Pramod