Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to complete my submit form

Status
Not open for further replies.

binaryops

ISP
May 2, 2004
46
US
Ok, this is really frustrating me and I could really use some help. I am not a programmer and apologize if my questions are amatuer. I've modified already existing code from a form that my company uses. The reason for modification was to create different values to be returned on another page after clicking the submit button.

The Form is already set up to my liking in terms of what is displayed, but I can't figure out how to take the information input into the form and display it all in a nice neat format on another page after clicking submit. Let me list the code and if someone can PLEASE help me complete this, I would be so greatly appreciative.

Remember, the code is taken and modified from another form that I didn't create but only modified to my liking for a new form that my team needs to use. You may have some questions about why some code is in place and what it's function is. I more than likely won't have the answer so I apologize ahead of time. I do Networking support, not programming and thought I could tackle this task, but I'm finding is more trouble than anything. I have to complete it though. The code is as follows: (please save code in notepad as .html (like you didn't know that already) to view the page.
----------------------------------------------------------

<html>
<head>
<link rel="stylesheet" href="/lib/css/apps.css" type="text/css" />
<title>WELCOME - Please Enter a call [Current count ()]</title>
<script language="JavaScript" type="text/javascript">

var submitonce=0;

function checkSubmit(){
if (submitonce) {
alert('This form has already been submitted.' )
return false; }
else {
submitonce++;
return true; }
}
function checkSmallForm(){

if (theForm.FTSUUID.value == ""){
alert("Sorry, you must provide the Agent I.D.!")
theForm.FTSUUID.focus()
return false
}
if (theForm.TT.value == ""){
alert("Sorry, you must provide the Caller Name!")
theForm.TT.focus()
return false
}
}

if (theForm.CBR.value == ""){
alert("Sorry, you must provide the CBR number!")
theForm.CBR.focus()
return false
}
}

function checkForm(){

if (theForm.FTSUUID.value == ""){
alert("Sorry, you must provide the Agent I.D.!")
theForm.FTSUUID.focus()
return false
}
if (theForm.TT.value == ""){
alert("Sorry, you must provide the Caller Name!")
theForm.TT.focus()
return false
}

if (theForm.CBR.value == ""){
alert("Sorry, you must provide the CBR number!")
theForm.CBR.focus()
return false
}
var nccindex = document.theForm.ncc.selectedIndex;
var ncctxt = document.theForm.ncc.options[nccindex].value;
if (nccxt == "0"){
alert("Sorry, you must NCC status before continuing!")
document.theForm.ncc.focus()
return false
}

var atmpingindex = document.theForm.atmping.selectedIndex;
var atmpingtxt = document.theForm.atmping.options[atmpingindex].value;
if (atmpingtxt == "0"){
alert("Sorry, you must select ATM ping status before continuing!")
document.theForm.atmping.focus()
return false
}

var bbtindex = document.theForm.bbt.selectedIndex;
var bbttxt = document.theForm.bbt.options[bbtindex].value;
if (bbttxt == "0"){
alert("Sorry, you must select the BBT status before continuing!")
document.theForm.bbt.focus()
return false
}
var ldapindex = document.theForm.ldap.selectedIndex;
var ldaptxt = document.theForm.ldap.options[ldapindex].value;
if (ldaptxt == "z"){
alert("Sorry, please select LDAP status before continuing!")
document.theForm.ldap.focus()
return false
}

}
var osindex = document.theForm.os.selectedIndex;
var ostxt = document.theForm.os.options[osindex].value;
if (ostxt == "z"){
alert("Sorry, please select the Operating System before continuing!")
document.theForm.os.focus()
return false
}
</script>
</head>
<body class="body" style="text-align: center;">

<!-- <form action="form1.txt" method="POST" name="theForm" onsubmit=" return checkForm(document.theForm); return checkSubmit();"> -->
<form action="form1.txt" method="POST" name="theForm" onsubmit="return checkForm(document.theForm); return checkSubmit();">
<input type="hidden" name="GROUP" value='2' />
<input type="hidden" name="origin" value="IN" />
<table border="0" cellspacing="0" cellpadding="0" class="tableborder" style="width: 700px; text-align: center; background-image: url(/lib/images/bg.gif);">
<tr>
<td valign="top">
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" width="10">&nbsp;</td>

<td align="right" height="50" class="body8"> </td>
<td align="left" height="50" width="10">&nbsp;</td>

<TD>
</tr>

</table>

<table border="0" cellspacing="0" cellpadding="3" class="tableborder" style="width: 600px; background-color: white; text-align: center;">

<td colspan="2" style="height: 20px;" align="center"><b><I><H3>CRM NOTES</H3></I></b></td>
</tr>
<!--
Removing. Used for ID validation which is no longer in use.

-->
<tr class="body8">

<td>Agent Type<span class="notice">:</span></td>
<td style="text-align: left">
<input type="radio" name="type" value="2" checked />FTS
<input type="radio" name="type" value="1" />ASI
<input type="radio" name="type" value="3" />EPC
<input type="radio" name="type" value="3" />CSI
</td>
</tr>

<tr class="body8">
<td>Agent I.D<span class="notice">:</span></td>
<td style="text-align: left"><input type="text" name="Agent I.D" size="10" value="" maxlength="30" /></td>

</td>
</tr>

<tr class="body8">
<td>TT<span class="notice">:</span></td>
<td style="text-align: left"><input type="text" name="callersname" size="10" value="" maxlength="30" /></td>

</td>
</tr>

<tr class="body8">
<td>CBR<span class="notice">:</span></td>
<!-- <td><input type="text" name="CBR" maxlength="10" size="10" /></td> -->
<td style="text-align: left"><input type="text" name="CBR" maxlength="10" size="10" /></td>
</tr>

<tr class="body8">
<td>NCC<span class="notice">:</span></td>
<td style="text-align: left">

<select name="NCC" size="1" onchange='changeOptions()'>
<option value="0"></option>
<option value="Outage">Outage</option>
<option value="No Outage">No Outage</option>

</td>
</tr>

<tr class="body8">
<td>ATM Ping<span class="notice">:</span></td>
<td style="text-align: left">
<!--
Removing. Used for ID validation which is no longer in use.

-->
<select name="ATMPing" size="1" onchange='changeOptions()'>
<option value="0"></option>
<option value="100%">100%</option>
<option value="0%">0%</option>
<option value="UP/UP">UP/UP</option>
<option value="UP/DOWN">UP/DOWN</option>
<option value="Intermittent">Intermittent</option>
<option value="Not Run">Not Run</option>
</select>
</td>
</tr>
<tr class="body8">
<td>BBT<span class="notice">:</span></td>
<td style="text-align: left">
<!--
Removing. Used for ID validation which is no longer in use.

-->
<select name="BBT" size="1" onchange='changeOptions()'>
<option value="0"></option>
<option value="Green">Green</option>
<option value="Red">Red</option>
<option value="OOS">OOS</option>
<option value="Not Run">Not Run</option>
</select>
<!--
Removing. Used for ID validation which is no longer in use.

-->
</td>
</tr>

<tr class="body8">
<td>LDAP<span class="notice">:</span></td>
<td style="text-align: left">


<select name="LDAP" size="1" onchange='changeOptions()'>
<option value="0"></option>
<option value="Enabled A">Enabled A</option>
<option value="Enabled 1544">Enabled 1544</option>
<option value="Suspended A">Suspended A</option>
<option value="Suspended 1544">Suspended 1544</option>
<option value="Inactive A">Inactive A</option>
<option value="Terminated">Terminated</option>


</select>

</td>
</tr>

<tr class="body8">
<td>OS<span class="notice">:</span></td>
<td style="text-align: left">


<select name="LDAP" size="1" onchange='changeOptions()'>
<option value="0"></option>
<option value="XP">XP</option>
<option value="ME">ME</option>
<option value="2K">2K</option>
<option value="98">98</option>
</select>

</td>
</tr>


<tr class="body8">
<td valign="top">Troubleshooting</td>
<td style="text-align: left">
<textarea name="Notes" cols="50" rows="3" wrap="VIRTUAL" maxlength='2000'></textarea>
</td>
</tr>

<tr class="body8">
<td valign="top">Resolution</td>
<td style="text-align: left">
<textarea name="Notes" cols="50" rows="3" wrap="VIRTUAL" maxlength='2000'></textarea>
</td>
</tr>


<tr valign="middle">
<td colspan="2" align="right" valign="top">
<!--
Removing. Used for ID validation which is no longer in use.

--> <div align = 'center'>
<input type="submit" name="Submit" value="Submit" src="/lib/images/submit_submit.gif" />
<input type="Reset" name="Reset" value="Reset" src="/lib/images/Reset_Reset.gif" />
</td>
</tr>
</table>

</td>
</tr>
</table>
</form>
<!--start footer include-->
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

</script>


</body>
</html>

-----------------------------------------------------------

Thank you for your time!
binaryops
 
You would want to be asking this in the forum for whatever server-side scripting you have available to you (ASP, JSP, PHP, etc).

You wouldn't really do this with client-side JS (although possible, I'd really advise against it).

