Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we use servlets in JavaScript?

Answer Posted / balu

we cant use servlets in javascript but we can call a
servlet by retrieving the form and setting the action as
the url.
ex:if our html has a from named 'XXX'

var formName = document.getElementById('XXX');
var url = contextPath + '/desiredServlet';
formName.action = url;
formName.submit();

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is multiple server?

2298


What is the life cycle of a servlet?

1512


What is generic servlet class?

1061


Can we use the constructor, instead of init(), to initialize servlet?

1093


What is the process for chaining servlet?

1043


Describe the phases of servlet lifecycle?

1062


What is the difference between context parameter and context attribute?

1033


What is the servlet?

1085


What is cookie in servlet?

1054


What is servlet instance?

1045


Explain is servlet mapping?

1004


Which is better jsp or servlet?

1046


Describe some assignments that are executed by servlet container?

1075


What is the difference between get and post methods?

1034


Write the code to get the server information in servlet.

1049