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

  • Home
  • SEARCH
  • 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 3349498
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:40:19+00:00 2026-05-18T01:40:19+00:00

I have a product selection page where you choose a plan and once selected

  • 0

I have a product selection page where you choose a plan and once selected it displays the selection information in a div. The problem is if the page gets refreshed the summary div disappears but it remembers your form selection. How can I get it so it still remembers the summary as well?

<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>

</head>
<body>
<script>
$(document).ready(function(){
      $("div.plan").hide();

      $("input[type=radio]").click(function(){
          $("div.plan").hide();
          $("div[planid=" + $(this).val() +"]").show();
      });
});
</script>

<input type="radio" name="plan" value="1" /> Plan 1 <br />
<input type="radio" name="plan" value="2" /> Plan 2 <br />
<input type="radio" name="plan" value="3" /> Plan 3 <br />

<div class="plan" planid="1">Plan 1 details</div>
<div class="plan" planid="2">Plan 2 details</div>
<div class="plan" planid="3">Plan 3 details</div>

</body>
</html>
  • 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-18T01:40:19+00:00Added an answer on May 18, 2026 at 1:40 am

    After your code abode, you can trigger the click handler on the selected radio button, like this:

    $(document).ready(function(){
      $("div.plan").hide();
    
      $("input[type=radio]").click(function(){
          $("div.plan").hide();
          $("div[planid=" + $(this).val() +"]").show();
      }).filter(':checked').click();
    });
    

    What this does is uses the handler you’re already binding, then from those elements gets the :checked one and executes the click event handler, showing the proper <div>.

    As an aside, planid isn’t a valid attribute, if you’re doing down this road go ahead and use data- attributes so you’ll be HTML5 valid as you go (they present no problems in HTML4).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a product selection page where you choose a phone and a plan
I have a page with datatable with product information from which at a product
I have a product table where the description column is fulltext indexed. The problem
I have a products page which displays 10 products on each page. The GET
I have a table that displays data for the items selected in the checkbox
Suppose that I have an ASP.NET page, where a customer can select a product
I have a view page that has two DIV tags. If the session[UserType] =
I have an open cart site that displays all the products on one page
I have a featured product selection in pHtml, which instead of creating an attribute
I have a selection of products within my wordpress site. They are configurable products

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.