Hoep this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
The problem is, is that I don't have a website or webserver to post this to. I have nowhere to ftp/upload my template. My team will have to just put the .html link on their desktop and work it from there. Maybe I didn't exlain that right above, but this is what I need to do. Any further suggestions please?

Thanks,
binaryops!
 
Since your form uses a post method, you HAVE TO have a server to process the data. I'm not sure how you have things set up for a text (.txt) file to do this, though.

Lee
 
Where will the data from the form go to?
How are you going to use it?
You must want the data to be stored or emailed somewhere otherwise there is no point to the form.

Let us know the purpose of the form and what you expect of it.
It sounds like you might be able to use an HTA application as long as everyone is using Internet Explorer.



It's hard to think outside the box when I'm trapped in a cubicle.
 
Thanks for replying guys, I really appreciate your time! You guys know what your talking about so I'm going to agree with you that from what I've read, the form does need to post somewhere based on the <form action> in place in the middle of the code. That is the spot that needs replaced so that I go around trying to direct the form data output to a server. Ok, here's the scenario of what the forms purpose is:

1.) Agent on my team inputs all data requested by the form.
2.) Agent submits the form and another page or screen pops up with all the data they answered neatly formatted.
3.) Agent copy's and pastes that template data into our internal database.

(Question: is it possible to have the submit button populate/output the data to notepad.exe....just a though)

