Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old March 25th, 2004, 03:58 PM
lilleydn lilleydn is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 11 lilleydn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question select boxes called list1[] and javascript

Help!!!

I have Moving Values Between Select Boxes WITHOUT auto-sort simular to http://www.mattkruse.com/javascript/selectbox/

But i have to call my select boxes like 'list[]' instead of 'list1' and javascript hates this but i have to do this so when i post it to the next page the php script can pick this up.

Is there a way round this?

cheers!!
Dave

Reply With Quote
  #2  
Old March 25th, 2004, 09:01 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Although I don't understand the intricacies of PHP, in ASP, when you submit a form with multiple values selected in a drop down, or check box, whatever, the data is returned in a comma separated list. Surely PHP doesn't require that you add square brackets, cos obviously, as you've found, this screws with javascript.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old March 26th, 2004, 03:33 AM
lilleydn lilleydn is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 11 lilleydn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up Cheers

Thanks a lot for your reply, It did help but got the information I required off an old post of yours
http://forums.devarticles.com/showt...goto=nextoldest

And to answer your question I think it does require [] to pick up the selected values in to an array, although I only have been touching on PHP for the past few months so not exactly full of knowledge. I think the trick is to passing in to hidden text field and use the explode() function to get the values in to an array.

Ill let you know

Thanks a Lot
Dave.

Reply With Quote
  #4  
Old March 26th, 2004, 04:26 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
I've just done a quick query on google - doesn't look like there's any need to use the square brackets (and there shouldn't - it's a dodgy hack). Simply post the form as usual, then use the split function - http://au3.php.net/split - There are probably other split functions avail in PHP that can use a literal string as the splitter, rather than a reg exp pattern.

Reply With Quote
  #5  
Old November 3rd, 2004, 09:36 AM
goten goten is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 goten User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post

Yeah, so did you find the solution for this? If so, please post it because I am having problems with it as well.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > select boxes called list1[] and javascript


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway