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 4071878
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:48:46+00:00 2026-05-20T16:48:46+00:00

Hey all, I am new to working with variables and am trying to get

  • 0

Hey all,
I am new to working with variables and am trying to get this function working. I was wondering if anyone can help me find the problem in it. It doesn’t seem to be working at all. I’m not sure if I have marked everything up correctly.

<script type="text/javascript">
    $(document).ready(function() {
        $('.partners_internal_product_select input[type=radio]').live('change', function(){ //Setting up the chenge event for the radio button
            var AffectedRegistration = $(this).closest('.partners_internal_product_registration'); //Select the nearest div with this class
            var ID = $(this).attr('id'); //getting the ID of the radio button
            var IDArray = ID.split('_'); //seperating the ID into an array
            var regURL = 'accomodationpartners/'+IDArray[1]+'.php'; //building a url to load
            $(AffectedRegistration).load(regURL); //loading the url into the nearest div.partners_internal_product_registration
        });
    });

    </script>
    <div class="partners_internal_item_hdr"><h1 class="white">Program Registration</h1></div>
    <div class="partners_internal_item">
        <div class="partners_internal_item_subhdrfull"><h2>Select a Product to Register For:</h2></div>
        <div class="partners_internal_product_select">
            <fieldset><input type="radio" class="productselect" name="productselect" id="productselect_daytrip" /><label for="productselect_daytrip">Day Trip</label></fieldset>
            <fieldset><input type="radio" class="productselect" name="productselect" id="productselect_courseregistraion" /><label for="productselect_courseregistraion">Course Registration</label></fieldset>
            <fieldset><input type="radio" class="productselect" name="productselect" id="productselect_socialbusinessgroup" /><label for="productselect_socialbusinessgroup">Social/Business Group</label></fieldset>
            <fieldset><input type="radio" class="productselect" name="productselect" id="productselect_paddlefest" /><label for="productselect_paddlefest">Paddlefest</label></fieldset>
            <fieldset><input type="radio" class="productselect" name="productselect" id="productselect_paddleplay" /><label for="productselect_paddleplay">Paddle and Play</label></fieldset>
        </div>
        <div class="partners_internal_product_registration"></div>
    </div>
  • 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-20T16:48:47+00:00Added an answer on May 20, 2026 at 4:48 pm

    The closest function in jQuery will look for the next element with the filter you supply that is a parent, or parent of a parent etc, basically up the DOM tree.

    In your script you are searching for the partners_internal_product_registration class from the radio buttons, but the div with class partners_internal_product_registration, is actually a sibling of the radio button’s parent.

    You really need

    var AffectedRegistration = $(this).closest('.partners_internal_product_select')
                                    .siblings('partners_internal_product_registration');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all i am trying to get this working here: <? echo ('<script type=text/javascript>
Hey all i am in need of some help getting my code working correctly
Hey, everyone. I couldn't find anything Googling this problem, and I've found really good
Hey all, i've been working on this small project in XNA the goal is
Hey guys I was wondering if anyone could help me with an issue im
Hey All! I'm trying to construct a query that is something like this: Where
Hey all need a lil help sorting a loop for this table out, cant
Hey all i am trying my best to find a way to, when hovered
Hey all i am VERY new to a Oracle DB and i am trying
Hey all i am trying to turn an A/V reciever on and off this

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.