*THE POINT*
Our management wants all of our technical case notes to be uniformed so they can continue being lazy a$$'$ and not read....lol

By typing these questions manually, each agent is experiencing longer Average Handle Times by 3 min's, so I'm trying to cut that down for everyone and shine a little of course in the process from doing this form.

I hope this makes sense!

Everyone is using IE so whatever you suggested I'm sure would be fine. I just need submit to display all the data in the form for easy copy and paste use, but I'm completely stuck at this point.

Thanks again for everyone's time!
binaryops
 
binaryops I wonder if perhaps we work in the same company?
If so I am in CBS and can probably help you more directly.

The easiest solution is to not submit the form at all, just execute a function to read the data and output it to a textarea field formatted the way you want it so you can cut/paste.

If you are able to submit to the database directly then you could use an HTA file to fill out the form and send it directly to the DB or you could use MS Access to provide the form and plug the data into the database.
If it must be copy/paste then a simple javascript function should do it for you on the same page.


It's hard to think outside the box when I'm trapped in a cubicle.
 
Try this. I removed all of the original javascript and reformatted the page to fix some HTML problems and add in the new field.
This will take all field values and build a formatted output in the new textarea. That area is set readonly so it cannot be typed into but can be copied from.
This form does not do any validation but I cannot guess at what is and is not required since you are only reusing someone else's form and the requirements may differ. This should get you close though.

