| | |
javascript inserting between jsp
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
hi
i have a problem in running javascript code between jsp page..
lets below is my jsp body .
in the above code there is no problem in running javascipt .. it gives hi alert easily but.. for below
but if above i include any jsp forward page tag or sendRedirect function then this javascript does'nt run..
please help me
i m stuck with this problem..
thnx in advance
i have a problem in running javascript code between jsp page..
lets below is my jsp body .
jsp Syntax (Toggle Plain Text)
<body> <script language="javascript" > alert("hi"); </script> <h1>hello</hello> <% System.out.println("hello"); %> </body>
in the above code there is no problem in running javascipt .. it gives hi alert easily but.. for below
<body>
<script language="javascript" >
alert("hi");
</script>
<h1>hello</hello>
<% System.out.println("hello"); %>
<jsp:forward page="page1.jsp" />
</body>but if above i include any jsp forward page tag or sendRedirect function then this javascript does'nt run..
please help me
i m stuck with this problem..
thnx in advance
Last edited by peter_budo; Oct 22nd, 2009 at 1:02 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
0
#2 Oct 24th, 2009
Do not use forward action. As we know the action forward sends the dynamic content of html of the page1.jsp to web-browser.
Use include action.
Use include action.
JSP Syntax (Toggle Plain Text)
<body> <script language="javascript" > alert("hi"); </script> <h1>hello</hello> <% System.out.println("hello"); %> <jsp:include page="page1.jsp" /> </body>
Last edited by adatapost; Oct 24th, 2009 at 12:55 am.
![]() |
Similar Threads
- How to embed JavaScript code into JSP... (JSP)
- My JSP does not read the javascript (JSP)
- JSP sessions in javascript (JSP)
- How to pass value from jsp to javascript (JavaScript / DHTML / AJAX)
- javascript &JSP (JSP)
- javascript variable in jsp session (JSP)
- How to store javascript variable in jsp session (JSP)
Other Threads in the JSP Forum
- Previous Thread: JSP: search string for bad characters.
- Next Thread: java servlets help???
Views: 1043 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for javascript, jsp
2.0 adobe adobeacrobat ajax ajaxexample apache api array automatically box c# cakephp cart checkbox class close codeinjection codes coldfusion column combobox connection createrange() database debugger decimal dependent development dom download dropdownlist element email epilepsy events ext external firefox flash form frameworks glassfish google griefers gwt gxt hackers hiddenvalue html htmlform iframe images java javaee javascript jquery jsf jsfile jsp loop maps masterpage microsoft mp4 mvc2 mysql news pdf php ping post problem programming redirect request.getparameter runtime safari scale scriptlets search select servlet session sessions shopping size software ssl tables text unicode validation variables web webservice window windowofwords windowsxp xml zeroday







