WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • How to check selected options in bakery with jquery
  • Print
Pages: [1]   Go Down

Author Topic: How to check selected options in bakery with jquery  (Read 13392 times)

kettrich

  • Guest
How to check selected options in bakery with jquery
« on: April 07, 2011, 10:09:58 AM »
I am just a beginner with jquery but what I need should not be too difficult to realize.
There are 3 dropdown select fields on the detail page of a bakery shop. If you open the detail page only one dropdown select is shown. Depending on what option will be selected the second and third dropdown select boxes differ.
So I need to find out what first is choosen and then get all the refering items and show them.
if I test my little jquery on a simple html file it works but it does not within bakery in view_item.php.
Can you tell me what to do to get it work.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <title></title>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  <script type="text/javascript">
$(document).ready(function(){   
   $('select#option').click(function(){
      $('#optionen2').click(function(){
        alert($('#optionen2').val());
      });
   });
});
</script>
  </head>
  <body>
    <form action="" method="post">
               
         <select id='option' name='attribute[]' class='mod_bakery_item_sel ect_f'>      
            <option id='optionen1' value='1'>nama1</option>
            <option id='optionen2' value='2'>nama2</option>
            <option id='optionen3' value='3'>nama3</option>
            <option id='optionen4' value='4'>nama4</option>
         </select>   
   </form>         
            
     </body>
</html>
« Last Edit: April 07, 2011, 02:23:13 PM by kettrich »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • How to check selected options in bakery with jquery
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2