Find Jobs
Hire Freelancers

help with javascript function that selects all options in a <select multiple> on submit

$15 USD

Completed
Posted about 7 years ago

$15 USD

Paid on delivery
I want all the options selected when the user clicks the submit button so that in PHP i can get all the values that were in the list without the user having to highlight them. <?php foreach ($_POST['right'] as $selectedOption) { echo $selectedOption."<br>"; } ?> <script> function selectAllOptions(obj) { if (!hasOptions(obj)) { return; } for (var i=0; i<[login to view URL]; i++) { [login to view URL][i].selected = true; } } </script> <form name='dealerform' id='dealerform' method=post action='[login to view URL]' onsubmit='selectAllOptions(right)'> Offices -------------------------------------------------------------------> Selected Offices<br /> <table border="0" cellpadding="3" cellspacing="0"><tr><td> <select multiple style='width: 277px;' size="20" name="left[]"> <?php $sql="select officeid,name from office where officeid not in (select officeid from office_dealer) order by name"; if (!$result = $mysqli->query($sql)) { echo "Error selecting offices"; exit; } while ($row = $result->fetch_assoc()) { echo "<option value='{$row['officeid']}'>{$row['name']}</option>"; } ?> </select></td> <td align="center" valign="middle"> <input type="Button" value="Add >>" style="width:100px" onClick="SelectMoveRows([login to view URL]['left[]'],[login to view URL]['right[]'])"><br><br> <input type="Button" value="<< Remove" style="width:100px" onClick="SelectMoveRows([login to view URL]['right[]'],[login to view URL]['left[]'])"></td><td> <select multiple style='width: 277px;' size="20" name="right[]"> </select></td></tr></table> <br /><br /><input type='submit' tabindex=999 value='Submit'> </form>
Project ID: 14070521

About the project

16 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, i have read the project description, it’s perfectly match with my expertise. I believe i can do it with exact requirements within time and cost. I do not have any issue as i have done a lot of projects in Javascript. I’m capable to do this job from right now. you don’t need to worry about work quality or anything else. just hire me once you will hire me again.
$15 USD in 0 day
4.7 (36 reviews)
4.5
4.5
16 freelancers are bidding on average $17 USD for this job
User Avatar
Dear Employer; I am professional SEO friendly website designer and developer. I have 5+ years of experience with more than 100 successful projects. I would give you multiple amendments and charge less for my high Quality Services to have a long-term business relationship. Please come in private chat to discuss more in detail about your project and I am ready to start your project right now. I am sure you would love my quality work. Regards Faisal
$15 USD in 0 day
4.8 (166 reviews)
8.0
8.0
User Avatar
I have dedicated the last four years to website deign and development, I have extensive knowledge with a variety of applications and web languages including Adobe applications as well as in-depth expertise in CSS3, HTML5, XHTML. I can build websites to run cross platform on multiple different browsers e.g chrome, firefox, IE, ETC I also have four years’ experience in multiple programming languages such as, PHP, MySQL, Ajax, Jquery, Symfony and wordpress. My expertise lay in web design and development, a creative edge enable me to design Profession top class; Logo’s, Banner’s, Website’s, Ecommerce Website’s, Real estate website’s, and Travel website’s and much much more.
$20 USD in 10 days
5.0 (225 reviews)
7.5
7.5
User Avatar
- I'm a professional developer & designer that can work with: * PHP * HTML5 * CSS3 * jQuery * Javascript * Codeiginiter * Laravel * Bootstrap * Wordpress Themes/ Plugins. * Scrapping * UI/UX * Android and IOS and windows App development * Graphic design * Ionic framework * Logo design * Icon design * Illustration ========================================= - As you can see our reviews prove that the client is always happy after working with me. - If you want a professional developer/designer, you are in the right place.
$15 USD in 1 day
4.9 (165 reviews)
7.0
7.0
User Avatar
MM. Hi, I will select all options in a select. Please let me know more about it . So that we can take things forward. Thanks.
$20 USD in 10 days
4.9 (573 reviews)
7.1
7.1
User Avatar
Hi I can do this for you. Hire me please. Thank you! .
$15 USD in 10 days
4.9 (609 reviews)
7.1
7.1
User Avatar
Hello, How are you? I read your job with interest. I can do it. I’m an expert Web Developer with more than 5 years experiences on WODRPRESS(“Theme” and “Plugin”), CODEIGNITER, PHP, OOP, MYSQL, MYSQLI, JAVACSRICT, BOOTSTRAP, HTML, HTML5, CSS, RESPONSIVE etc. I'm a full-time freelancer, I can contribute time and energy to the finish your job. I'm always available in freelancer. I'm waiting for your reply, Regards: Amy
$15 USD in 0 day
5.0 (117 reviews)
6.3
6.3
User Avatar
i got the issue lets discuss in chat looking forward for your reply start it immediately create milestone and award me i will give you solution
$15 USD in 1 day
4.7 (29 reviews)
4.8
4.8
User Avatar
Hi, Lets discuss. I have 8 years of experience in PHP and following framework and cms i also worked on following technologies 1)Joomla 2)Wordpress 3) Smarty template engine 4) Magento 5) Drupal 6) Kohana Framework 7) ExtJS 8) Xcart 9) Oscommerce 10) Angular 2 11) Node.js please contact me as per your requirement skp id is : piyushjoomladeveloper Thanks, Regards, Piyush Raval
$15 USD in 1 day
5.0 (26 reviews)
4.3
4.3
User Avatar
Please give me one chance. I am very experienced butnew in freelancing. Thanks
$15 USD in 0 day
5.0 (18 reviews)
3.7
3.7
User Avatar
I have vast experience of jQuey, PHP and HTML I can fix this issue in an hour. I have fixed many issues of this type
$20 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
East Peoria, United States
5.0
5
Member since Jun 12, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.