Code:
<html>
<head>
<link rel="stylesheet" href="/lib/css/apps.css" type="text/css" />
<title>WELCOME - Please Enter a call [Current count ()]</title>
<script type="text/javascript">
function formatData() {
  var outstr = '';
  //Get Type value from radio button group.  
  var btnType = document.getElementsByName('type');
  for (var x=0;x<btnType.length;x++) {
    if (btnType[x].checked)
      outstr += 'Agent Type: ' + btnType[x].value + '\n\r';
  }
  //Get Agent ID value.
  outstr += 'Agent I.D.: ' + document.getElementById('AgentID').value + '\n\r';
  //Get TT (callersname) value.
  outstr += 'TT: ' + document.getElementById('callersname').value + '\n\r';  
  //Get CBR value.
  outstr += 'CBR: ' + document.getElementById('CBR').value + '\n\r';  
  //Get NCC value
  var valNCC = document.getElementById('NCC');
  outstr += 'NCC: ' + valNCC.options[valNCC.options.selectedIndex].value + '\n\r';
  //Get ATM Ping value
  var valATMPing = document.getElementById('ATMPing');
  outstr += 'ATM Ping: ' + valATMPing.options[valATMPing.options.selectedIndex].value + '\n\r';
  //Get BBT value
  var valBBT = document.getElementById('BBT');
  outstr += 'BBT: ' + valBBT.options[valBBT.options.selectedIndex].value + '\n\r';
  //Get LDAP value
  var valLDAP = document.getElementById('LDAP');
  outstr += 'LDAP: ' + valLDAP.options[valLDAP.options.selectedIndex].value + '\n\r';
  //Get OS value
  var valOS = document.getElementById('OS');
  outstr += 'OS: ' + valOS.options[valOS.options.selectedIndex].value + '\n\r';
  //Get Troubleshooting (Notes) value
  outstr += 'Troubleshooting: ' + document.getElementById('Notes').value + '\n\r';
  //Get Resolution value
  outstr += 'Resolution: ' + document.getElementById('Resolution').value + '\n\r';
  //Write output to allData field.
  document.getElementById('allData').value = outstr;
}
</script>
</head>
<body class="body" style="text-align: center;">
<form action="" method="" name="theForm">
  <table border="0" cellspacing="0" cellpadding="0" class="tableborder" style="width: 700px; text-align: center; background-image: url(/lib/images/bg.gif);">
    <tr>
      <td valign="top"> 
        <table width="600" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td align="left" width="10">&nbsp;</td>
            <td align="right" height="50" class="body8"> </td>
            <td align="left" height="50" width="10">&nbsp;</td>
          </tr>
        </table>
        <table border="0" cellspacing="0" cellpadding="3" class="tableborder" style="width: 600px; background-color: white; text-align: center;">   
          <tr>
            <td colspan="2" style="height: 20px;" align="center"><b><I><H3>CRM NOTES</H3></I></b></td>
          </tr>
          <tr class="body8">
            <td>Agent Type<span class="notice">:</span></td>
            <td style="text-align: left">
              <input type="radio" name="type" value="FTS" checked />FTS
              <input type="radio" name="type" value="ASI"  />ASI
              <input type="radio" name="type" value="EPC"  />EPC
              <input type="radio" name="type" value="CSI"  />CSI
            </td>
          </tr>
          <tr class="body8">
            <td>Agent I.D<span class="notice">:</span></td>
            <td style="text-align: left"><input type="text" name="AgentID" id="AgentID" size="10" value=""  maxlength="30" /></td>
          </tr>  
          <tr class="body8">
            <td>TT<span class="notice">:</span></td>
            <td style="text-align: left"><input type="text" name="callersname" id="callersname" size="10" value=""  maxlength="30" /></td>
          </tr>         
          <tr class="body8">
            <td>CBR<span class="notice">:</span></td>
            <td style="text-align: left"><input type="text" name="CBR" id="CBR" maxlength="10" size="10" /></td>
          </tr>
          <tr class="body8">
            <td>NCC<span class="notice">:</span></td>
            <td style="text-align: left">
              <select name="NCC" id="NCC" size="1">
                <option value="0"></option>
                <option value="Outage">Outage</option>
                <option value="No Outage">No Outage</option>
            </td>
          </tr> 
          <tr class="body8">
            <td>ATM Ping<span class="notice">:</span></td>
            <td style="text-align: left">
              <select name="ATMPing" id="ATMPing" size="1">
                <option value="0"></option>
                <option value="100%">100%</option>
                <option value="0%">0%</option>
                <option value="UP/UP">UP/UP</option>
                <option value="UP/DOWN">UP/DOWN</option>
                <option value="Intermittent">Intermittent</option>
                <option value="Not Run">Not Run</option>
              </select>
            </td>
          </tr>
          <tr class="body8">
            <td>BBT<span class="notice">:</span></td>
            <td style="text-align: left">
              <select name="BBT" id="BBT" size="1">
                <option value="0"></option>              
                <option value="Green">Green</option>
                <option value="Red">Red</option>
                <option value="OOS">OOS</option>
                <option value="Not Run">Not Run</option>
              </select>
            </td>
          </tr>
          <tr class="body8">
            <td>LDAP<span class="notice">:</span></td>
            <td style="text-align: left">
              <select name="LDAP" id="LDAP" size="1">
                <option value="0"></option>
                <option value="Enabled A">Enabled A</option>
                <option value="Enabled 1544">Enabled 1544</option>
                <option value="Suspended A">Suspended A</option>
                <option value="Suspended 1544">Suspended 1544</option>
                <option value="Inactive A">Inactive A</option>
                <option value="Terminated">Terminated</option>
              </select>
            </td>
          </tr>
          <tr class="body8">
            <td>OS<span class="notice">:</span></td>
            <td style="text-align: left">
              <select name="OS" id="OS" size="1">
                <option value="0"></option>
                <option value="XP">XP</option> 
                <option value="ME">ME</option>
                <option value="2K">2K</option>
                <option value="98">98</option>
              </select>
            </td>
          </tr>
          <tr class="body8">
            <td valign="top">Troubleshooting</td>
            <td style="text-align: left">
              <textarea name="Notes" id="Notes" cols="50" rows="3" wrap="VIRTUAL" maxlength='2000'></textarea>
            </td>
          </tr>
          <tr class="body8">
            <td valign="top">Resolution</td>
            <td style="text-align: left">
              <textarea name="Resolution" id="Resolution" cols="50" rows="3" wrap="VIRTUAL" maxlength='2000'></textarea>
            </td>
          </tr>
          <tr class="body8">
            <td>Formatted:</td>
            <td style="text-align: left"><textarea id="allData" cols="50" rows="5" wrap="virtual" readOnly></textarea></td>
          </tr>          
          <tr valign="middle">
            <td colspan="2" align="right" valign="top">
              <div align = 'center'>
                <input type="button" name="Submit" value="Submit" onclick="formatData();" src="/lib/images/submit_submit.gif" />
                <input type="Reset" name="Reset" value="Reset" src="/lib/images/Reset_Reset.gif" />
              </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
