Wu Tang

Greenhorn
+ Follow
since Oct 31, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Wu Tang

Hello I'm unfamiliar with JS and I need to find a way to disable a form I've created once a condition is met. Essentially, I will pull data from a database and bases on that data the page will be editable or read only. I know how the pull the information, but don't know how to disable the page using Java Script. Here is my code:
javascript:%20x()

<html:form action="/SpecifyProjectRank.do">
<input type="hidden" name="allAppByUser" value="<bean:write name="sessionUser" property="username"/>" />
<html:hidden property="projectCode"/>
<html:hidden property="allocationID"/>
<table width="100%" height="100%">
<tr>
<td id="projectHeader" height="20%">
<h1 style="font-size:9pt;font-weight:bold;height:20px;margin:0;padding:0">Allocation</h1>
<table width="100%" class="main">
<tr>
<tr>
<td align="left"><b>Fiscal Year:</b><br>
<html:text property="years" style="border:none;"disabled="false"/></td>
<td align="left"><b>Service:</b><br>
<html:text property="serviceName" style="border:none;"disabled="false"/></td>
<td align="left"><b>Base:</b><br>
<html:text property="baseName" style="border:none;"disabled="false"/></td>
<td align="left"><b>State:</b><br>
<html:text property="stateCode" style="border:none;"disabled="false"/></td>
<td align="left" width="20%"><a href="#">View Proposal PDF</a></td>
</tr>
<tr>
<td align="left"><b>Primary Justification:</b>
<html:text property="justDesc" style="border:none;" disabled="false"/></td>
<td align="left"><b>Serivce Rank:</b>
<html:text property="serviceProjectRank" style="border:none;" disabled="false"/></td>
<td align="left"><b>Project Status:</b>
<html:text property="statusDesc" style="border:none;" disabled="false"/></td>
<td> </td>
<td align="left"><a href="EditProject.do?projectCode=<%=((HttpServletRequest)req).getParameter("projectCode")%>"/>Edit Details</a></td>
</tr>
<tr>
<td align="left"><b>Created On:</b>
<html:text property="dateCreated" style="border:none;"disabled="false" /></td>
<td align="left"><b>Created By:</b>
<html:text property="createdByUser" style="border:none;" disabled="false"/></td>
<td align="left"><b>Updated On:</b>
<html:text property="dateLastUpdated" style="border:none;" disabled="false"/></td>
<td align="left"><b>Updated By:</b>
<html:text property="updatedByUser" style="border:none;" disabled="false"/></td>
</tr>
<tr>
<td align="left"><b>Headquarters POC Name:</b><br>
<html:text property="hQPocName" style="border:none;" disabled="false"/></td>
<td valign="top" align="left"><b>Headquarters POC Phone:</b><br>
<html:text property="hQPocPhone" style="border:none;" disabled="false"/></td>
<td valign="top" align="left"colspan="2"><b>Headquarters POC Email:</b><br>
<html:text property="hQPocEmail" style="border:none;" disabled="false"/></td>
</tr>
<tr>
<td align="left">
<b>Total Proposed Project Funds:</b><br>
<html:text property="proposedTotal" style="border:none;" disabled="false"/>
<td align="left">
<b>Total Project Funds Expended to Date:</b><br>
<html:text property="expToDate" style="border:none;" disabled="false"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="projectTabs" height="%" valign="top" align="left">
<table class="main">
<tr>
<td style="border:solid grey 1px;background-color:lightgrey"><a href="ProjectDetailProposalService.do?projectCode=<%=((HttpServletRequest)req).getParameter("projectCode")%>"/>Proposal</a></td>
<td style="border:solid grey 1px">Allocation</td>
<td style="border:solid grey 1px;background-color:lightgrey"><a href="ProjectDetailObligation.do?projectCode=<%=((HttpServletRequest)req).getParameter("projectCode")%>"/>Obligation</a></td>
<td style="border:solid grey 1px;background-color:lightgrey"><a href="ProjectDetailExpenditure.do?projectCode=<%=((HttpServletRequest)req).getParameter("projectCode")%>"/>Expenditure</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" class="main" >
<tr>
<td valign="top" align="left"><b>Initial OSD Rank:</b><br>
<html:text property="initialOsdRank" styleClass="required" disabled="false"/>
</td>
<td valign="top" align="left"><b>Initial Allocation:</b><br>
<html:text property="initialAllAmount" disabled="false"/>
</td>
</tr>
<tr>
<td valign="top" align="left"><b>Revised OSD Rank:</b><br>
<html:text property="revisedOsdRank"disabled="false"/>
</td>
<td valign="top" align="left"><b>Revised Allocation:</b><br>
<html:text property="revisedAllAmount"disabled="false"/>
</td>
</tr>
<tr>
<td valign="top" align="left"><b>Final OSD Rank:</b><br>
<html:text property="finalOsdRank" styleClass="required" disabled="false"/>
</td>
<td valign="top" align="left"><b>Final Allocation:</b><br>
<html:text property="finalAllAmount" styleClass="required" disabled="false"/>
</td>
</tr>
<tr>
<td valign="top" align="left" colspan="2"><b> Notes:</b><br>
 <html:textarea property="allNotes" style="width:50%;"disabled="false">
</html:textarea>
</td>
</tr>
</td>
</tr>
</table>
</table>
</html:form>
javascript:%20x()
Thank you for your replies. I understand what needs to be done the question is how to go about doing it.
15 years ago
JSP
The '$' character is being appended to the value in a database script the '$' character is only for display purposes and I need to remove it before I submit the data to the database.
15 years ago
JSP
Hello,

I�m trying to remove a character �$� from my jsp form before its submitted to the database since the database doesn�t accept �$�. I�ve been reading about the replace function but I�m unsure how to implement it. Does anyone know how to implement the replace function in JSP? Here is a snippet of my code:
javascript:%20x()
<tr>
<td valign="top" align="left"><b>Estimated Total Partner Funds::</b>
<br><html:text property="estTotalFunds" styleClass="required" />
</td>
</tr>
javascript:%20x()

The property=estTotalFunds is the variable that contains the values. Essentially, the value comes in $22.00 and I need it to be 22.00 before I submit it to the database.

Any assistance would be greatly appreciated.
Thank you.
15 years ago
JSP