Hi!

I need help to install or actually to make this freesource code working...
at the first time, the script is working very well.. but when i inserted <form> ..script here.. </form> everything isn't working... can anyone help me with this?

you guys can download the script at http://www.dynarch.com/projects/calendar/download/1.8/JSCal2-1.8.zip

please refer below for my code:

<html>
  <head>


    <title>Test Calendar</title>
    <script src="sys_admin/js/jscal2.js"></script>
    <script src="sys_admin/js/lang/en.js"></script>
    <link rel="stylesheet" type="text/css" href="sys_admin/css/jscal2.css" />
    <link rel="stylesheet" type="text/css" href="sys_admin/css/border-radius.css" />
    <link rel="stylesheet" type="text/css" href="sys_admin/css/steel/steel.css" />
  </head>
  <body><form method="post" name="submit" action="">



    <input size="30" id="f_date1" /><button id="f_btn1">...</button><br />


    <script type="text/javascript">//<![CDATA[

      var cal = Calendar.setup({
          onSelect: function(cal) { cal.hide() },
          showTime: true
      });
      cal.manageFields("f_btn1", "f_date1", "%Y-%m-%d");


    //]]></script>

    </form>
  </body>
</html>

Please guide me.. thank you.

Why you want to using From tag?

because i want to submit the data using PHP...

Ok.
I have a proposal for you! for sending data use jQuery!
This is a an example for ajax sending data with jquey!

this code is for b.php

<html>
<head>
<style type="text/css">
#error
{
	color:red;
}
#success
{
	color:green;
}
</style>
<script language="javascript" src="jquery.min.js"></script>
<script language="javascript">
$.ajax({
   type: "POST",
   url: "a.php",
   data: "q=test",
   success: function(msg)
	{
     document.getElementById('div').innerHTML = msg ;
	if(msg == "true")
	{     
		$(document).ready(function() { $("div").append("<div id='success'>Success!</div>"); });
	}else{
    		$(document).ready(function() { $("div").append("<div id='error'>Error</div>"); });
	}
	},
	   error: function(msg){
     	$(document).ready(function() { $("div").append("<div id='error'>Error</div>"); });
   }
 });
</script>
</head>
<body>
<div id="div"></div>
</body>
</html>

this code is for a.php file

<?php
if($_POST['q']=="test")
{
	echo "true";
}else{
	echo "false";
}
?>

type: "POST",
url: "a.php",
data: "q=test",
You can edit this commands ! example:

type: "GET",
url:"youfile.php",
data:"q="+document.getElementById('f_date1').value;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.