elliottbenzle
asked on
apply javascript to text area
Hi, I've asked a similar question before but still haven't been able to figure this out.
On my page I have a text field and a text area. I apply the same Javascript function to both of them: (onFocus="ClearField('titl e_field')"
<input name="title_field" type="text" class="blank_field" id="title_field" onFocus="ClearField('title _field');" onchange="makePreviewBody( );makePrev iew('previ ew_title', 'title_fie ld');"/>
<div class="validation_top_padd ing">
<span class="textfieldRequiredMs g">* Enter a title for your ad.</span></div></span> </div><br>
<textarea class="ckeditor" cols="30" id="editor1" name="editor1" rows="10" onFocus="ClearField('title _field');" onKeyUp="makePreviewBody() ;" >Enter the body text of your ad here.</textarea>
on the text field the javascript works fine, but on the text area nothing happens. The test page is here:
http://www.glowfishtw.com/enrad/enr_classified_ads.asp
I'm almost positive that this is because of the CKEditor that is being applied to the text area. Does anyone know how to work around this? Thanks.
On my page I have a text field and a text area. I apply the same Javascript function to both of them: (onFocus="ClearField('titl
<input name="title_field" type="text" class="blank_field" id="title_field" onFocus="ClearField('title
<div class="validation_top_padd
<span class="textfieldRequiredMs
<textarea class="ckeditor" cols="30" id="editor1" name="editor1" rows="10" onFocus="ClearField('title
on the text field the javascript works fine, but on the text area nothing happens. The test page is here:
http://www.glowfishtw.com/enrad/enr_classified_ads.asp
I'm almost positive that this is because of the CKEditor that is being applied to the text area. Does anyone know how to work around this? Thanks.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/OnDemand.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="TODadmin_login.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim rscategories
Dim rscategories_cmd
Dim rscategories_numRows
Set rscategories_cmd = Server.CreateObject ("ADODB.Command")
rscategories_cmd.ActiveConnection = MM_OnDemand_STRING
rscategories_cmd.CommandText = "SELECT * FROM categories"
rscategories_cmd.Prepared = true
Set rscategories = rscategories_cmd.Execute
rscategories_numRows = 0
%>
<%
Dim rsdelete
Dim rsdelete_cmd
Dim rsdelete_numRows
Set rsdelete_cmd = Server.CreateObject ("ADODB.Command")
rsdelete_cmd.ActiveConnection = MM_OnDemand_STRING
rsdelete_cmd.CommandText = "SELECT * FROM categories"
rsdelete_cmd.Prepared = true
Set rsdelete = rsdelete_cmd.Execute
rsdelete_numRows = 0
%>
<%
Dim rsvideocategory
Dim rsvideocategory_cmd
Dim rsvideocategory_numRows
Set rsvideocategory_cmd = Server.CreateObject ("ADODB.Command")
rsvideocategory_cmd.ActiveConnection = MM_OnDemand_STRING
rsvideocategory_cmd.CommandText = "SELECT * FROM categories"
rsvideocategory_cmd.Prepared = true
Set rsvideocategory = rsvideocategory_cmd.Execute
rsvideocategory_numRows = 0
%><%
Dim rscontent
Dim rscontent_cmd
Dim rscontent_numRows
Set rscontent_cmd = Server.CreateObject ("ADODB.Command")
rscontent_cmd.ActiveConnection = MM_OnDemand_STRING
rscontent_cmd.CommandText = "SELECT * FROM videos ORDER BY videocategory ASC"
rscontent_cmd.Prepared = true
Set rscontent = rscontent_cmd.Execute
rscontent_numRows = 0
%>
<%
Dim rsusers__MMColParam
rsusers__MMColParam = "elliott"
If (Request("MM_EmptyValue") <> "") Then
rsusers__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim rsusers
Dim rsusers_cmd
Dim rsusers_numRows
Set rsusers_cmd = Server.CreateObject ("ADODB.Command")
rsusers_cmd.ActiveConnection = MM_OnDemand_STRING
rsusers_cmd.CommandText = "SELECT * FROM usersvar WHERE uservar <> ?"
rsusers_cmd.Prepared = true
rsusers_cmd.Parameters.Append rsusers_cmd.CreateParameter("param1", 200, 1, 250, rsusers__MMColParam) ' adVarChar
Set rsusers = rsusers_cmd.Execute
rsusers_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim rscategories_total
Dim rscategories_first
Dim rscategories_last
' set the record count
rscategories_total = rscategories.RecordCount
' set the number of rows displayed on this page
If (rscategories_numRows < 0) Then
rscategories_numRows = rscategories_total
Elseif (rscategories_numRows = 0) Then
rscategories_numRows = 1
End If
' set the first and last displayed record
rscategories_first = 1
rscategories_last = rscategories_first + rscategories_numRows - 1
' if we have the correct record count, check the other stats
If (rscategories_total <> -1) Then
If (rscategories_first > rscategories_total) Then
rscategories_first = rscategories_total
End If
If (rscategories_last > rscategories_total) Then
rscategories_last = rscategories_total
End If
If (rscategories_numRows > rscategories_total) Then
rscategories_numRows = rscategories_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rscategories_total = -1) Then
' count the total records by iterating through the recordset
rscategories_total=0
While (Not rscategories.EOF)
rscategories_total = rscategories_total + 1
rscategories.MoveNext
Wend
' reset the cursor to the beginning
If (rscategories.CursorType > 0) Then
rscategories.MoveFirst
Else
rscategories.Requery
End If
' set the number of rows displayed on this page
If (rscategories_numRows < 0 Or rscategories_numRows > rscategories_total) Then
rscategories_numRows = rscategories_total
End If
' set the first and last displayed record
rscategories_first = 1
rscategories_last = rscategories_first + rscategories_numRows - 1
If (rscategories_first > rscategories_total) Then
rscategories_first = rscategories_total
End If
If (rscategories_last > rscategories_total) Then
rscategories_last = rscategories_total
End If
End If
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rscategories_numRows = rscategories_numRows + Repeat1__numRows
%>
<%
Dim return_value, a, b, c
return_value = ""
a = ""
b = ""
c = ""
return_value = request.querystring("ret")
if return_value = "a" then
a = "<br>Category added."
ElseIf return_value = "b" then
b = "<br>Category deleted."
ElseIf return_value = "c" then
c = "<br>Category name updated."
ElseIf return_value = "d" then
d = "<br>Content added."
ElseIf return_value = "e" then
e = "<br>Content deleted."
ElseIf return_value = "f" then
f = "<br>Content edited."
ElseIf return_value = "g" then
g = "<br>User added."
ElseIf return_value = "h" then
h = "<br>User deleted."
ElseIf return_value = "i" then
i = "<br>User info edited."
ElseIf return_value = "j" then
j = "<br>Your file has been uploaded."
ElseIf return_value = "u" then
u = "<br>Not a valid file type. <br>Only .jpg, .pdf, .mp3, .swf and .flv files allowed."
ElseIf return_value = "v" then
v = "<br>You may not upload executable files!"
ElseIf return_value = "w" then
w = "<br>You must enter a user's password to delete them"
ElseIf return_value = "x" then
x = "<br>Not a valid file type, no upload."
ElseIf return_value = "y" then
y = "<br>Not a valid file type, no upload."
ElseIf return_value = "z" then
z = "<br>You must enter the old password of the user to edit their info."
end if
%>
<%
Dim catname,vidcatID
%>
<%
Sub varnode(vidcategory)
Set rsvideo_cmd = Server.CreateObject ("ADODB.Command")
rsvideo_cmd.ActiveConnection = MM_OnDemand_STRING
rsvideo_cmd.CommandText = "SELECT * FROM categories WHERE catID=" & vidcategory
rsvideo_cmd.Prepared = true
Set rsvideo = rsvideo_cmd.Execute
response.write (rsvideo.Fields.Item("categoryname").Value)
End Sub
rsvideo_numRows = 0
%>
<!-- START date chooser head section -->
<script src="date-chooser/date-functions.js" type="text/javascript"></script>
<script src="date-chooser/datechooser.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="date-chooser/datechooser.css">
<!--[if lte IE 6.5]>
<link rel="stylesheet" type="text/css" href="select-free.css"/>
<![endif]-->
<!-- END date chooser head section -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<script src="../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<script type="text/javascript">
function displ(theForm)
{
if(document.myFORM.valu.options[0].value == true) {
return false
}
else {
document.myFORM.textfield.value=document.myFORM.valu.options[document.myFORM.valu.selectedIndex].text;
}
return true;
}
//-->
</script>
<script type="text/javascript">
function createInput(id, size, value) {
var i = document.createElement('input');
i.type = 'file';
i.name = id;
i.id = id;
i.size = size;
i.value = value;
return i;
}
//Expand form with a new File field if needed.
var nfiles = 2;
var numfiles = 0;
function Expand(){
if (nfiles==7)
{
alert("You may only upload 5 supporting files.");
document.addcontent.morefields.disabled=true;
return false;
}
nfiles++
numfiles++
var f = document.getElementById('files');
f.appendChild(document.createElement('br'));
var d = document.createElement('div')
d.className = '';
d.appendChild(document.createTextNode('Support File #' + numfiles + ' : '));
d.appendChild(createInput('fileField' + nfiles, '30', ''));
f.appendChild(d);
return false;
}
</script>
<script type="text/javascript">
//clear fields on focus
function ClearTextfield() {
document.myFORM.editcategory.value= "";
document.myFORM.editcategory.style.color= "black";
ClearTextField = function() {
}
}
function Clearvideoname() {
document.addcontent.videoname.value= "";
document.addcontent.videoname.style.color= "black";
Clearvideoname = function() {
}
}
function Clearcontentdescription() {
document.addcontent.contentdescription.value= "";
document.addcontent.contentdescription.style.color= "black";
Clearcontentdescription = function() {
}
}
function ClearfileField() {
document.addcontent.fileField.value= "";
document.addcontent.fileField.style.color= "black";
ClearfileField = function() {
}
}
function Clearcategoryname() {
document.form1.categoryname.value= "";
document.form1.categoryname.style.color= "black";
Clearcategoryname = function() {
}
}
function Clearoldpassword() {
document.edituser.oldpassword.value= "";
document.edituser.oldpassword.style.color= "black";
Clearoldpassword = function() {
}
}
function Clearusername() {
document.edituser.username.value= "";
document.edituser.username.style.color= "black";
Clearusername = function() {
}
}
function Clearuserpassword() {
document.edituser.userpassword.value= "";
document.edituser.userpassword.style.color= "black";
Clearuserpassword = function() {
}
}
function Clearuser() {
document.adduser.user.value= "";
document.adduser.user.style.color= "black";
Clearuser = function() {
}
}
function Clearpassword() {
document.adduser.password.value= "";
document.adduser.password.style.color= "black";
Clearpassword = function() {
}
}
function Cleardeletepassword() {
document.deleteuser.deletepassword.value= "";
document.deleteuser.deletepassword.style.color= "black";
Cleardeletepassword = function() {
}
}
</script>
<script type="text/javascript" src="../simpletreemenu.js"></script>
<link rel="stylesheet" type="text/css" href="../simpletree.css" />
<TITLE>Project Network Help & FAQ – McGraw-Hill Construction</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META
content="The McGraw-Hill Construction Project Network help and FAQ. Find answers to Project Network questions by using the McGraw-Hill Construction Project Network FAQ or the Help Topics."
name=description>
<META
content="mcgraw hill project network help, mcgraw hill project network faq, mcgraw hill project network, project network help, faq, frequently asked questions, help topics, technical support, mcgraw hill construction "
name=keywords>
<STYLE type=text/css>
BODY {
MARGIN: 0px
}
</STYLE>
<LINK
href="../Project Network Help & FAQ – McGraw-Hill Construction_files/NetworkHelp.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.6000.16981" name=GENERATOR>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<link href="../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY onLoad="document.addcontent.videoname.style.color = '#d1d1d1'; document.addcontent.contentdescription.style.color = '#d1d1d1'; document.addcontent.fileField.style.color = '#d1d1d1'; document.form1.categoryname.style.color = '#d1d1d1'; document.edituser.oldpassword.style.color = '#d1d1d1'; document.edituser.username.style.color = '#d1d1d1'; document.edituser.userpassword.style.color = '#d1d1d1'; document.adduser.user.style.color = '#d1d1d1'; document.adduser.password.style.color = '#d1d1d1'; document.deleteuser.deletepassword.style.color = '#d1d1d1';">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR id=gradient>
<TD colSpan=3>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="20%">
<DIV align=center><A class=maincontent
onmouseover="MM_swapImage('Image9','','/help/NetworkHelp/images/TopSites_dodge_on.gif',1)"
onmouseout=MM_swapImgRestore() href="http://dodge.construction.com/"
target=_blank><IMG id=Image9 alt="McGraw-Hill Dodge"
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/TopSites_dodge.gif"
border=0 name=Image9></A></DIV></TD>
<TD width="20%">
<DIV align=center><A class=maincontent
onmouseover="MM_swapImage('Image6','','/help/NetworkHelp/images/TopSites_Network_on.gif',1)"
onmouseout=MM_swapImgRestore()
href="http://network.construction.com/" target=_blank><IMG id=Image6
alt="McGraw-Hill Construction Network"
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/TopSites_Network.gif"
border=0 name=Image6></A></DIV></TD>
<TD width="20%">
<DIV align=center><A class=maincontent
onmouseover="MM_swapImage('Image7','','/help/NetworkHelp/images/TopSites_Sweets_on.gif',1)"
onmouseout=MM_swapImgRestore()
href="http://products.construction.com/" target=_blank><IMG
id=Image7 alt="McGraw-Hill Construction Sweets"
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/TopSites_Sweets.gif"
border=0 name=Image7></A></DIV></TD>
<TD width="20%">
<DIV align=center><A class=maincontent
onmouseover="MM_swapImage('Image8','','/help/NetworkHelp/images/TopSites_PDM_on.gif',1)"
onmouseout=MM_swapImgRestore() href="http://pdm.construction.com/"
target=_blank><IMG id=Image8 alt="Project Document Manager"
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/TopSites_PDM.gif"
border=0 name=Image8></A></DIV></TD>
<TD width="20%">
<DIV align=center><A class=maincontent
onmouseover="MM_swapImage('Image5','','/help/NetworkHelp/images/TopSites_MHC_on.gif',0)"
onmouseout=MM_swapImgRestore() href="http://www.construction.com/"
target=_blank><IMG id=Image5 alt="McGraw-Hill Construction"
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/TopSites_MHC.gif"
border=0 name=Image5></A></DIV></TD></TR></TBODY></TABLE></TD></TR>
<TR id=grayLine>
<TD bgColor=#cccccc colSpan=3 height=1><IMG height=1
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/_.gif"
width=1></TD></TR>
<TR>
<TD colSpan=3 height=2><IMG height=2
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/_.gif"
width=15></TD></TR>
<TR>
<TR>
<TD width=25 rowSpan=2><IMG height=4
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/_.gif"
width=15></TD>
<TD id=logo width=332 rowSpan=2><A class=maincontent
href="http://www.construction.com/help/NetworkHelp/defaultmain.asp"><IMG
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/logo_helpCenter.gif"
border=0></A></TD>
<TD vAlign=top align=right>
<DIV id=signIn><SPAN class=maincontent>
<SCRIPT language=javascript>
if (isAuthenticated) {
document.writeln("Welcome " + userName );
}
else{
document.writeln("<a href='https://sso.construction.com/SingleSignOn/Login.aspx?Register=1' class='maincontent' target='_top'>Register now</a> or ");
//document.writeln("Welcome to McGraw-Hill Construction!");
}
</SCRIPT>
</SPAN>
<SCRIPT
language=javascript>writeButton(document.URL,document.URL,"_self")</SCRIPT>
</DIV></TD></TR>
<TR>
<TD style="PADDING-RIGHT: 5px; PADDING-TOP: 5px" vAlign=bottom
align=right>
<FORM id=cse-search-box
action=/help/networkhelp/searchresults.asp>
<TABLE
style="BORDER-RIGHT: #ffaa72 1px solid; BORDER-TOP: #ffaa72 1px solid; BORDER-LEFT: #ffaa72 1px solid; BORDER-BOTTOM: #ffaa72 1px solid"
cellSpacing=0 cellPadding=5 width=250 bgColor=#fdecd4 border=0>
<TBODY>
<TR>
<TD class=maincontent noWrap align=right><B>search help:</B></TD>
<TD><INPUT type=hidden value=003486722983476972806:fhmug5awzai
name=cx> <INPUT type=hidden value=FORID:11 name=cof> <INPUT
type=hidden value=UTF-8 name=ie> <INPUT id=textidsm name=q
width="200"></TD>
<TD><INPUT type=image alt="Submit button"
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/btn_goOR.gif"
name=sa></TD></TR></TBODY></TABLE></FORM></TD></TR>
<TR>
<TD id=topNav colSpan=3>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=topNav align=middle width=150 height=20><A class=topNav
href="http://www.construction.com/help/NetworkHelp/default.asp">ONLINE
USER GUIDE </A></TD>
<TD class=topNav vAlign=center align=middle width=20>|</TD>
<TD class=topNav align=left width=150><A class=topNav
href="http://www.construction.com/Network/TrainingOnDemand/default.asp">TRAINING
ON DEMAND </A></TD>
<TD class=topNav vAlign=center align=middle width=20>|</TD>
<TD class=topNav align=left width=200><A class=topNav
href="http://www.construction.com/help/networkhelp/default.asp">FREQUENTLY
ASKED QUESTIONS</A></TD>
<TD class=topNav vAlign=center align=middle width=20>|</TD>
<TD class=topNav align=left width=120><A class=topNav
href="http://construction.com/community/forums.aspx?plckForumPage=Forum&plckForumId=Cat%3a2e6c9931-f43f-406f-9d34-ab5a581212e6Forum%3a593df509-8be7-4e8f-b3f9-7cde81eadeed&plckNumPerPage=200&plckCategoryCurrentPage=0">SUPPORT
FORUMS </A></TD>
<TD class=topNav vAlign=center align=middle width=20>|</TD>
<TD class=topNav align=left width=120><A class=topNav
href="http://www.construction.com/help/PDMHelp/default.asp">PDM HELP
CENTER </A></TD>
<TD class=topNav vAlign=center align=middle width=20>|</TD>
<TD class=topNav align=left width=139><A class=topNav
href="http://www.construction.com/help/PDM/tutorial/default.asp">PDM
TRAINING CENTER </A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE class=grayBorderALL cellSpacing=0 cellPadding=0 width=1100 border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 5px; PADDING-LEFT: 0px; PADDING-BOTTOM: 5px; PADDING-TOP: 0px"
vAlign=top width=10 rowSpan=2><BR>
<BR></TD>
<TD vAlign=top width=978>
<TABLE cellSpacing=0 cellPadding=10 width="102%" border=0>
<TBODY>
<TR>
<TD class=maincontent><div align="center"><img src="../images/TOD_header_admin2.jpg" width="618" height="149"><br>
<div class="alert_red">
<%
Dim results
results = request.querystring("ret")
%>
<%=a & b & c & d & e & f & g & h & i & j & u & v & w & x & y & z%></div>
</div>
<table width="98%" border="0" bgcolor="#FFFFFF">
<tr>
<td width="50%" height="564" valign="top"><table width="505" height="499" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="501" height="497"><table width="100%" height="690" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="2" bgcolor="#F5F4DE" class="TOD_cat_headings">Training on Demand Content <img src="../images/list.gif" alt="list" width="17" height="18"> <img src="../images/flash_sm.gif" alt="flash" width="15" height="16"> <img src="../images/pdf_logo.gif" alt="pdf" width="15" height="16"> <img src="../images/audio_logo.gif" alt="audio" width="15" height="16"></td>
</tr>
<tr>
<td height="40" colspan="2" valign="bottom" bgcolor="#FAF9ED"><img src="../images/short_line.gif" alt="line" width="269" height="25"></td>
</tr>
<tr>
<td width="32%" height="346" valign="top" bgcolor="#FAF9ED"><strong> Add Content: </strong></td>
<td width="68%" valign="top" bgcolor="#FAF9ED"><form action="TODadmin_content_add.asp" method="post" enctype="multipart/form-data" name="addcontent" id="addcontent">
<table width="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><span id="sprytextfield2">
<label>
<input name="videoname" type="text" id="videoname" size="45" onFocus="Clearvideoname();">
</label>
<span class="textfieldRequiredMsg">Enter a title</span>
</span></td>
</tr>
</table>
<br>
<span id="sprytextarea1">
<label>
<textarea name="contentdescription" id="contentdescription" cols="30" rows="5" onFocus="Clearcontentdescription();"></textarea>
<span id="countsprytextarea1"> </span> </label>
<br>
<span class="textareaRequiredMsg">Please enter a description.</span><span class="textareaMaxCharsMsg">Limit your description to 300 characters.</span></span><br>
<label>
<input type="file" name="fileField" id="fileField" size="30" onFocus="ClearfileField();">
</label>
<br>
<span class="textfieldRequiredMsg">Select a file to upload.</span></span><br>
<Input name="morefields" Type=Button id="morefields" Style="cursor:hand" OnClick=return(Expand()) Value="Click here to upload support files.">
<Div id="files" align="left"> </Div>
<br>
<table width="329" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="left">
<span id="spryselect4">
<label>
<select name="category" id="category">
<option value="0">Select a Category</option>
<%
While (NOT rsvideocategory.EOF)
%>
<option value="<%=(rsvideocategory.Fields.Item("catID").Value)%>"><%=(rsvideocategory.Fields.Item("categoryname").Value)%></option>
<%
rsvideocategory.MoveNext()
Wend
If (rsvideocategory.CursorType > 0) Then
rsvideocategory.MoveFirst
Else
rsvideocategory.Requery
End If
%>
</select>
</label>
<span class="selectInvalidMsg">Select a category.</span> </div>
</span> </td>
</tr>
</table>
<br>
<input type="submit" name="uploadcontent" id="uploadcontent" value="Upload Content">
<span class="alert_red"><%=d%><%=x%></span><br>
<br>
</form></td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" bgcolor="#FAF9ED"><img src="../images/short_line.gif" alt="line" width="269" height="25"></td>
</tr>
<tr>
<td valign="top" bgcolor="#FAF9ED"><strong> Delete Content:</strong></td>
<td valign="top" bgcolor="#FAF9ED"><form action="TODadmin_content_delete.asp" method="post" name="delete_content" id="delete_content">
<span id="spryselect3">
<label>
<select name="contentdelete" id="contentdelete">
<option value="0">Select Content</option>
<%
While (NOT rscontent.EOF)
%>
<%
vidcatnum = (rscontent.Fields.Item("videocategory"))
%>
<option value="<%=(rscontent.Fields.Item("ID").Value)%>"><%=(rscontent.Fields.Item("vidoename").Value)%></option>
<%
rscontent.MoveNext()
Wend
If (rscontent.CursorType > 0) Then
rscontent.MoveFirst
Else
rscontent.Requery
End If
%>
</select>
</label>
<span class="selectInvalidMsg">Select content.</span> </span>
<label>
<input type="submit" name="delete_content_btn" id="delete_content_btn" value="Delete">
<span class="alert_red"><%=e%></span> </label>
<br>
<br>
</form></td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" bgcolor="#FAF9ED"><img src="../images/short_line.gif" alt="line" width="269" height="25"></td>
</tr>
<tr>
<td valign="top" bgcolor="#FAF9ED"><strong> Edit Content:</strong></td>
<td valign="top" bgcolor="#FAF9ED"><form action="TODadmin_content_edit.asp" method="post" name="contentedit" id="contentedit">
<table width="278" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="274">
<span id="spryselect5">
<label>
<select name="editselect" id="editselect">
<option value="0">Select Content</option>
<%
While (NOT rscontent.EOF)
%>
<option value="<%=(rscontent.Fields.Item("ID").Value)%>"><%=(rscontent.Fields.Item("vidoename").Value)%></option>
<%
rscontent.MoveNext()
Wend
If (rscontent.CursorType > 0) Then
rscontent.MoveFirst
Else
rscontent.Requery
End If
%>
</select>
</label>
<span class="selectInvalidMsg">Select content.</span> </span> </td>
</tr>
</table>
<br>
<input type="submit" name="button2" id="button2" value="Go to Edit Page">
<label></label>
<span class="alert_red"><%=f%></span><span class="alert_red"><%=y%></span>
</form></td>
</tr>
<tr>
<td height="18" colspan="2" valign="top" bgcolor="#FAF9ED"><img src="../images/short_line.gif" alt="line" width="269" height="25"></td>
</tr>
<tr>
<td height="45" valign="top" bgcolor="#FAF9ED"><strong> Upload Files:</strong></td>
<td height="45" valign="top" bgcolor="#FAF9ED"><form action="TODadmin_content_support_files.asp" method="post" enctype="multipart/form-data" name="fileupload" id="fileupload">
<label>
<input name="file" type="file" size="30">
</label>
<span class="alert_red"><%=j & u & v%></span><br>
<br>
<label>
<input type="submit" name="Submit" value="Upload File">
</label>
</form> </td>
</tr>
<tr>
<td height="45" colspan="2" valign="top" bgcolor="#FAF9ED"><img src="../images/short_line.gif" alt="line" width="269" height="25"><br></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="2%" valign="top"><img src="../images/spacer_25.gif" width="25" height="4"></td>
<td width="48%" valign="top"><table width="489" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="485"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="2" valign="middle" bgcolor="#EAFFFF" class="TOD_cat_headings">Training on Demand Categories
<img src="../images/closed.gif" width="26" height="25"></td>
</tr>
<tr>
<td height="40" colspan="2" valign="bottom" bgcolor="#F2FFFF"><img src="../images/short_line.gif" width="269" height="25"></td>
</tr>
<tr>
<td width="41%" valign="top" bgcolor="#F2FFFF"><label></label>
<strong> Add a category:</strong><br> </td>
<td width="59%" valign="top" bgcolor="#F2FFFF"><form name="form1" method="post" action="TODadmin_category_add.asp">
<span id="sprytextfield1">
<label>
<input name="categoryname" type="text" id="categoryname" size="25" onFocus="Clearcategoryname();">
</label>
<span class="textfieldRequiredMsg"><br>Enter a name.</span></span>
<label>
<input type="submit" name="addcat" id="addcat" value="Add">
</label>
<input name="categoryid" type="hidden" id="categoryid" value="<%=(rscategories_total)+1%>">
<span class="alert_red"><%=a%></span>
</form></td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" bgcolor="#F2FFFF"><img src="../images/short_line.gif" alt="line" width="269" height="25"></td>
</tr>
<tr>
<td valign="top" bgcolor="#F2FFFF"><strong> Delete a category:</strong><span id="spryselect2"><span class="selectInvalidMsg">Select a category.</span></span><br>
<br> </td>
<td valign="top" bgcolor="#F2FFFF"><form action="TODadmin_category_delete.asp" method="post" name="catdelete" id="catdelete">
<span id="spryselect6">
<select name="categorydelete" id="categorydelete">
<option value="0" selected>Select a Category</option>
<%
While (NOT rsdelete.EOF)
%>
<option value="<%=(rsdelete.Fields.Item("catID").Value)%>"><%=(rsdelete.Fields.Item("categoryname").Value)%></option>
<%
rsdelete.MoveNext()
Wend
If (rsdelete.CursorType > 0) Then
rsdelete.MoveFirst
Else
rsdelete.Requery
End If
%>
</select>
<span class="selectInvalidMsg"><br>Please select a category.</span> </span>
<input type="submit" name="delcat" id="delcat" value="Delete">
<span class="alert_red"><%=b%></span>
</form></td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" bgcolor="#F2FFFF"><img src="../images/short_line.gif" alt="line" width="269" height="25"></td>
</tr>
<tr>
<td valign="top" bgcolor="#F2FFFF"><strong> Rename a Category:</strong></td>
<td valign="top" bgcolor="#F2FFFF"><form action="TODadmin_category_edit.asp" method="post" name="myFORM" >
<span id="spryselect1">
<select name="valu" size="1" onChange="return displ();">
<option value="0" >Choose a Category</option>
<%
While (NOT rscategories.EOF)
%>
<option value="<%=(rscategories.Fields.Item("catID").Value)%>"><%=(rscategories.Fields.Item("categoryname").Value)%></option>
<%
rscategories.MoveNext()
Wend
If (rscategories.CursorType > 0) Then
rscategories.MoveFirst
Else
rscategories.Requery
End If
%>
</select>
<span class="selectInvalidMsg"><br>Please select a category.</span> </span> <br>
<br>
<input name="textfield" type="text" id="textfield3" onFocus="ClearTextfield();" value="Enter New Name">
<label>
<input type="submit" name="button" id="button" value="Rename">
</label>
<span class="alert_red"><%=c%></span><br>
</form></td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" bgcolor="#F2FFFF"><img src="../images/short_line.gif" alt="line" width="269" height="25"></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="313" border="1" cellpadding="0" cellspacing="0">
<tr>
<td><table width="487" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="48" colspan="4" bgcolor="#F7ECEA" class="TOD_cat_headings">Training on Demand Admin Users <img src="../images/user.gif" alt="spacer" width="28" height="28"></td>
</tr>
<tr>
<td height="40" colspan="4" valign="bottom" bgcolor="#FBF3F0"><img src="../images/short_line.gif" width="269" height="25"></td>
</tr>
<tr>
<td width="141" valign="top" bgcolor="#FBF3F0"><strong> Add a User:</strong> </td>
<td colspan="3" align="left" valign="top" bgcolor="#FBF3F0"><form action="TODadmin_user_add.asp" method="post" name="adduser" id="adduser">
<span id="sprytextfield3">
<label>
<input name="user" type="text" id="textfield" size="16" onFocus="Clearuser();">
</label>
<span class="textfieldRequiredMsg">Enter a username.</span><span class="textfieldMaxCharsMsg">Name is too long.</span></span>
<label>
<span id="sprytextfield5">
<input name="password" type="text" id="textfield2" size="16" onFocus="Clearpassword();">
<span class="textfieldRequiredMsg">Enter a password.</span><span class="textfieldMaxCharsMsg">Password is too long.</span></span>
<input type="submit" name="adduser" id="adduser" value="Add">
<span class="alert_red"><%=g%></span>
</form></td>
</tr>
<tr>
<td colspan="4" valign="top" bgcolor="#FBF3F0"><img src="../images/short_line.gif" width="269" height="25"></td>
</tr>
<tr>
<form action="TODadmin_user_delete.asp" method="post" name="deleteuser" id="deleteuser">
<td valign="top" bgcolor="#FBF3F0"><strong> Delete User:</strong> </td>
<td width="140" valign="top" bgcolor="#FBF3F0">
<span id="spryselect7">
<label>
<select name="userdelete" id="userdelete">
<option value="0">Select a User</option>
<%
While (NOT rsusers.EOF)
%>
<option value="<%=(rsusers.Fields.Item("ID").Value)%>"><%=(rsusers.Fields.Item("uservar").Value)%></option>
<%
rsusers.MoveNext()
Wend
If (rsusers.CursorType > 0) Then
rsusers.MoveFirst
Else
rsusers.Requery
End If
%>
</select>
<span class="selectInvalidMsg"><br>
Select a user.</span></span> </label>
<span class="alert_red"><%=h%><%=w%></span><br> </td>
<td width="148" valign="top" bgcolor="#FBF3F0"><span id="sprytextfield6">
<input name="deletepassword" type="text" id="deletepassword" size="16" onFocus="Cleardeletepassword();">
<span class="textfieldRequiredMsg"><br>Enter a password.</span></span></td>
<td width="58" valign="top" bgcolor="#FBF3F0"><input type="submit" name="delete_user_btn" id="delete_user_btn" value="Delete"></td>
</form>
</tr>
<tr>
<td colspan="4" valign="top" bgcolor="#FBF3F0"><img src="../images/short_line.gif" width="269" height="25"></td>
</tr>
<tr>
<td valign="top" bgcolor="#FBF3F0"><strong> Change Info</strong>:</td>
<td colspan="3" align="left" valign="top" bgcolor="#FBF3F0"><form action="TODadmin_user_edit.asp" method="post" name="edituser" id="edituser">
<span id="spryselect8">
<label>
<select name="userID" id="userID">
<option value="0">Select a User</option>
<%
While (NOT rsusers.EOF)
%>
<option value="<%=(rsusers.Fields.Item("ID").Value)%>"><%=(rsusers.Fields.Item("uservar").Value)%></option>
<%
rsusers.MoveNext()
Wend
If (rsusers.CursorType > 0) Then
rsusers.MoveFirst
Else
rsusers.Requery
End If
%>
</select>
</label>
<span class="selectInvalidMsg">Select a user.</span></span> <br>
<br>
<span id="sprytextfield7">
<label>
<input name="oldpassword" type="text" id="oldpassword" size="16" onFocus="Clearoldpassword();">
</label>
<span class="textfieldRequiredMsg">A value is required.</span></span><br>
<br>
<span id="sprytextfield8">
<label>
<input name="username" type="text" id="username" size="16" onFocus="Clearusername();">
</label>
<span class="textfieldRequiredMsg">Enter a Username.</span><span class="textfieldMaxCharsMsg">Username is too long.</span></span> <br>
<br>
<span id="sprytextfield9">
<input name="userpassword" type="text" id="userpassword" size="16" onFocus="Clearuserpassword();"><span class="textfieldRequiredMsg">Enter a Password.</span><span class="textfieldMaxCharsMsg">Password is too long.</span></span>
<br>
<br>
<input type="submit" name="user_edit" id="user_edit" value="Update" >
<span class="alert_red"><%=z%><%=i%></span>
</form></td>
</tr>
<tr>
<td colspan="4" valign="top" bgcolor="#FBF3F0"><img src="../images/short_line.gif" width="269" height="25"></td>
</tr>
</table></td>
</tr>
</table>
<br>
<table width="498" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><table width="497" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="48" colspan="3" bgcolor="#DFECFF" ><div class="TOD_cat_headings">Training on Demand Client Emails <img src="../images/envelope.gif" width="25" height="28"></div></td>
</tr>
<tr>
<td height="40" colspan="3" valign="bottom" bgcolor="#ECF3FF"><img src="../images/short_line.gif" alt="bar" width="269" height="25"></td>
</tr>
<form action="TODadmin_view_emails.asp" method="post" name="viewemails" id="viewemails" target="_blank">
<tr>
<td width="137" rowspan="2" valign="top" bgcolor="#ECF3FF"><strong> View Emails </strong>:</td>
<td width="51" height="41" valign="top" bgcolor="#ECF3FF"><div align="right">from </div></td>
<td width="309" valign="top" bgcolor="#ECF3FF"><span id="sprytextfield10">
<input name="datetime2" type="text" id="datetime2" value="<%=date()-1%>" size="10" maxlength="10">
<span class="textfieldRequiredMsg">Enter a date.</span><span class="textfieldInvalidFormatMsg">Not a valid date.</span></span><img src="date-chooser/calendar.gif" onClick="showChooser(this, 'datetime2', 'chooserSpan3', 2010, <%=(Year(Date)) + 1%>, Date.patterns.ShortDatePattern, false);"></td>
</tr>
<tr>
<td height="43" valign="top" bgcolor="#ECF3FF"><div id="chooserSpan3" class="dateChooser select-free" style="display: none; visibility: hidden; width: 160px;">
<div align="right"><br>
<br>
<br>
<br>
</div>
</div>
<div align="right">to </div></td>
<td valign="top" bgcolor="#ECF3FF"><span id="sprytextfield11">
<input name="datetime3" type="text" id="datetime3" value="<%=date()%>" size="10" maxlength="10">
<span class="textfieldRequiredMsg">Enter a date.</span><span class="textfieldInvalidFormatMsg">Not a valid date.</span></span><img src="date-chooser/calendar.gif" alt="calendar" onClick="showChooser(this, 'datetime3', 'chooserSpan4', 2010, <%=(Year(Date)) + 1%>, Date.patterns.ShortDatePattern, false);">
<div id="chooserSpan4" class="dateChooser select-free" style="display: none; visibility: hidden; width: 160px;"></div></td>
</tr>
<tr>
<td bgcolor="#ECF3FF"> </td>
<td bgcolor="#ECF3FF"><label></label></td>
<td bgcolor="#ECF3FF"><input type="submit" name="Submit2" value="GO!"></td>
</tr>
</form>
<tr>
<td colspan="3" bgcolor="#ECF3FF"><img src="../images/short_line.gif" alt="bar" width="269" height="25"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"> </td>
<td> </td>
</tr>
</table>
<br>
<br>
<br></TD>
</TR>
<TR>
<TD>
<HR align=center width="80%" color=#ffcc00 noShade SIZE=1> </TD></TR>
</TBODY></TABLE></TD></TR>
<TR>
<TD align=middle><div align="center"><img height=64
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/NeedHelp.jpg"
width=226></div></TD>
</TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=950 border=0>
<TBODY>
<TR>
<TD align=middle><BR>
<TABLE border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD align=right rowSpan=3><IMG alt="McGraw-Hill Construction"
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/footer_MHC.gif"></TD>
<TD class=maincontentsm><A class=maincontentsm
href="http://www.construction.com/termsofuse.asp"
target=_blank>terms of use </A><SPAN
style="FONT-SIZE: 10px">| </SPAN><A class=maincontentsm
href="http://www.construction.com/privacypolicy.asp"
target=_blank>privacy policy </A><SPAN
style="FONT-SIZE: 10px">| </SPAN><A class=maincontentsm
href="http://www.construction.com/Advertise/"
target=_blank>advertise </A><SPAN
style="FONT-SIZE: 10px">|</SPAN><A class=maincontentsm
href="http://www.construction.com/AboutUs/aboutus.asp"
target=_blank> about us</A></TD></TR>
<TR>
<TD class=maincontentsm>Technical Support 1-800-393-6343</TD></TR>
<TR>
<TD class=maincontentsm>© 2009 The McGraw-Hill Companies,
Inc.</TD></TR></TBODY></TABLE>
<SCRIPT language=JavaScript
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/elqCfg.js"
type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/elqImg.js"
type=text/javascript></SCRIPT>
<SCRIPT
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/dcs_head.js"
type=text/javascript></SCRIPT>
<SCRIPT
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/dcs_tag.js"
type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</SCRIPT>
<SCRIPT type=text/javascript>
var pageTracker = _gat._getTracker("UA-6262938-1");
pageTracker._trackPageview();
</SCRIPT>
</TD></TR></TBODY></TABLE>
<SCRIPT
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/dcs_head(1).js"
type=text/javascript></SCRIPT>
<SCRIPT
src="../Project Network Help & FAQ – McGraw-Hill Construction_files/dcs_tag(1).js"
type=text/javascript></SCRIPT>
<script type="text/javascript">
<!--
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {invalidValue:"0", isRequired:false});
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {hint:"Category Name"});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {hint:"Title of Content"});
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {maxChars:300, counterId:"countsprytextarea1", counterType:"chars_remaining", hint:"Add a short description of the content."});
var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue:"0", isRequired:false});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {hint:"New Category Name"});
var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {isRequired:false, invalidValue:"0"});
var spryselect4 = new Spry.Widget.ValidationSelect("spryselect4", {invalidValue:"0", isRequired:false});
var spryselect5 = new Spry.Widget.ValidationSelect("spryselect5", {isRequired:false, invalidValue:"0"});
var spryselect6 = new Spry.Widget.ValidationSelect("spryselect6", {invalidValue:"0", isRequired:false});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {maxChars:50, hint:"Username"});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {maxChars:50, hint:"Password"});
var spryselect7 = new Spry.Widget.ValidationSelect("spryselect7", {invalidValue:"0", isRequired:false});
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "none", {hint:"User's Password"});
var spryselect8 = new Spry.Widget.ValidationSelect("spryselect8", {isRequired:false, invalidValue:"0"});
var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7", "none", {hint:"User's Password"});
var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none", {hint:"New Username", maxChars:50});
var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9", "none", {hint:"New Password", maxChars:50});
var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10", "date", {format:"mm/dd/yyyy"});
var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11", "date", {format:"mm/dd/yyyy"});
//-->
</script>
</BODY></HTML>
<%
rscategories.Close()
Set rscategories = Nothing
%>
<%
rsdelete.Close()
Set rsdelete = Nothing
%>
<%
rsvideocategory.Close()
Set rsvideocategory = Nothing
%>
<%
rscontent.Close()
Set rscontent = Nothing
%>
<%
rsusers.Close()
Set rsusers = Nothing
%>
PS: You are most likely right about the editor. I am sure there is a method to clear it using the editor commands
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
2. do this to clear the field
function ClearField(field) {
field.value= "";
field.style.color= "black";
// I do not know why you have this function inside
//Clearvideoname = function() {
//}
}
onFocus="ClearField(this)"