rmt123 Posted April 28, 2006 Share Posted April 28, 2006 Hii 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 fieldmy 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 correctlythe 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 databaseis anyone out there able to give me help on how i can achieve my desired resultsthanks in advanceScott Quote Link to comment Share on other sites More sharing options...
sanfly Posted April 28, 2006 Share Posted April 28, 2006 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. Quote Link to comment Share on other sites More sharing options...
rmt123 Posted April 28, 2006 Author Share Posted April 28, 2006 Sanflythank you for your quick reply to my post, just tried your code and it works a treat, exactly what i wanted it to dobest regardsscott Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.