adi501
09-02-2008, 09:52 PM
Hello.
I have a form which has a button named Update_primary. This button is at the bottom of my JSP. I have to scroll down to click on this on this button. When i click on this button it does 2 things.
1) It refreshes the whole page.
2) It is supposed to maintain the focus on the button. Here it is not maintaing the focus.
My Question is how can i maintain the focus on the button when clicked.
I am also sending the HTML form which has the button.
<form name="TblActionForm1" action="<%=page_url%>" method="post">
<%
if ( _ahsPage.isPpolPage() )
{
out.println( "<table width=100% cellspacing=0 cellpadding=0 border=0>" );
out.println( "<tr><td align=right class=verySmall>" );
out.println( " <a href='#' class='ppolSmallLink' onclick=\"javascript:Toggle('quickCreateAddress');\">Create New Address <img src=\"graphics/arrow_btn.gif\" border=0></a>" );
out.println( "</td></tr>" );
out.println( "<tr><td height=3><img src=\"graphics/z0.gif\" height=3></td></tr>" );
out.println( "</table>" );
}
OzPromptSalesAddress _pAddr = new OzPromptSalesAddress(_ahsPage);
DpdUiTable.ColumnHeaderType[] hdrs = new DpdUiTable.ColumnHeaderType[4];
hdrs[0] = new DpdUiTable.ColumnHeaderType( _pAddr, "primary", "PRIMARY_FLAG", "PRIMARY_FLAG", false );
hdrs[1] = new DpdUiTable.ColumnHeaderType( _pAddr, "type", "ADDRESS_TYPE", "ADDRESS_TYPE", true );
hdrs[2] = new DpdUiTable.ColumnHeaderType( _pAddr, "address", "ADDR_LINE1", "ADDRESS", true );
hdrs[3] = new DpdUiTable.ColumnHeaderType( _pAddr, "map", "PRIMARY_FLAG", "MAPQUEST", false );
DpdUiTable uit = new DpdUiTable( "addrs", hdrs );
uit.setDbInfo( "SLS_ADDRESS a", "a.ACTIVE_STATUS='Y' AND a.OWNER_TABLE_NAME='SLS_CUSTOMER' AND a.OWNER_TABLE_ID="+id );
uit.setPkInfo( "a.ADDRESS_ID", "org.oz.sales.customer.Address" );
uit.setSortColumn( 0, true );
uit.processRequest( _ahsPage, request );
%>
<%= uit.render(_ahsPage) %>
<%
if ( cust.accessControlCanUpdate(_ahsPage) )
{
%>
<input class="smallButton" type=button name=btnUpdate value="<%=_pAddr.get("update_primary")%>" onclick="Javascript:document.TblActionForm1.ahsFormAction1.value='UpdateIdentifying'; document.TblActionForm1.submit();">
<BR>
<span class=verySmall><img src="graphics/ozicontip2.gif" align=absmiddle> <%=_pAddr.get("expl_address")%></span>
<%
}
%>
<input type=hidden name=id value="<%=id%>">
<input type=hidden name=ahsFormAction1 value="">
</form>
Thanks in Advance
I have a form which has a button named Update_primary. This button is at the bottom of my JSP. I have to scroll down to click on this on this button. When i click on this button it does 2 things.
1) It refreshes the whole page.
2) It is supposed to maintain the focus on the button. Here it is not maintaing the focus.
My Question is how can i maintain the focus on the button when clicked.
I am also sending the HTML form which has the button.
<form name="TblActionForm1" action="<%=page_url%>" method="post">
<%
if ( _ahsPage.isPpolPage() )
{
out.println( "<table width=100% cellspacing=0 cellpadding=0 border=0>" );
out.println( "<tr><td align=right class=verySmall>" );
out.println( " <a href='#' class='ppolSmallLink' onclick=\"javascript:Toggle('quickCreateAddress');\">Create New Address <img src=\"graphics/arrow_btn.gif\" border=0></a>" );
out.println( "</td></tr>" );
out.println( "<tr><td height=3><img src=\"graphics/z0.gif\" height=3></td></tr>" );
out.println( "</table>" );
}
OzPromptSalesAddress _pAddr = new OzPromptSalesAddress(_ahsPage);
DpdUiTable.ColumnHeaderType[] hdrs = new DpdUiTable.ColumnHeaderType[4];
hdrs[0] = new DpdUiTable.ColumnHeaderType( _pAddr, "primary", "PRIMARY_FLAG", "PRIMARY_FLAG", false );
hdrs[1] = new DpdUiTable.ColumnHeaderType( _pAddr, "type", "ADDRESS_TYPE", "ADDRESS_TYPE", true );
hdrs[2] = new DpdUiTable.ColumnHeaderType( _pAddr, "address", "ADDR_LINE1", "ADDRESS", true );
hdrs[3] = new DpdUiTable.ColumnHeaderType( _pAddr, "map", "PRIMARY_FLAG", "MAPQUEST", false );
DpdUiTable uit = new DpdUiTable( "addrs", hdrs );
uit.setDbInfo( "SLS_ADDRESS a", "a.ACTIVE_STATUS='Y' AND a.OWNER_TABLE_NAME='SLS_CUSTOMER' AND a.OWNER_TABLE_ID="+id );
uit.setPkInfo( "a.ADDRESS_ID", "org.oz.sales.customer.Address" );
uit.setSortColumn( 0, true );
uit.processRequest( _ahsPage, request );
%>
<%= uit.render(_ahsPage) %>
<%
if ( cust.accessControlCanUpdate(_ahsPage) )
{
%>
<input class="smallButton" type=button name=btnUpdate value="<%=_pAddr.get("update_primary")%>" onclick="Javascript:document.TblActionForm1.ahsFormAction1.value='UpdateIdentifying'; document.TblActionForm1.submit();">
<BR>
<span class=verySmall><img src="graphics/ozicontip2.gif" align=absmiddle> <%=_pAddr.get("expl_address")%></span>
<%
}
%>
<input type=hidden name=id value="<%=id%>">
<input type=hidden name=ahsFormAction1 value="">
</form>
Thanks in Advance