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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:21:51+00:00 2026-05-21T03:21:51+00:00

I have a form where jQuery is already being used on page load to

  • 0

I have a form where jQuery is already being used on page load to change a value to a timestamp with the following format: 20110424. It’s a hidden input field:

<input type="hidden" name="sub_enddate" value="1" />

Which when the page is run, the value of “1” gets changed to one month out. If “2” is in the value, the value of 2 is replaced with “20110524” and so on. It’s using the following code to make this change: http://pastie.org/1708677

What I’m trying to do now is change the date value above based on select values a user chooses. Here’s the select options:

<select name="Membership Duration">
<option value="">Select A Membership Duration</option>
<option class="mos6" value="6 Months{p+220}">6 Month Membership</option>
<option class="mos3" value="3 Months{p+240}">3 Month Membership</option>
<option class="mos1" value="1 Months{p+260}">1 Month Membership</option>
</select>

As you can see, I’ve attached a class to each option in the select dropdowns (i.e. mos6). What I’m attempting to do is change the value of the timestamp explained above based on what the user chooses. For example, if the user chooses “3 Month Membership”, since this option has a class of 3, the timestamp will be modified to reflect 3 months from today’s date (so effectively adding 2 months onto the existing timestamp in the hidden input field above. If “6 Month Membership” is chosen, the date will be modified to 6 months from today’s date and so on. If the hidden input field above is a bad idea and we should just create a timestamp instead based on the dropdown options, I’m cool with that.

Thanks!

  • 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-21T03:21:52+00:00Added an answer on May 21, 2026 at 3:21 am

    I was able to track it down by asking a different question here: How to timestamp with jQuery based off user's selection

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

Sidebar

Related Questions

I have a form what jQuery sents for me using Ajax to php. For
I have a form on a webpage that I submit using the jquery form
I have a form in a jQuery enabled site. The form does not feature
I have a form that uses jquery to generate rows of input fields these
I have written a form using the jQuery .post() function to post the data
I have a form that I pre-populate with test data though jQuery. $('INPUT[name=subscription.FirstName]').val('Jef'); but
I have a form where users can add input fields with jQuery. <input type="text"
I have a form in a Code Igniter view in my jQuery Mobile application.
I have a method set up that uses jquery form for a file upload
I have a jQuery-Script to accomplish the following tasks: if a gridview in my

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.