Solved

Using Javascript in ASPX Web Form with Master Page - ClientID

Posted on 2014-07-18
11
409 Views
Last Modified: 2014-07-18
I am taking code that runs in Coldfusion and convert to vb aspx net.  I have javascript that I need to incorporate ClientID due to master page in web form.

having trouble trying to set up probably. I have onfocus() that works fine.(easy one). the function cnt1 to count characters not working. I am sure my sytnax is off but cannot figure out how to adjust.
Attached the  excerpt of code and screen display.
Aspx-page.docx
0
Comment
Question by:mahpog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
11 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40204724
Just so nobody else has to open a word file I have placed it here.   Please use the code box and image upload to show what you need.  



screen
<Script Language=JavaScript>
function cnt1(w,x){
var y=w.value;
var r = 0;
a=y.replace(/\s/g,' ');
a=a.split(' ');
for (z=0; z<a.length; z++) {if (a[z].length > 0) r++;}
x.value=r;
}

function TabOver()
{
window.document.empi.desc1.focus();
}
</Script>

Excerpt:
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td align="left" colspan="3" style="font-weight:900;font-size:9pt;background-color:#e0e0e0;color:red;">(200 Word Limitation. When Saving - ANY excess will be truncated!)</td>

Open in new window

0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 250 total points
ID: 40204730
When I take your code and add a table tag, this is what I get http://jsbin.com/cegib/1/edit

It does not seem to be useable.  Can you please update your code.


<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <table>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td align="left" colspan="3" style="font-weight:900;font-size:9pt;background-color:#e0e0e0;color:red;">(200 Word Limitation. When Saving - ANY excess will be truncated!)</td>
    </table>
</body>
</html>

Open in new window

0
 
LVL 21

Assisted Solution

by:Randy Poole
Randy Poole earned 250 total points
ID: 40204798
You are missing this from the second page of the word file Scott:
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:">&nbsp;
Word Count:<asp:textbox runat="server" ID="c1"  ReadOnly="True" Wrap="False" onkeyup="cnt1(document.getElementById('<%=c1.ClientId %>').value,this)" onfocus="return TabOver();"></asp:textbox>
</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td align="right" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Total Team Award Amounttal Team Award Amount</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td align="left" colspan="3" style="font-weight:bold;font-size:10pt;background-color:yellow;color:black;">Describe Individual / Team Behaviors and Accomplishments</td>
<%--<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>--%>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td colspan="8">
    <asp:textbox runat="server" ID="desc1" rows="4" wrap="True"  onkeyup="cnt1(this,document.getElementById('<%=c1.ClientId %>').value)"
     onclick="cnt1(this,document.getElementById('<%=c1.ClientId %>').value)" 
    CssClass="ErrorMessage" TextMode="MultiLine" Width="900px" >*</asp:textbox>

</td>
</tr>

Open in new window

0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:mahpog
ID: 40204800
I have taken out items cannot display over intenet, and simplified the master page (no code in code behind used)
- I also placed original code for javascript function cnt1

aspx.code:
<%@ Page Title="" Language="VB" MasterPageFile="~/Home/MasterPages/MasterPage3.master" AutoEventWireup="false" CodeFile="emp_i_bk.aspx.vb" Inherits="Home_emp_i_bk" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<Script Language="javascript">
    function cnt1(w, x) {
        var y = w.value;
        var r = 0;
        a = y.replace(/\s/g, ' ');
        a = a.split(' ');
        for (z = 0; z < a.length; z++) { if (a[z].length > 0) r++; }
        x.value = r;
    }


    function TabOver() {
        document.getElementById('<%=desc1.ClientID%>').focus();
    }

</Script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">

<%--<body onload="popWindow()">--%>

<table border="1" cellspacing="0" cellpadding="0">

<tr height="25">
<td align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Team Members&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Employee No.</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Employee Name</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Business</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Business Unit</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Dept. (CCtr)</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Salary Grade</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Title</td>
<td align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Award Amount</td>
</tr>
<%--team 1--%> 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
<%--team 2--%>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
<%--team 3--%>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
<%--team 4--%>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
<%--team 5--%>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
<%-- blank 6 --%>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
<%--blank 7--%>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
<%--blank 8--%>
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td align="left" colspan="3" style="font-weight:900;font-size:9pt;background-color:#e0e0e0;color:red;">(200 Word Limitation. When Saving - ANY excess will be truncated!)</td>

<%--<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">--%>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:">&nbsp;
Word Count:<asp:textbox runat="server" ID="c1"  ReadOnly="True" Wrap="False" onkeyup="cnt1(document.empi.w,this)" onfocus="return TabOver();"></asp:textbox>
</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td align="right" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Total Team Award Amounttal Team Award Amount</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td align="left" colspan="3" style="font-weight:bold;font-size:10pt;background-color:yellow;color:black;">Describe Individual / Team Behaviors and Accomplishments</td>
<%--<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>--%>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>

<tr height="25">
<td colspan="8">
    <asp:textbox runat="server" ID="desc1" rows="4" wrap="True"  onkeyup="cnt1(this,document.empi.c1)" onclick="cnt1(this,document.empi.c1)"
    CssClass="ErrorMessage" TextMode="MultiLine" Width="900px" >*</asp:textbox>

</td>
</tr>
</table>
</asp:Content>

Open in new window

masterpage3.master:

<%@ Master Language="VB" CodeFile="MasterPage3.master.vb" Inherits="Home_MasterPage3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <link href="~/Styles/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>

<form id="form1" name="form1" runat="server">
  <div id="PageWrapper">
    <div id="Header"><a id="A1" href="~/" runat="server"></a>
  


