As you can probably tell I am new to ASP.NET so please bear with me. I am getting an "Object Expected" error on the INPUT type = "text" on line 179 and 183 and I can't fingure out why. Can someone point me in the right direction. <%
Thanks,
SLTDon
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><
script runat="server"> Dim lUpdateMode As Boolean Dim LastModified As String Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)lastmodified = System.IO.File.GetLastWriteTime(Server.MapPath(Request.ServerVariables(
"SCRIPT_NAME")))lUpdateMode =
False If Page.IsPostBack Then 'Select Case Request.QueryString("B1") 'Case "Add" 'Case "Update" 'Case "Delete" 'Case "Cancel" 'End Select End If End Sub</
script><
html xmlns="http://www.w3.org/1999/xhtml" ><
head > <title>User Type Maintenance</title> <link rel="stylesheet" type="text/css" href="CPM.css" /> <script language="vbscript" type="text/VB"> function Validate() dim lAnyErrorlAnyError =
false end function sub SetFocus(s) set obj = window.event.srcElementobj.className = s
set obj = Nothingend
subfunction
SetShow() set e = window.event.srcElement if e.className = "error" then if not isNull(e.GetAttribute("ERRORNUM")) thene.errornum =
"" end if end if if e.className = "error" thene.className =
"ondata" end if if e.className = "indata" thene.className =
"ondata" end if if ucase(e.type) = "TEXT" then if not isnull(e.GetAttribute("MASK")) thenStripMask e
end if end if if ucase(e.type) = "TEXT" thene.select()
end ifend
functionfunction
DontShow() set e = window.event.srcElement if e.className = "ondata" thene.className =
"indata" end if if ucase(e.type) = "TEXT" then if not isnull(e.getAttribute("MASK")) thenStripMask e
ShowMask e
end if end ifend
function'--------------------------------------------------------------------
' Routine to strip Mask from input data.
'--------------------------------------------------------------------
sub
StripMask(obj)dim
wrkdim
aTblwrk = obj.value
if trim(wrk) = "" then exit sub end if select case Ucase(obj.mask) case "SSN"wrk = replace(wrk,
"-","")obj.value = wrk
case "PHONE"wrk = replace(wrk,
"(","")wrk = replace(wrk,
")","")wrk = replace(wrk,
"-","")wrk = replace(wrk,
" ","")obj.value = wrk
case "ZIP"wrk = replace(wrk,
"-","")obj.value = wrk
case "DATE" if len(trim(wrk)) = 0 then exit sub end ifwrk = replace(wrk,
"-","/")atbl = split(wrk,
"/") if ubound(aTbl) > 0 then if len(aTbl(0)) = 1 thenaTbl(0) =
"0" & aTbl(0) end if if len(aTbl(1)) = 1 thenaTbl(1) =
"0" & aTbl(1) end ifwrk = aTbl(0) &
"/" & aTbl(1) & "/" & aTbl(2) end ifwrk = replace(wrk,
"/","")obj.value = wrk
end selectend
sub'--------------------------------------------------------------------
' Routine to insert Mask into input data.
'--------------------------------------------------------------------
sub
ShowMask(obj)dim
wrkdim
modim
dydim
yrwrk = obj.value
if trim(wrk) = "" then exit sub end if select case ucase(obj.mask) case "SSN"wrk = left(wrk,3) &
"-" & mid(wrk,4,2) & "-" & mid(wrk,6,4)obj.value = wrk
case "PHONE" if trim(len(wrk)) = 7 thenwrk =
"530" & wrk end ifwrk =
"(" & left(wrk,3) & ") " & mid(wrk,4,3) & "-" & mid(wrk,7,4)obj.value = wrk
case "ZIP" if len(wrk) = 5 then exit sub end ifwrk = left(wrk,5) &
"-" & mid(wrk,6,4)obj.value = wrk
case "DATE" if len(wrk) < 6 thenobj.className =
"error"obj.title =
"Improperly formatted date. Please correct." exit sub end if if len(wrk) > 6 thenyr = right(wrk,4)
wrk = left(wrk,
len(wrk) - 4) elseyr = right(wrk,2)
wrk = left(wrk,
len(wrk) - 2) end ifmo = left(wrk,2)
dy = right(wrk,2)
wrk = mo &
"/" & dy & "/" & yrobj.value = wrk
end selectend
subsub
ShowHelp(Pg) set helpChild1 = window.open(Pg,"MyWindow1","toolbar=no,scrollbars=yes,top=10,left=10,resizable=yes")end
sub</
script></
head><
body class="background" onload="form1.TC.focus()"> <form id="form1" name="form1" action="UserTypeBottom.aspx" onsubmit="return Validate()"> <div> <table border="1" cellspacing="0" align="center"> <tr> <td class="leftSide">Code:</td> <td class="rightSide"><input type="text" name="TC" size="2" maxlength="2" class="indata" onfocus="SetFocus()" onblur="DontShow()"/></td> </tr> <tr> <td class="leftSide">Description:</td> <td class="rightSide"><input type="text" name="Desc" size="30" maxlength="50" class="indata" onfocus="SetFocus()" onblur="DontShow()"/></td> </tr> <tr> <td colspan="2" align="center"><%
If lUpdateMode Then%> <input type="button" value="Update" name="B1" onmouseout="SetFocus('button')" onmouseover="SetFocus('highlightButton')" onfocus="SetFocus('highlightbutton')" onblur="SetFocus('button')" /> <input type="button" value="Delete" name="B1" onmouseout="SetFocus('button')" onmouseover="SetFocus('highlightButton')" onfocus="SetFocus('highlightbutton')" onblur="SetFocus('button')" /><%
end if %><%
If Not lUpdateMode Then%> <input type="button" value="Add" name="B1" onmouseout="SetFocus('button')" onmouseover="SetFocus('highlightButton')" onfocus="SetFocus('highlightbutton')" onblur="SetFocus('button')" /><%
end if %> <input type="button" value="Cancel" name="B1" onmouseout="SetFocus('button')" onmouseover="SetFocus('highlightButton')" onfocus="SetFocus('highlightbutton')" onblur="SetFocus('button')" /> </td> </tr> </table> </div> </form> <p align="center"><button onclick="parent(0).location='userTypeTop.aspx'">Refresh User Type Grid</button> <button onclick="parent.location='StatusPage.aspx'">Status Page</button></p> <p class="copyRight">(c) 2006, Sirron Software Corporation, All Rights Reserved.<br />Page Last Modified: <%
=LastModified%><br />Version: 1.00
</p></
body></
html>
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.