Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Why does this not work?

Posted on 2014-10-22
4
Medium Priority
?
131 Views
Last Modified: 2014-10-23
Attached is a screenshot of the app that I'm looking to mimic. It's the calendar that pops up when the user clicks into the text field.

Here are the libraries I've got referenced in my header:

<link href="localhost/development/js/jquery-ui-1.10.4.custom/css/blitzer/jquery-ui-1.10.4.custom.css" rel="stylesheet">
<script type="text/javascript" src="localhost/development/js/jquery-ui-1.10.4.custom/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="localhost/development/js/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js"></script>

Here's my JavaScript:

Here's my JavaScript:

<script type="text/javascript">

$( "#s4date" ).datepicker({ dateFormat: "yy-mm-dd" });

</style>

...and here's my HTML:

<input type="text" size="50" id="s4date" name="s4date">

Probably something ridiculously easy and obvious, but I'm clueless. What am I missing?
screenshot.docx
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40397334
And what exactly is not working?

Included screenshots directly in your question, don't embed them in another document.
0
 

Author Comment

by:brucegust
ID: 40397353
On the working screen, you an put your mouse in the text field and the calendar pops up. Nothing pops up in my attempt to duplicate the same effect.

In the past, when confronted with that kind of problem, it was a scenario where my libraries weren't being read or I was missing some crucial resource. But in this instance, all the required files and libraries and accurately referenced, hence my not knowing what could be wrong.

And as far screenshots, at the risk of sounding utterly clueless, I'm hitting "Print Screen" and apart from pasting that either into a new jpg or a Word doc, how do you embed what's sitting on your clipboard directly into the question?
0
 
LVL 58

Accepted Solution

by:
Gary earned 1000 total points
ID: 40397360
Your paths look a bit weird
localhost/development

That means it is looking at a folder called localhost in the folder where you page resides

Re the image
Once it's pasted into Word you can right click the image and do a Save As then attach it here as a normal image.
0
 
LVL 23

Assisted Solution

by:Snarf0001
Snarf0001 earned 1000 total points
ID: 40397579
Well, 2 possible things:

1) The end of the script tag you have in there is </style> not </script>, but I'm assuming that was just a typo pasting in here.
2) If your script is at the top of the page, then you'll be running the jquery selector before the element has rendered on the page, and won't find it.  Put the function in side doc.ready.


    <script type="text/javascript">
        $(document).ready(function () {
            $("#s4date").datepicker({ dateFormat: "yy-mm-dd" });
        });
    </script>

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question