-
How to control jsp through javascript function
i am writing code like this
function show(i)
{
frm.elements[0].value=i;
alert(frm.elements[0].value);
<%
String id1=request.getParameter("h1");
SetIdentity.setId(ss);
ss="again";
%>
alert("after jsp");
}
but the jsp inside <% ...%> is not running when this function show is called. its only running one time
with the program flow.
How to do so. that this code only runs when i call show function
Last edited by shruti; 04-17-2008 at 06:54 AM.
-
Hi Shruti,
JSP runs server side. JavaScript runs on client side, after the response has been sent from JSP. If you view the source form the browser, you will see that the JSP tag will have gone. You will have to use other methods (like Ajax) to get data dynamically from the server.
Similar Threads
-
Replies: 26
Last Post: 12-01-2012, 04:12 AM
-
Replies: 7
Last Post: 02-22-2007, 07:40 PM
-
Replies: 0
Last Post: 03-26-2003, 02:17 PM
-
Replies: 1
Last Post: 01-08-2002, 02:48 PM
-
By Murray Foxcroft in forum Web
Replies: 5
Last Post: 11-02-2000, 02:42 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks