Jump to content

Coding Help Please with javaform


rmt123

Recommended Posts

Hi
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
Scott
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.