Jump to content


This topic is now archived and is closed to further replies.


Coding Help Please with javaform

Recommended Posts

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

Share this post

Link to post
Share on other sites
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:

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

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.

Share this post

Link to post
Share on other sites
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

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.