help with php -html code

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
rami
Forum Contributor
Posts: 217
Joined: Thu Sep 15, 2005 8:55 am

help with php -html code

Post by rami »

Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


it is not totally php question but related to it
i have a text area in form of php which inserts data to text filed of table

Code: Select all

<tr>
<td width="41%"><b>Remarks and Assignment Description</b></td><br>
            <td width="59%">
  <textarea name="remarks" cols="40" rows="5">name        marks     Submitted date
harry
rami</textarea></td>
          </tr>
Can those initial field be made undeleteable..poster can write in that text box what ever they like but they are not allowed to delete those initial values

how can it be done

Can a data in tabular form can be brought as initial value inside that text area ...if yes how

thanks for help


Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

psh i'd make the width and what not incredibly small (just big enough to view) (maybe even go so far as to put each thing in it's own text field), then beside it put more text fields(boxes)for them to fill in the information an while processing for the form combine the appropriate fields and then perhaps store the information in an array to pull out later? or hell just upload into appropriate fields in a database...wow...you could turn this into something fun.... :: stops himself:: yeah...
rami
Forum Contributor
Posts: 217
Joined: Thu Sep 15, 2005 8:55 am

Post by rami »

Charles256 wrote:psh i'd make the width and what not incredibly small (just big enough to view) (maybe even go so far as to put each thing in it's own text field), then beside it put more text fields(boxes)for them to fill in the information an while processing for the form combine the appropriate fields and then perhaps store the information in an array to pull out later? or hell just upload into appropriate fields in a database...wow...you could turn this into something fun.... :: stops himself:: yeah...
i didn't got you could you be more clear
thanks for reply
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

psh i'd make the width and what not incredibly small (just big enough to view) (maybe even go so far as to put each thing in it's own text field), then beside it put more text fields(boxes)for them to fill in the information an while processing for the form combine the appropriate fields and then perhaps store the information in an array to pull out later? or hell just upload into appropriate fields in a database...wow...you could turn this into something fun.... :: stops himself:: yeah...

I would make the width on the text box's just wide enough to view the text then make them disabled so that noone could type anything in the box. and then beside those text box's put more text boxes where they can fill in the appropriate data and then when processing the form combine the appropriate boxes. Or perhaps not even have a box displaying the data you are requesting but rather go..
requierd info 1: (text box)
required info 2: (text box)
etc. : (text box)

and then when processing assigning the appropriate labels to the appropariate text box. That's why you can name fields. :-D

And the rest was ranting...
better?:-D
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

Post by dallasx »

Code: Select all

echo "<input type=\"text\" name=\"textfield\" value=\"Hehehe\" disabled>";
I think it only works with IE4.0+
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

Post by mickd »

http://www.w3schools.com/xhtml/xhtml_syntax.asp

This is wrong:
<input disabled>

This is correct:
<input disabled="disabled" />

not that big of a deal but you should get used to using XHTML standards.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Moved to Client-Side. :roll:
rami
Forum Contributor
Posts: 217
Joined: Thu Sep 15, 2005 8:55 am

Post by rami »

mickd wrote:http://www.w3schools.com/xhtml/xhtml_syntax.asp

This is wrong:
<input disabled>

This is correct:
<input disabled="disabled" />

not that big of a deal but you should get used to using XHTML standards.
Mind you the user should be able to add text to it...what they cannot do is delete the existing data displaying as initial in text area

any way i will givea try
but i have a feeling that this is totally disable input

they can add the text there but cannot del existing data
will it do
thanks
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You can use some client-side Javascript validation to confirm that the original part of the field was untouched (maybe a comparison of what was there to begin with versus what what submitted?), or you can set up a text field that does not include the original information and append what is in the text box to the field that was never made available to begin with. That way when the information is submitted the option to change the original data is not offered.
Post Reply