Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem while submitting action through JavaScript

 
Anshul Jain
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am facing a problem while submitting struts action through JavaScript.
I am submitting form using a JavaScring function which is called on Click of a link. function is like this:
function sf() {
document.forms[app].action = "/sub/app1/GetList.do";
document.forms[app].submit();
}

My web application name is "APP". Now when I click the link the action which is called on my IE browser is
https://localhost:8080/sub/app1/GetList.do

which does not have application name after localhost and it gives me 404: resource not found error whereas the right action should be
https://localhost:8080/APP/sub/app1/GetList.do

Is there anything wrong in my weblogic application setup?
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
change this too

document.forms[app].action = "/sub/app1/GetList.do";

To

document.forms[app].action = "sub/app1/GetList.do";

This may work....i am not sure
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic