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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:54:25+00:00 2026-06-11T08:54:25+00:00

I have the form: <form name=form1 method=post action=test.php?date=javascript:this.form.date2.value> I am using a DatetimePicker for

  • 0

I have the form:

<form name="form1" method="post" action="test.php?date=javascript:this.form.date2.value">

I am using a DatetimePicker for PHP like below:

        $myCalendar = new tc_calendar("date2");
        $myCalendar->setIcon("calendar/images/iconCalendar.gif");
        $myCalendar->setDate(date('d'), date('m'), date('Y'));
        $myCalendar->setPath("calendar/");
        $myCalendar->setYearInterval(1970, 2020);
        $myCalendar->dateAllow('2008-05-13', '2015-03-01', false);
        $myCalendar->startMonday(true);
        $myCalendar->autoSubmit(true, "form1", "test.php");
        $myCalendar->autoSubmit(true, "form1");
        $myCalendar->showWeeks(true);  
        $myCalendar->writeScript();

The thing is i cannot pass the date value from datetimepicker into form action where the url is “test.php?=date=”

How would this be possible to pass the value of datetimepicker by just clicking on calendar, not using any extra button and using onsubmit event.

After execution the result in URL looks like this:
test.php?date=javascript:this.form.date2.value

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-06-11T08:54:26+00:00Added an answer on June 11, 2026 at 8:54 am

    You should not need javascript to submit a form without ajax.
    As you want to sent GET variables with ? sign, jsut use GET method in your form and set the name of the input to the name of the variable you want to get sent. (if you can replace ‘date2’ with ‘date’):

    <form name="form1" method="get" action="test.php">
        <input name='date' />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have file with name contact.php, inside I have form: <form method=post name=kontakt action=send_mail.php>
I created this form: <form method=post action=process-form.php id=emailForm name=emailForm target=_self> <h4>Sign up to be
Lets say that you have a following simple application: <form action=helloServlet method=post> Give name:<input
I have created a form <form name=form1 method=post> <textarea rows=5 cols=20 name=ta1></textarea> <input type=submit
I have a matrix of objects that contains data in this form: name A,2,name
Suppose I have a form like this: Name:<input type=text name=xxx id=name/> Type:<select> <option>xx</option> <option>xx</option>
Ok, so im new in php and sql, and I have this form that
below is the code i'm using to test this: <cfif structkeyexists(form, submitted)> <cfdump var=#getPageContext().getRequest().getParameterMap()#>
I have a form with Name textbox Address textbox Phone textbox Insert buttion and
I have a form with a name and an email address. I want a

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.