</body>
</html>

It's hard to think outside the box when I'm trapped in a cubicle.
 
hey nite owl,
I really appreciate you sending me this code. Although I saved it as .html and input data and hit submit and nothing happened. Is there something I'm doing wrong? Again, that's really cool of you to take the time to do all of this. I admire programmers and their work, I wish I could do it, I'm just a networking guru, definitely not programming guru. Can you help me figure out why submit doesn't do anything given your html code above? or what could I be missing?

Thanks a million!
binarypops
 
It takes all the form data and populates it into the textarea labeled Formatted: on the same page.
The page only changes in that the one field get's filled with the extra data. You may have expected the page to change to another page and not realized that it was all happening on the same page.

Fill out the form, hit submit and watch the Formatted: field fill in.

It would not be difficult to have the original form hide itself and a new box show up with the formatted data but then you need a button to bring you back to the form and reset everyting. It seemed easier to have it this way and when you finish copying/pasting the data just hit the Reset button to start the next one.


It's hard to think outside the box when I'm trapped in a cubicle.
 
Yes, the way you have it set up is perfectly fine, however I've done exactly what the form is set up to do. Fill out the data, hit submit and expecting to see it in the formatted field, not on another page, but nothing is populating into that formatted field is what I'm saying. It stays blank after I've filled in the info and hit submit. That's my only problem.

Again, thankyou so much!
binaryops
 
nite owl,
You rock dood, I don't know what I did the first time, but I resaved it to my desktop and ran it, it works beautifully! Thank you Thank you Thank you! One more question, is there a way to trunk the data output to where it's not line after line, but to make it all output side by side with like a (ex. | = pipe or a / = slash)?

Again, you seriously rock man and I appreciate this! What company do you work for?
binaryops
 
If you want it all in one line just replace every occurance of + '\n\r'; with + ' ';;

The \n\r are line feed and carriage return. Instead you can put in just a space to help segregate the data and make it easier to read. With the space things would run together.



It's hard to think outside the box when I'm trapped in a cubicle.
 
So you can't put in like a slash or a pipe | symbol? I'll try that and see what it looks like. Strangely the form is only working part of the time and I haven't changed any of the code. You've gotten me super far though and I really appreciate your help! I'll tamper with the whole spacing thing and see how that pans out. Let me know if you have any other input please!

Thank you,
binaryops
 
You can put in anything you like, it's only purpose is as a visual separator for the lines. Placing in multiple spaces may not work directly as the HTML may crunch them down to one space only unless you use &nbsp;.

