Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7084745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:20:23+00:00 2026-05-28T07:20:23+00:00

Found a great snippet on here , so fiddled with it and it does

  • 0

Found a great snippet on here , so fiddled with it and it does pretty much exactly what I want it to do. But .. obviously we dont want to run “strings” in value box, as we are attaching this form element to database.

So here is the script:
http://jsfiddle.net/ozzy/gwKfP/10/

Here is the code ( html )

<select id="duration">
 <option value="0">Select</option>
 <option value="$7.99">7 days</option>
 <option value="$3.99">3 days</option>
</select>

I would prefer to have this all triggered off something other than value.. not sure if thats dooable.

Also in our form we have a checkbox immediately before this select box. I really would like it so unchecked , disables the select until the checkbox is ticked. Also if checkbox is unticked is there a way of changing value of select to zero ( 0 )

We use jquery ( but as you may guess I dont get js ) lol

My actual code is :

<label class="s_radio"><input class="inline" type="checkbox" value="ctv"/> yes</label>
            <label class="s_radio">
                <select id="duration" class="inline" style="width: 100px;">
                <option value="0">Select</option>
                <option value="$7.99">7 days</option>
                <option value="$3.99">3 days</option>
                </select>&nbsp; <span id="value" class="disabled" data-default="Please Choose"> Please Choose</span></label>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:20:24+00:00Added an answer on May 28, 2026 at 7:20 am

    Add this to your document.ready function:

    $('.s_radio input').change(function() {
        if ($(this).is(":checked"))
            $('#duration').attr('disabled', '');
        else
            $('#duration').val('').change().attr('disabled', 'disabled');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to the whole jquery game but I found a great tut snippet
I found a great walk-through for Sync Framework here: http://msdn.microsoft.com/en-us/library/bb726010.aspx But, it is using
I found a great C++/ODBC example here ... The project I downloaded builds great
I found this great Tablesorter plugin for jQuery but I can't make it work
I found a great explanation about the new RTTI in Delphi ,but I don't
I've found a great datepicker on EveryBlock's web site: http://ui-patterns.com/userset/553/image/2955#focus Does anybody know which
I found this nice snippet of code online: rkApp = Registry.LocalMachine.OpenSubKey(SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run, true); Which runs
I have found great jQuery wizard here Jerod Santo blog which suits my need.
I found some great sql code for dynamic sort & order but I am
I found this great jquery bubble script online - http://jqueryfordesigners.com/coda-popup-bubbles/ - and I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.