aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Problem with http request and external javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem with http request and external javascript" Watch "Problem with http request and external javascript" New topic
Author

Problem with http request and external javascript

supriya riya
Ranch Hand

Joined: Feb 23, 2009
Posts: 41
When i had inserted javascript code in script tag in jsp file,it was working fine,but as soon as i cut the code and created new folder js and in that created a new index.js file and plced the javascript code my function in js file not working properly specially the htttp.responseText i get is empty in alert box,but my clear text functions are working fine.I get Http monitor error
that is
WARNING *********** NetBeans HTTP Monitor ************
The request cannot be recorded most likely because the NetBeans HTTP Monitor module is disabled. To fix this problem, go to the IDE and either set your server not to use the HTTP Monitor in the Server Manager or enabled the HTTP Monitor module in the Module Manager (under the Web module category).
NotifyUtil::java.lang.OutOfMemoryError: Java heap space


i hope i am giving the servelet path right in http.open method.
help needed .



my index.jsp where iam callin index.js



index.js in js folder





Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Your server is not going to resolve

# var pidd=finalArray[j];
# var u1='<%=request.getContextPath()%>/DisplaySubCategaryForm?cateid='+pidd ;
# var newRow = tb1.insertRow(i);
# var newCell = newRow.insertCell(0);
# var link ='<%=request.getContextPath()%>/DisplaySubCategaryForm?cateid='+pidd;
# //alert("link"+link);
# var hyper =' ';
#

since you are not in a jsp, you are in a text file.

Eric
supriya riya
Ranch Hand

Joined: Feb 23, 2009
Posts: 41
thanks removing request.getContextPath() helped solving my error.I am getting the output as expected.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with http request and external javascript
 
Similar Threads
ajax:Callback function not being called for every readystate change for first request
Ajax related changes in IE 7 or 8
AJAX (Old wine in new bottle!)
problem in javascript output from http.response after creating external javascript file-jsp
Notify Users before session expires