Jump to content

Search the Community

Showing results for tags 'jquery javascript select onch'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi, I have a radio button which, when clicked, is opening select. I would like to store the value of a radio and select into two separate cookies. This is my code I'm using, but I can't get second on change event to fire and get the value of select. I do get value of radio and store in cookie, but when trying to get value from select I get null. Can you, please help me and tell me what I'm doing wrong? Html code: <div class="row"> <div class="col-md-6"> <div class="radio clip-radio radio-primary"> <input type="radio" id="radio3" name="vertical" value="Pricelist" /> <label for="radio3"> Pricelist </label> </div> <div id="Pricelist" class="desc"> <div class="form-group"> <select class="cs-select cs-skin-elastic" name="pricelist" id="pricelist_select"> <option value="" disabled selected>Select pricelist</option> <option value="1">1</option> <option value="2">2</option> </select> </div> </div> jQuery //Displaying select box when type radio button is clicked $(document).ready(function() { $("input[name=vertical]").on( "change", function() { var test = $(this).val(); $(".desc").hide(); $("#"+test).show(); $("#pricelist_select").val(); $('#pricelist_select').trigger("change"); alert($("#pricelist_select").find(":selected").val()); $.cookie('pricelist_select', $("#pricelist_select").val()); } ); }); CSS .desc { display: none; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.