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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:16:57+00:00 2026-05-25T01:16:57+00:00

<p>Today’s Date: <?php echo $date; ?></p> <p>Are you applying for a day, evening, or

  • 0
<p>Today's Date: <?php echo $date; ?></p>
<p>Are you applying for a day, evening, or weekend class?</p>

<select name="date" id="wclass">
<option value="day">day</option>
<option value="evening">Evening</option>
<option value="weekend">Weekend</option>
</select>


Program Start Date:

<div id="dates"></div>

<script language="javascript">
$(document).ready(function() {

$("#wclass").change(function ()
{
    if( $("#wclass").val() == 'day' )
    {
        $('#dates').html('<select name="date">\
            <option value="date1"><?php echo $start1; ?></option>\
            <option value="date2"><?php echo $start2; ?></option>\
            <option value="date3"><?php echo $start3; ?></option>\
            <option value="date4"><?php echo $start4; ?></option>\
            <option value="date5"><?php echo $start5; ?></option>\
            <option value="date6"><?php echo $start6; ?></option>\
            <option value="date7"><?php echo $start7; ?></option>\
        </select>');
    } 
 }); 
});
</script>

So my issue is that i cant get the dates to come up, the list wont show. If i put the listi in on its own, works like a charm. There an issue with the javascript?

This is what the browser gets:

 $('#dates').html('<select name="date">\
 <option value="date1">Aug 11</option>\
 <option value="date2">May 5</option>\
 <option value="date3">June 6</option>\ 
 <option value="date4">January 7</option>\
 <option value="date5">April 5</option>\
 <option value="date6">December 3</option>\
   <option value="date7">October 15</option>\
 </select>'); 
  • 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-25T01:16:58+00:00Added an answer on May 25, 2026 at 1:16 am

    Since you are listening to the change event, your list will only show up if you select evening or weekend, and then change it back to day.

    You can either force a change on initial load:

    $("#wclass").change(function ()
    {
        if( $("#wclass").val() == 'day' )
        {
            $('#dates').html('<select name="date">\
                <option value="date1"><?php echo $start1; ?></option>\
                <option value="date2"><?php echo $start2; ?></option>\
                <option value="date3"><?php echo $start3; ?></option>\
                <option value="date4"><?php echo $start4; ?></option>\
                <option value="date5"><?php echo $start5; ?></option>\
                <option value="date6"><?php echo $start6; ?></option>\
                <option value="date7"><?php echo $start7; ?></option>\
            </select>');
        } 
     }); 
    }).val('day');
    

    Or use then second solution I gave you here: Display php using javascript

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

Sidebar

Related Questions

Today is my first day ever messing with PHP or MySQL... I tried to
Today when I was in computer organization class, teacher talked about something interesting to
today i need your help to get an specific sql select query. i have
Today is my first day working with SQL so please bear with me for
Today, I was trying to cast a hard-coded value into a short and S
Today I added a class which manages the connection to a MySQL Server. It
Today, I ran into this weird problem with a user using Mac OS X.
Today I was listening to the Hanselminutes show about .NET 3.5 SP1...What's inside ,
Today I was working on a tab navigation for a webpage. I tried the
Today I discovered that my fresh installation of Apache HTTP Server is able to

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.