/    Sign up×
Community /Pin to ProfileBookmark

Need help! Toggled form/selection

Hi

I’ve been presented with a problem on a site that I’ve not worked on at all before. It’s a web based GUI system to search a large database. There are various ways to search. One of them is a pop-up box where subjects are chosen which then populates a section within the main page, and is then included within the search filter.

What I’m trying to do is include a toggle for this section, i.e. being able to ‘switch off’ these selections without deleting them, so that they can be toggled back on again without going through the process of choosing them again.

The section of code below gives an idea of how it works currently, i.e. by deleting the selections completely. If more sections of the code are needed please say!

Any ideas of how to do this? Any help would be great!!!

Thanks ?

<form action=”#” name=”display” method=”POST” ENCTYPE=”utf8″

onSubmit=”return checkMandatory(this);”>
<br />
<label for=”selectedsubjects” class=”count”>Selected Subjects:</label>
<select name=”selectedsubjects” id=”” class=”count” multiple size=5

readonly ondblclick=”javascript: getElementById (‘remove’).click ()”>
</select>
<input type=”button”, class=”sub” id=”remove” name=”remove”, title=”Remove

Selected” value=”Remove Selected”
onclick=”javascript:removeselected (‘display’, ‘selectedsubjects’);
getallselect (‘display’, ‘selectedsubjects’, ‘advisor’, ‘p_sch_subject’);”
onkeypress=”javascript:removeselected (‘display’, ‘selectedsubjects’);
getallselect (‘display’, ‘selectedsubjects’, ‘advisor’, ‘p_sch_subject’);”
/>
</form>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@MrNobodyJan 12.2009 — Before removing them, or as they are removed, I would save them as a comma-delimited list in a single [B]hidden[/B] form field from which they might easily be restored as needed.
×

Success!

Help @lard spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...