jquery datepicker

I am facing a very weird situation.

I downloaded the source code of datepicker from http://jqueryui.com/demos/datepicker/default.html

i saved default.html on c:

when i run c:\default.html it works perfectly fine.

i copied the same file to my server and ran it from server http://10.0.1.2/default.html

it does not work????

I have been trying to figure out this since more than a week now. Please advice.
genius_geekAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

OmniUnlimitedCommented:
It looks like the server ip is not actually available on the Internet?
0
genius_geekAuthor Commented:
it is not. it is a local ip on the development machine. but that is not an issue...
i mentioned the ip to give a reference. only i can access the ip. i have many other pages on the ip, php, other jquery dynamic forms... they all work fine with the ip.

The point is datepicker is not working.
0
OmniUnlimitedCommented:
OK, and forgive me if I say the obvious, but you have double checked the links on the page, the script url's, etc. and they all check out as being connected and the files are being accessed correctly?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

genius_geekAuthor Commented:
i think its the problem with script urls and link urls... since i am a beginner at jquery, i dont hv basic foundation knowledge of what scripts are compulsory while using jquery ui

this is all i have

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="http://jqueryui.com/demos/demos.css">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.datepicker.js"></script>

Open in new window


I need someone to help me identify, if something is missing? or is anything not required?
0
OmniUnlimitedCommented:
Wow, yeah, you have a lot of unnecessary stuff there.  You probably are running into conflicts.  I would recommend that you download a custom theme from http://jqueryui.com/themeroller/.  Select the "Gallery" tab from the sidebar on the left, select the look you want, and click on "Download" to move to the download page, then click on the "Download" button there to download the custom theme zip file.

Decompress it, and the only real files you need will be the two javascript files from the js folder and the files from the CSS folder.  Make sure that the paths are right to these files on your server, then everything should work.  I'd take out the rest of those links and scripts.
0
Kiran SonawaneProject LeadCommented:
I think you just need
<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.datepicker.js"></script>

Open in new window


Again try with class instead of id

like

<html>
<head>

<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.datepicker.js"></script>

<script type="text/javascript">
$(document).ready(function(){
 
  $(function() {
    $( ".myDatePicker" ).datepicker(); // [b]see myDatePicker [/b]
  });

});

</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker" class="myDatePicker"></p>
</body>
</html>

Open in new window

0
OmniUnlimitedCommented:
The only problem I see with sonawanekiran's solution is that it relies on a third party's site, in this case ajax.googleapis.com.  If that's what you want to do, you can do that as well, but my solution provides greater flexibility, reliability, speed, control and customization.
0
Nguyen Doan TienProject ManagerCommented:
There are some difference url resources (stylesheet, javascript) in default.html file
In your case, here is the best soultion to run default.html:
1) Download all resource on your local disk
2) re-config src url in default.html file
=> I have built and tested datetime picker, please see the attachment file and copy to your server and run it again.
datetimepicker-demo.zip
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
genius_geekAuthor Commented:
thanks nguyen. it was a perfect demo & solution.
thanks sonawanekiran and omniunlimited. cheers.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.