JavaScript - displaying data as plain text

Results 1 to 2 of 2

Thread: JavaScript - displaying data as plain text

  1. #1
    PJ Guest

    Default JavaScript - displaying data as plain text

    Hi, all. I have a JavaScript question for you. I have two form elements. Field 1, "liablimit", is a drop-down menu. Field 2, "skilimit", is a text box. I am populating skilimit with the value selected in liablimit. The following script handles that effectively:<BR><BR>&#060;SCRIPT LANGUAGE="JavaScript"&#062;<BR>&#060;!-- Begin<BR>var skilimit = "";<BR><BR>function SetSkiLimit(form) {<BR>chooseLimit = form.liablimit.selectedIndex<BR>if (form.liablimit.options[chooseLimit].value != "") {<BR> if (form.liablimit.value &#062; 300000) {<BR> form.skilimit.value = "";<BR> form.skilimit.value = 300000;<BR> }<BR> else {<BR> form.skilimit.value = "";<BR> form.skilimit.value = form.liablimit.value;<BR> }<BR>}<BR>else {<BR> form.skilimit.value = "";<BR> }<BR>}<BR>// End --&#062;<BR><BR>&#060;/script&#062;<BR><BR>=======================<BR><BR >What I&#039d like to know is whether or not I can make the skilimit value show up as plain text instead of in a text box. I am using the "readonly" property for the field right now, but I&#039d like to just show the value, since skilimit should not an editable value. It&#039s just for show.<BR><BR>An ideas?<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: JavaScript - displaying data as plain text

    How about if you use a lable. I have never tried it but you could place a lable on the page and set its value if it is possible

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts