The moose likes Struts and the fly likes buttons do not work in netscape4.7 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "buttons do not work in netscape4.7" Watch "buttons do not work in netscape4.7" New topic
Author

buttons do not work in netscape4.7

Nora Green
Greenhorn

Joined: Sep 09, 2003
Posts: 7
I am implementing a struts-based web application. With this jsp page, buttons work perfectly in IE and Netscape7.0, but these buttons(add and save)do not work at all in Netscape4.7. Could anyone give me a hand? Thanks very much.
Here is the jsp code:
<%-- code start --%>
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<html>
<head>
<title>Test</title>
</head>
<script language="Javascript">
function submitPage(button){
if (button=='add') {
document.forms[0].action = "../jsp/page1.do?task=add";
document.forms[0].submit();
}
if (button=='save') {
document.forms[0].action = "../jsp/page1.do?task=save";
document.forms[0].submit();
}
}
</script>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">

<html:form action="/jsp/test.do?task=get" name="testForm" type="formbeans.TestForm" scope="session">

<tr>
<td colspan="4"> </td>
</tr>

</html:form>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="3">
<%--THE ADD BUTTON--%>
<html:link href="javascript:submitPage('add')"><html:img srcKey="imgRecSetNav.btnAdd.src" border="0"/></html:link>
<%--THE SAVE BUTTON--%>
<html:link href="javascript:submitPage('save')"><html:img srcKey="imgModFunct.btnSave.src" border="0"/></html:link>

</td>
<td width="19%"> </td>
</tr>

<tr>
<td colspan="4"> </td>
</tr>
</table>
</body>
</html>
<%-- code end --%>
Thanks again,
Nora
Nora Green
Greenhorn

Joined: Sep 09, 2003
Posts: 7
No one interested in? Any suggestion, comments? Anything is appreciated.
Nora Green
Greenhorn

Joined: Sep 09, 2003
Posts: 7
The problem was solved! It is because the formbean is empty which has no property inside. We keep the empty formbean to make structure consistent. The Netscape4.7 does not like the empty formbean, then stopping submit the form. Just let you know the result in case you have interested in it.
Nora.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: buttons do not work in netscape4.7
 
Similar Threads
using Multiple submit buttons.
pass a variable in the URl
images not display on Struts forwarding JSP page
Images are not coming in JSP pages
Problem with buttons action in jsp page