|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
|||
|
|||
|
Yeah, so did you find the solution for this? If so, please post it because I am having problems with it as well.
|
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Development > select boxes called list1[] and javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|