Jump to content


Coding Help Please with javaform

  • Please log in to reply
2 replies to this topic

#1 rmt123

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 April 2006 - 11:07 AM

i hope someone can assist please, i am new to coding etc and i am having problems with one line of code

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]strOutput += "<TD CLASS=\"entry\"><INPUT TYPE=TEXT NAME=Minutes VALUE="+ fields[1] +">";[!--colorc--][/span][!--/colorc--]

the above code does give me the correct answer in a text field which the user can edit

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]strOutput += "<TD CLASS=\"entry\">"+ fields[1] + "</TD>";[!--colorc--][/span][!--/colorc--]

gives the correct answer without a text field

my problem is i am appending/saving this data to a database file and need to specify the name of the field "Minutes" so it is saved correctly

the first example does save the data as i would like but is editable by the user (not what i had hoped) and the second example, although does give the desired output on screen and does not allow the user to edit, does not save this data to the database

is anyone out there able to give me help on how i can achieve my desired results

thanks in advance

#2 sanfly

  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationNew Zealand

Posted 28 April 2006 - 11:34 AM

So, this is part of a form accessed by the user, and you want the value to be displayed and updated in the database, but not directly editable by the user?

How about something like this:

strOutput += "<TD CLASS=\"entry\">"+ fields[1] + "<input type=hidden name=Minutes value="+ fields[1] + "></TD>";

This should make a hidden field that can be passed to the next page and added to the database, but not editable by the user.
If you're not part of the solution, you're part of the precipitate

#3 rmt123

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 April 2006 - 11:47 AM

thank you for your quick reply to my post, just tried your code and it works a treat, exactly what i wanted it to do

best regards

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users