On May 14, 10:28 pm, David <davidgor...@scene-double.co.ukwrote:
Quote:
Hi,
>
I am trying to achieve the following:
>
1/ To have a standard form in an asp web page which has various
check boxes and radio buttons.
As a user selects a form item it updates a text box, of which the
contents are submitted to a search page. I know I could just send the
form element data to a search page, but in this app, the user is
creating a product code and need to see the complete code before it is
search on.
>
Is there a way to add/delete text from a text box as form elements are
selected / un-selected
not unless you code it yourself what have you tried.
heres how I would do it:
you take the value of the element and add it to the end of the text
box value and put it inside an array.
if they then click on a few things and then remove something they had
previously added, you must take the position of the element in the
array with the value just removed (which must be unique) and remove
the appropriate string from the position it will be in the text box
after adding together the string lengths of the values that were
before that element in the array.
Quote:
>
_____________
>
2/ Also, what is the best way to hide / unhide form elements when
others are selected ?
have two classes called hide and show
these have display:none, and display:block
set the classNames of elements according to what is clicked, if you
need multiple things to appear dissappear either use a div surrounding
them, or set a function to take an array of element names and show/
hide them.
remember to check what state they are in before you act on them if you
have any overlap between single and groups of elements
Quote:
>
Thanks in advance
>
David