What do you mean specifically about it working only part of the time? Does IE give you any error messages down on the status bar?

The code could have been written more efficiently but I wanted to leave it easy to understand so that you could add/modify more readily if you wanted more/less fields on the form or wanted to change their names.
Note that I added ID tags to the HTML fields. Every field must have their own unique name/id field as well except for the radio buttons that all work as one group.


It's hard to think outside the box when I'm trapped in a cubicle.
 
I got it to pipe using the following: + ' | ';;

I think I've just needed to play with it. I like the way you did things, it's perfect, exactly what I needed the form to do. Now it's just a matter of changing re-wording a few things like you said. I can't tell you thank you enough.

binaryops
 
The form is working great and had tons of awesome feedback. I've added some things and different buttons/drop downs given the same code format. I have another question if you don't mind please.

Seems simple, but I can't seem to change the font of the I am wanting to change the font of the following:

In other words, the font of Agent I.D. / TT: / NCC: / ATM Ping: etc......

//Get Agent ID value.
outstr += 'Agent I.D.: ' + document.getElementById('AgentID').value + ' | ';;
//Get TT (callersname) value.
outstr += 'TT: ' + document.getElementById('callersname').value + ' | ';;
//Get CBR value.
outstr += 'CBR: ' + document.getElementById('CBR').value + ' | ';;
//Get NCC value
var valNCC = document.getElementById('NCC');
outstr += 'NCC: ' + valNCC.options[valNCC.options.selectedIndex].value + ' | ';;
//Get ATM Ping value
var valATMPing = document.getElementById('ATMPing');
outstr += 'ATM Ping: ' + valATMPing.options[valATMPing.options.selectedIndex].value + ' | ';;
//Get BBT value
var valBBT = document.getElementById('BBT');
outstr += 'BBT: ' + valBBT.options[valBBT.options.selectedIndex].value + ' | ';;
//Get LDAP value
var valLDAP = document.getElementById('LDAP');
outstr += 'LDAP: ' + valLDAP.options[valLDAP.options.selectedIndex].value + ' | ';;
//Get OS value
var valOS = document.getElementById('OS');
outstr += 'OS: ' + valOS.options[valOS.options.selectedIndex].value + ' | ';
//Get Modem Type value
var valModemType = document.getElementById('ModemType');
outstr += 'Modem Type: ' + valModemType.options[valModemType.options.selectedIndex].value + ' | ';
//Get BTC Sent value
var valBTCSent = document.getElementById('BTCSent');
outstr += 'BTC Sent: ' + valBTCSent.options[valBTCSent.options.selectedIndex].value + '\n\r';
//Get Troubleshooting (Notes) value
outstr += 'Troubleshooting: ' + document.getElementById('Notes').value + '\n\r';
//Get Resolution value
outstr += 'Resolution: ' + document.getElementById('Resolution').value + '\n\r';
//Write output to allData field.
document.getElementById('allData').value = outstr;


Thank you for your time again, you are the master programmer!
 
You can set a font style for the entire textarea but it will affect all of the text inside the textarea. If you want to alter the font for different values that go in that box you will not be able to do so inside the textarea.

To alter all of the text inside the textarea you would use a style tag inside the textarea like this
Code:
<textarea id="allData" style="font-size: 12pt; color: fuchsia">

Or if you want to change just portions of the text instead of all of it then replace the textarea with a DIV like this:
Code:
<div id="allData"></div>
And change this line:
document.getElementById('allData').value = outstr;
To this:
document.getElementById('allData').innerHTML = outstr;

Then you can change the font properties for each value you read in when building the oustr variable just by putting font tags around the data like this:

Code:
outstr += '[COLOR=red]<font face="Arial" color="#FF0000">[/color]Agent I.D.: ' + document.getElementById('AgentID').value + '[COLOR=red]</font>[/color] | ';

Then you just add the font tags for each one you want to alter. The text appears in that area of the screen but not inside a textarea box.

NOTE: I noticed that a lot of the lines in the script you posted above ended up with double semi-colons at the end of the lines. You should fix that.






It's hard to think outside the box when I'm trapped in a cubicle.
 
Thanks again for the reply! I was actually wanting to make the font smaller for the

Agent Type:
Agent I.D:
TT:
CBR:
NCC:

so on and so forth, before the text area. The output text area that displays in the boxes are fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top