Thanks for your suggestion. I tried it but no luck. If I do it this way...
<body onload="test1()">
<p>Paragraph 2</p>
</body>
<SCRIPT LANGUAGE="JavaScript">
function test1(){
alert("popup 1");
}
window.onload = function test2(){
alert("popup 2");
}
</script>
<body>
<p>Paragraph 1</p>
</body>...
i have a main.jsp file whose <body onload="doSomething()"> works perfectly on its own.
however, if i instead call AAA.jsp which includes/embeds 2 jsp files (main.jsp and menu.jsp), the onload of main.jsp no longer works. i suspect it is because AAA.jsp also has its own onload function and for...
looks like the automatically generated ejb files have not been refreshed. are you using eclipse/wsad? if so, regenerate the ejb classes (try deleting the previous copies first - just the ones that were automatically generated - not the actual bean and interface you coded) and redeploy.
I see. I noticed the submitting when I was playing around with the code earlier but couldnt understand why it would submit the form. I didnt know this was default for an input type of image. Thanks to both for your input!
Just wondering, in code such as the one below, what exactly does the "return false" do?
function clearForm(){
document.form1.firstname.value="";
document.form2.lastname.value="";
}
<input type="image" src="clear.jpg" name="clear" onClick="clearForm();return false;">
I was playing around with the code and it's weird but apparently, this code:
<input type="image" src="/images/change.jpg" border=0 name="Change" onclick="window.history.back()">
and this one:
<A href="javascript:window.history.back()"><IMG src="/images/change.jpg"></A>
have different...
I have "order.jsp" with a bunch of textboxes where user inputs some
data and "confirm.jsp" which extracts user input and displays it on
screen for verification.
here is my problem: on "confirm.jsp", i have a button called "change"
that should go back to the order.jsp with the user's original...
I have a StringBuffer object in B.jsp that collects various String objects passed from some A.jsp and displays it on the screen.
B.jsp:
String name_input = request.getParameter("name");
String address_input = request.getParameter("address");
String comment_input =...
if i understand you correctly, you wish to be forwarded to some page depending on what is selected from the drop down menu. is that right? in that case, you may try something like:
-----------------------------------------------------
<%@ page import="javax.servlet.RequestDispatcher"%>
<%...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.