[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.4

Onload Find/Replace (null) in Text fields

Asked by trailerman in JavaScript, Font Creator

Tags: null

I need to fix the last function of my existing script.  It currently performs a find/replace function
of <BR> and carriage returns.  They work fine, and my only help needed is as follows
and again related to last js function:

It is looking for the '(null)'  value and it does find it, but it replaces it with "()"

what do I have to change (only in last js function), so it removes/deletes
the entire value ( paranthesis and the null)?

thanks.

Thank you.

<HTML>HEAD>TITLE>task.htm/TITLE>

  <SCRIPT LANGUAGE="JavaScript">
   <!--
   function makeonelineineverytextarea() {
   var regexCRLF = new RegExp( '/r/n', 'g' )
   var ec = document.forms[0].elements.length - 1;
   var element = document.forms[0].elements;
   for (i= 0; i <= ec; i ++) {
    //alert('elemnt('+i+'): '+element[i].type)
    if (element[i].type == 'textarea') element[i].value = element[i].value.replace(regexCRLF, '<br>')
   }
   }
   function makemultylineineverytextarea() {
   var regexBR = new RegExp( '<BR>', 'gi' )
   var ec = document.forms[0].elements.length - 1;
   var element = document.forms[0].elements;
   for (i= 0; i <= ec; i ++) {
    if (element[i].type == 'textarea') element[i].value = element[i].value.replace(regexBR, '\r\n')
   }
   }
   function makemultylineineverytextarea() {
   var regexBR = new RegExp( '(null)', 'gi' )
   var ec = document.forms[0].elements.length - 1;
   var element = document.forms[0].elements;
   for (i= 0; i <= ec; i ++) {
   if (element[i].type == 'textarea') element[i].value = element[i].value.replace(regexBR, '')
   if (element[i].type == 'text') element[i].value = element[i].value.replace(regexBR, '')
   if (element[i].type == 'hidden') element[i].value = element[i].value.replace(regexBR, '')
  }
  }
   // -->
</SCRIPT>
BODY BGCOLOR="#FFFFFF" LINK="#CC0000" ALINK="#00CC00" VLINK="#CC0000" onLoad="makemultylineineverytextarea()">
P>FORM ACTION="/cgi-bin/sql/update.cgi" METHOD=POST>
CENTER>INPUT TYPE=hidden NAME=template VALUE="staff/back.htm">
INPUT TYPE=hidden NAME="ID_field" VALUE="tasks.tasks_ID">
INPUT TYPE=hidden NAME="ID_value" VALUE="{{tasks.tasks_ID}}">
INPUT TYPE=hidden NAME="tasks.date_updated" VALUE="system_date">
INPUT TYPE=hidden NAME="tasks.name_updated" VALUE="{{tasks.staff_name}}">
H3>CENTER>Update Tasks /CENTER>/H3>
FONT SIZE="-1" FACE="Arial, Helvetica">
table cellspacing=2 cellpadding=0 width="80%">
tr> td height="25"> FONT SIZE="-1" FACE="Verdana">Title: /FONT>
/TD>td height="25">
FONT SIZE="-1" FACE="Verdana">P>input type=text name="tasks.tasks_title" size=25 maxlength=100>/FONT>
/TD>
/TR>
tr>td height="18">FONT SIZE="-1" FACE="Verdana">Category: /FONT>
/TD>
td height="18">
FONT SIZE="-1" FACE="Verdana">input type=text name="tasks.category" size=25 maxlength=100>
/FONT>
/TD>
/TR>
tr>
td>
FONT SIZE="-1" FACE="Verdana"> Notes

/td>td>P>textarea rows=3 cols=35 wrap="soft" name="tasks.note">/TEXTAREA>
/TD>/TR>
/TABLE>
INPUT TYPE=submit VALUE="Submit" onClick="makeonelineineverytextarea()"> P>
/FONT>/CENTER>
/FORM>
/TD>
/TR>
/TABLE>
 /FONT>
/BODY>
/HTML>
 
Related Solutions
Keywords: Onload Find/Replace (null) in Text fi…
 
Loading Advertisement...
 
[+][-]08/01/01 02:05 PM, ID: 6342315Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: JavaScript, Font Creator
Tags: null
Sign Up Now!
Solution Provided By: pjtt
Participating Experts: 4
Solution Grade: A
 
[+][-]07/30/01 11:29 PM, ID: 6336779Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/31/01 09:04 AM, ID: 6337857Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/31/01 09:12 AM, ID: 6337874Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/31/01 09:38 AM, ID: 6337949Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 02:39 AM, ID: 6339706Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 07:53 AM, ID: 6340816Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/01 10:37 AM, ID: 6341409Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 12:01 PM, ID: 6341801Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/01 12:08 PM, ID: 6341835Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 12:10 PM, ID: 6341843Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 12:10 PM, ID: 6341846Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 12:21 PM, ID: 6341884Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/01 12:31 PM, ID: 6341923Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 12:36 PM, ID: 6341950Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/01 12:38 PM, ID: 6341960Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 12:39 PM, ID: 6341963Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 01:16 PM, ID: 6342115Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/01 01:17 PM, ID: 6342123Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 01:23 PM, ID: 6342149Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 01:24 PM, ID: 6342150Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/01 01:25 PM, ID: 6342155Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 01:29 PM, ID: 6342162Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 01:32 PM, ID: 6342174Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/01 01:41 PM, ID: 6342219Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 02:03 PM, ID: 6342304Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/01 02:59 PM, ID: 6342504Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92