It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

How to call a jsp method in javascript file

How to call a jsp method in javascript file

Postby neha_kulkarni777 on Sun Dec 07, 2008 8:14 am

Hi all
Is it possible to put the below code on javascript file

Code: Select all
<%=m.getFormSubmitUrl("frmSubmissionStatus", "ShowReport", null)%>         


When i put the above code in JS file i am getting the error as null.
please help me
neha_kulkarni777
 
Posts: 21
Joined: Tue Nov 04, 2008 12:08 pm

Re: How to call a jsp method in javascript file

Postby palme on Sat Jan 31, 2009 3:12 am

That's not possible because
- <% and %> is start and end of asp file not jave script file or JS
- m.getFormSubmitUrl("frmSubmissionStatus", "ShowReport", null)
m is a class that's defind , may be in a sparate jsp file and here you will use the value of m. and this means you shall have a server include from that file in your JS file and ....
and i think that's the reason result is null or undefind
palme
 
Posts: 37
Joined: Wed Aug 06, 2008 9:18 pm


Who is online

Users browsing this forum: No registered users and 2 guests