Pessoal…
eh uma coisa meio simples, mas nao funciona de jeito nenhum aki…
sempre q tento submeter meu form, vem um erro de JS dizendo q submit nao eh uma funcao…
meu codigo:
function <portletAPI:encodeNamespace value="doValidateSubmit"/>(actionURL)
{
if (!document.<portletAPI:encodeNamespace value="pagedetail" />.pageTitle.disabled && document.<portletAPI:encodeNamespace value="pagedetail"/>.pageTitle.value == "")
{
alert('<portletAPI:text bundle="nls.properties" key="properties.alert.title.empty"/>');
document.<portletAPI:encodeNamespace value="pagedetail"/>.pageTitle.focus();
}
else {
document.<portletAPI:encodeNamespace value="pagedetail"/>.action = actionURL;
document.<portletAPI:encodeNamespace value="pagedetail"/>.submit();
return false;
}
}
<form name='<portletAPI:encodeNamespace value="pagedetail"/>' method="GET" onsubmit='return false;'>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td valign="top" align="center" height="400" bgcolor="white">
<table border ="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td> </td>
<td valign="top" >
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td colspan="2"><h1><portletAPI:text bundle="nls.properties" key="page.new"/></h1></td>
</tr>
<tr>
<td colspan="2">
<p class="sub-head"><portletAPI:text bundle="nls.properties" key="page.new.info" /></p>
</td>
</tr>
<tr><td> </td></tr>
<tr><td><h2 class="green-dark"><portletAPI:text bundle="nls.properties" key="page.add"/></h2></td></tr>
<tr>
<td><label for="pageTitleId"><portletAPI:text bundle="nls.properties" key="page.name"/></label></td>
<td><input type="text" class="portlet-form-input-field" size="40" name="pageTitle" value="<%= contentnode.title %>" id="pageTitleId" maxlength="250" /><portletAPI:text bundle="nls.properties" key="page.name.info" />
</td>
</tr>
</table>
<p class="float-right">
<span class="button-blue"><input type="button" name="submit" value="Submit" onClick='<portletAPI:encodeNamespace value="doValidateSubmit"/>("<portletAPI:createURI><portletAPI:URIAction name='><%=CustomizerConfig.PROPERTIES_OK%>'/></portletAPI:createURI>"); return false;'/></span>
<a href="<portletAPI:createURI><portletAPI:URIAction name='<%=CustomizerConfig.PROPERTIES_CANCEL%>'/></portletAPI:createURI>" >
<span class="button-blue"><input type="button" name="cancel" value="Cancel"/></span></a>
</p>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
alguma sugestao??
valew