/    Sign up×
Community /Pin to ProfileBookmark

I am using the javscript form swapper at
[url]http://javascript.internet.com/forms/form-swapper-2.html[/url]

when I try to access the list2 using asp(after submitting the form) it appears blank.

Does anyone know how I can get the values of the form?

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@BigMoosieMay 30.2005 — I made a better one than that: http://www.random.abrahamjoffe.com.au/

It is better as it greys out the buttons that are not available and also it keeps the lists selected after clicking them. Let me know if this one works.
Copy linkTweet thisAlerts:
@estheraauthorMay 30.2005 — okay - I just switched to yours but I have the same problem.

when i do in asp (after submitting the form)

response.write "list2:" & request("list2")

it shows nothing in the list2

what am i doing wrong
Copy linkTweet thisAlerts:
@BigMoosieMay 30.2005 — I dont do asp but I may be able to help you. The form will send only the selected items, so just before submitting you will need to select each item in the lists. Do you know how to do that?
Copy linkTweet thisAlerts:
@estheraauthorMay 30.2005 — that solved the problem -- BUT is there anyway for the entries in list2 to be automatically selected. I dont' want it to be that way for the user.
Copy linkTweet thisAlerts:
@BigMoosieMay 30.2005 — Oh of course I did not mean that! ? It would be a huge inconvenience for the user, what you need to do is replace the code at the bottom of the page with this:

<SCRIPT type="text/javascript">
var addButton=document.forms.handle.addItem;
var removeButton=document.forms.handle.removeItem;

document.forms.handle.onsubmit=function(){
for (var i=0; i<document.forms.handle.list2.options.length; i++) document.forms.handle.list2.options[i].selected=true;
return true;
}
</SCRIPT>
Copy linkTweet thisAlerts:
@estheraauthorMay 30.2005 — that didn't help --- do I need to call it from the form tag??
Copy linkTweet thisAlerts:
@BigMoosieMay 30.2005 — It should do it, perhaps you were not implementing it correctly, here is the modified version, the first four variables you should modify:

http://www.random.abrahamjoffe.com.au/public/JavaScripts/funkySelect.htm
×

Success!

Help @esthera 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,
)...