<center>
 <h3 style="color:red;font-weight:bold;" align="center">Development</h3> 

    </div>

</body>

</html>

      <div id="MenuWrapper"></div>
    <div id="MainContent">
      <asp:ContentPlaceHolder ID="cpMainContent" runat="server">
      <p>placeholder</p>

      </asp:ContentPlaceHolder>
    </div>
    <div id="Footer">
    
    <table width="900">
  <tbody>
  <tr valign="bottom" align="center">
    <td align="center" width="900" colspan=2><img height=1 alt="blue line" 
      src="../images/footer_line.gif" width="900"></td></tr>
 </tbody>
</table>

</form>

 
    
    </div>
  </div>
    </div>
    </form>
</body>
    </form>

Open in new window

0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40204837
I don't need the asp side.  Just the rendered code to work with.  You can back out the answer on the front end to match what you need on the asp side.

Thanks to randy for showing the 2nd page I have updated.  http://jsbin.com/cegib/2/edit

Can you show me the rendered code for this
 <asp:textbox runat="server" ID="desc1" rows="4" wrap="True"  onkeyup="cnt1(this,document.getElementById('<%=c1.ClientId %>').value)"
     onclick="cnt1(this,document.getElementById('<%=c1.ClientId %>').value)" 
    CssClass="ErrorMessage" TextMode="MultiLine" Width="900px" >*</asp:textbox>

Open in new window

0
 

Author Comment

by:mahpog
ID: 40204861
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="ctl00_Head1"><title>
 
</title>
<Script Language="javascript"> 
    function cnt1(w, x) {
        var y = w.value;
        var r = 0;
        a = y.replace(/\s/g, ' ');
        a = a.split(' ');
        for (z = 0; z < a.length; z++) { if (a[z].length > 0) r++; }
        x.value = r;
    }
 
 
    function TabOver() {
        document.getElementById('ctl00_cpMainContent_desc1').focus();
    }
 
</Script>
<link href="../Styles/styles.css" rel="stylesheet" type="text/css" /></head>
<body>
 
<form method="post" action="emp_i_bk.aspx" id="aspnetForm">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTIzOTE3ODA4OWRktvp/TeNQ4Qtw0bBoaMeS6034kC5u3k3F26bIGPoV6N0=" />
</div>
 
<div class="aspNetHidden">
 
	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAANiR7wpCz4nAJ19rPf+hBitLoC3lcSe6kBqRuHZ80PbxRo75REFO6yKKz2vB92h+5W/KDXYcqFGxxkl+kvok0MWAPJP2LXYpCDKxFBFvhAyDA==" />
</div>
  <div id="PageWrapper">
    <div id="Header"><a href="../" id="ctl00_A1"></a>
  
 
 
<center>
 <h3 style="color:red;font-weight:bold;" align="center">Development</h3> 
 
    </div>
 
</body>
 
</html>
 
      <div id="MenuWrapper"></div>
    <div id="MainContent">
      
 
 
 
<table border="1" cellspacing="0" cellpadding="0">
 
<tr height="25">
<td align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Team Members&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Employee No.</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Employee Name</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Business</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Business Unit</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Dept. (CCtr)</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Salary Grade</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Title</td>
<td align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">Award Amount</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="15%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="25%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td width="5%"  align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="20%" align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td width="15%" align="left" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td align="left" colspan="3" style="font-weight:900;font-size:9pt;background-color:#e0e0e0;color:red;">(200 Word Limitation. When Saving - ANY excess will be truncated!)</td>
 
 
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:">&nbsp;
Word Count:<input name="ctl00$cpMainContent$c1" type="text" readonly="readonly" id="ctl00_cpMainContent_c1" onkeyup="cnt1(document.empi.w,this)" onfocus="return TabOver();" />
</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
<td align="right" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">Total Team Award Amounttal Team Award Amount</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:#e0e0e0;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td align="left" colspan="3" style="font-weight:bold;font-size:10pt;background-color:yellow;color:black;">Describe Individual / Team Behaviors and Accomplishments</td>
 
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
<td align="center" colspan="1" style="font-weight:bold;font-size:10pt;background-color:white;color:black;">&nbsp;</td>
</tr>
 
<tr height="25">
<td colspan="8">
    <textarea name="ctl00$cpMainContent$desc1" rows="4" cols="20" id="ctl00_cpMainContent_desc1" class="ErrorMessage" onkeyup="cnt1(this,document.empi.c1)" onclick="cnt1(this,document.empi.c1)" style="width:900px;">
*</textarea>
 
</td>
</tr>
</table>
 
    </div>
    <div id="Footer">
    
    <table width="900">
  <tbody>
  <tr valign="bottom" align="center">
    <td align="center" width="900" colspan=2><img height=1 alt="blue line" 
      src="../images/footer_line.gif" width="900"></td></tr>
 </tbody>
</table>
 
</form>
 
 
    
    </div>
  </div>
    </div>
    </form>
</body>
    </form>

Open in new window

0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40204883
Maybe Randy can chime in but I am going to be out for a few hours.

Quickly, I see what looks like some problem html at the bottom.  I know this is a bit of work to put together a good test case, but it is important to help give you a good answer.
</form>
 
 
    
    </div>
  </div>
    </div>
    </form>
</body>
    </form>

Open in new window

0
 

Author Comment

by:mahpog
ID: 40205164
I found another way to code the javascript so I do not have to deal with the passing of parameters to the scrpt. This works perfectly and shows how to do using javascript, or even C#.  Slight change to my current code.

http://www.aspnetify.com/2010/12/textbox-textarea-max-number-of-words.html
0
 

Author Closing Comment

by:mahpog
ID: 40205170
thanks again for help.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question