javascript,jquery,html,datepicker,jquery-ui-datepickerRelated issues-Collection of common programming errors
Jamal
javascript jquery datetime plugin twitter
I’ve built a Twitter plugin recently and was wondering if I could get some feedback on it. There is also a PHP side that grabs the actual tweets and I can post that code if it’s needed.http://jsfiddle.net/cKfDd/;(function ( $, window, document, undefined ) { /************************************* Plugin Functions *************************************/ /*************************************/ Plugin.prototype.init = function () {var params = [ ‘?user=’ + this.options.user,’&limit=’
adambender
javascript best-practice
I come from a Java background so my desire for proper unambiguous logging is strong. I prefer using the console to using some other gui widget however, in the browser I know that I can’t always count on the console to exist or for it to have all the levels I might like. To remedy this I worked up the following console sanitizer and I was curious what drawbacks it might have.function configureConsoleLog() {“use strict”;var logMethods = [ ‘trace’, ‘debug’, ‘log’, ‘info’, ‘warn’, ‘error’ ], i;if (!
palacsint
javascript php google html5
I am newbie at JavaScript, I am using PHP to get data from a MySQL database, and use the data to drop multiple markers into google map. Please give me some suggestion to my code, really appreciate for any your advice.<?php require_once ‘Common/system_start.php’; $sql=”select * from tab_mem order by sn desc “; $result= mysql_query($sql); $data=mysql_fetch_assoc($result); $row=mysql_num_rows($result);header(“Content-type: text/xml”);// Iterate through the rows, adding XML nodes for eachwhile (
Brandon Wamboldt
javascript node.js
I’m looking for some general feedback about the layout and structure of my code. Basically just any feedback, as I’m not super happy about this code, but I’m not sure how to improve it further.’use strict’;/* jshint node: true */var fs = require(‘fs’); var os = require(‘os’); var nodemailer = require(‘nodemailer’); var rimraf = require(‘rimraf’); var config = require(‘../config’); var dropbox = require(‘../lib/dropbox-sync’); var mysql = require(‘../lib/mysql-back
user2456359
php javascript wordpress
I’m struggling with adding the jQuery to the templated I transfered to WordPress, From what I’ve already learned from WordPress you need to use WordPress functions to include js files, is that always neccasary? Could somebody please take a look at the function I’ve written?header.php<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘HTML_type’);?>” charset=”<?php bloginfo( ‘charset’ ); ?>”
Fran Verona
php javascript jquery ajax
I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title
Sean
javascript node.js gruntjs livereload
PC Specs: Windows 7 Enterprise x64I’m running grunt.js on a project and recently started receiving an error when attempting to run ‘grunt watch’.Grunt worked fine yesterday but today I started seeing:Running “watch” task Waiting…Fatal error: listen EACCESI read another question here: Cloud 9 and Grunt.jsthat lead me to remove ‘options: {livereload: true}’ from Gruntfile.jsrunning watch again works as intended. Is there a way to reconfigure grunt or livereload to get livereload working with G
Asenar
javascript php jquery callback
i have make an php editor with so much effort but i cant print the fatal error. and want to print the fatal error. How to do this. I have code for run the php through eval function here is my jsfiddle – **http://jsfiddle.net/3c7F6/3/** I want to print an fatal error. Please help me to do this.please check the code and give me the suggestion
Septagram
javascript fatal-error
Is it possible to terminate script on a certain condition with a specific error message? Exceptions are not an option, as they can be catched, thus avoiding termination.Update:I’d prefer the universal approach, but if there’s none, then it’s for the in-browser JavaScript. Error should be silent, and the error message should only go into the browser error log.
Ates Goral
javascript gruntjs
I removed the old grunt first,and I install the new grunt.But I got an error:D:\www\grunt-test\grunt grunt-cli: The grunt command line interface. (v0.1.4)Fatal error: Unable to find local grunt.If you’re seeing this message, either a Gruntfile wasn’t found or grunt hasn’t been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide: http://gruntjs.com/getting-startedIs there haven’t a grunt in my system path, or somethi
MPD
7 jquery admin-theme
I have installed jQuery Update but it breaks some core functionality that makes the admin UI a struggle to deal with. Is there a way to keep jQuery Update enabled but disable it when the admin theme is visible?
Jamal
jquery plugin twitter
I’ve been working on a jQuery plugin for pulling tweets since the v1 endpoints were all closed off and you need oAuth now. This is just the jQuery part but if you want to see the php behind it I’ll be happy to post. But basically, I’d love suggestions, as this is one of the first real plugins i’ve made, i’m really looking for critique on patterns and efficiency. Is there anything I’m doing that can be shorten’d significantly? Is there a feature you think would be cool for me to include?And just
Jamal
javascript jquery datetime plugin twitter
I’ve built a Twitter plugin recently and was wondering if I could get some feedback on it. There is also a PHP side that grabs the actual tweets and I can post that code if it’s needed.http://jsfiddle.net/cKfDd/;(function ( $, window, document, undefined ) { /************************************* Plugin Functions *************************************/ /*************************************/ Plugin.prototype.init = function () {var params = [ ‘?user=’ + this.options.user,’&limit=’
laxman
php jquery ajax wordpress woocommerce
I am getting catchable fatal error in bellissima themeforest woocommerce theme.http://www.pursesgalore.com.au/ can anyone help on this?Code:if(!$dst_h) ://can’t resize, so return original url$img_url = $url;$dst_w = $orig_w;$dst_h = $orig_h;————————–line number 1040 ———————–else ://else check if cache existsif(file_exists($destfilename) && getimagesize($destfilename)) {$img_url = “{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}”;} Error: Catchable fatal erro
Fran Verona
php javascript jquery ajax
I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title
Tom
jquery ajax joomla joomla2.5
Still having problems figuring out how to use Ajax and the Joomla framework together. I’ve created a Joomla component which I can access with:index.php?option=com_mycomponentI’m using Jquery with Ajax in components/com_mycomponent/views/mycomponent/tmpl/default.php:<?php // No direct access to this file defined(‘_JEXEC’) or die(‘Restricted access’); ?> <html> <head><title>Ajax with jQuery Example</title><script language=”javascript” type=”text/javascript” src=”ht
Asenar
javascript php jquery callback
i have make an php editor with so much effort but i cant print the fatal error. and want to print the fatal error. How to do this. I have code for run the php through eval function here is my jsfiddle – **http://jsfiddle.net/3c7F6/3/** I want to print an fatal error. Please help me to do this.please check the code and give me the suggestion
Ulker Ibrahimova
javascript jquery file-get-contents
This question already has an answer here:Ways to circumvent the same-origin policy11 answersIs there any way to get full page source of snother different site? Example my site is example.com but i want to get facebook’s page source on example.com. I tired this one: http://phpjs.org/functions/file_get_contents/ And it gives me null. So anyone knows it?function file_get_contents (url, flags, context, offset, maxLen) {// Read the entire file into a string//// version: 906.111// discuss at: http://
Mitesh Vora
jquery html css ellipsis
I tried looking here Insert ellipsis (…) into HTML tag if content too wide but could not get in chrome to work. I there solution for multiline in all browsers??
Ronald Yeung
javascript jquery ajax json cors
What I am trying to do is to have a page on the HTTP protocol sending an AJAX call to the same Web server but using HTTPS. Both the requesting page and the AJAX handler are on the same server, having the same domain and port. (I.e., only difference is the protocol.) To illustrate,Fromhttp://www.example.com/index.phpTriggers a jQuery AJAX call tohttps://www.example.com/authenticate.php?user=123&password=456(I am hoping to pass the password through HTTPS to make it encrypted over the Internet.
ikmac
html parsing
So, I whip up a quick test case in Java 7 to grab a couple of elements from random URIs, and see if the built-in parsing stuff will do what I need.Here’s the basic setup (with exception handling etc omitted):DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); DocumentBuilder dbuild = dbfac.newDocumentBuilder(); Document doc = dbuild.parse(“uri-goes-here”);With no error handler installed, the parse method throws exceptions on fatal parse errors.When getting the standard Apache 2.
Chris
themes html footer markup
I’ve attempted to move the footer structure of a theme from page.tpl to html.tpl so the footer elements can occur outside of internal width specific layout.In doing so I receive an error: Fatal error: Only variables can be passed by reference in….One of the many lines in question is:<?php print render($page[‘footer_first’]); ?>Can someone explain what exactly the issue is here and how I can best solve it ? Muchly appreciated!
ThomasReggi
php mysql html codeigniter
Fatal error: Call to a member function result() on a non-object in C:\wamp\www\system\application\models\users_model.php on line 8<?phpclass Users_model extends Model {function get_records(){$query = $this->db->get(‘users’);return $query->result();}}?>
user2176252
php html mysql
I’m getting following error while I try to upload an image to my website, It worked fine in my localhost but getting this error as i uploaded to WebServerFatal error: Class ‘Ps2\Exception’ not found in G:\WebSpace\siteadress.com\www\classes\ps2\upload.php on line 20my upload.php is as below,<?php namespace Ps2; class Upload { protected $_uploaded = array(); protected $_destination; protected $_max = 102400; protected $_messages = array(); protected $_permitted = array(‘image/gif’,’
Ash
php html recaptcha
Hi I am attempting to impliment Recaptcha into my php file to secure a page that allows users to add comments. but I am getting this fatal error: Fatal error: Call to undefined function recaptcha_check_answer() in /home/fh11alb/public_html/home.php on line 30Does anybody know what I might be doing wrong?<?php session_start(); if (!isset($_SESSION[‘logged’])){ $_SESSION = array(); $_SESSION = destroy(); require_once(‘recaptcha/recaptchalib.php’); header(‘location: home_start.php’); //your log
Kal
php html zend-framework lucene zend-search-lucene
Hi guys working with Zend search lucene and im getting the following warning and error:Warning: require_once(Zend/Search/Lucene/Storage/File/Filesystem.php): failed to open stream: No such file or directory in G:\xampp\htdocs\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 349Fatal error: require_once(): Failed opening required ‘Zend/Search/Lucene/Storage/File/Filesystem.php’ (include_path=’.;\xampp\php\PEAR’) in G:\xampp\htdocs\Zend\Search\Lucene\Storage\Directory\Filesystem.php on
Justin T.
php html mysql cookies prestashop
Well, im developing a CMS based form with a copy-center-system (this is the form), but i need the $cookie->id_customer. But i get an error:Fatal error: Call to a member function isLogged() on a non-object in /home/papelari/public_html/modules/mymodule/submit.php on line 13<?php /*$con = mysql_connect(“localhost”,”papelari”,”509494218″);if (!$con){die(‘Could not connect: ‘ . mysql_error());}mysql_select_db(“papelari_Veloso”, $con); */global $cookie;if(!$cookie->isLogged()) {echo ‘Please lo
user1299846
java android html phonegap
I just started with phonegap, so I went throught this tutorial [http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html][1] [1]: http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.htmlCatlog:08-09 14:36:21.752: E/AndroidRuntime(543): FATAL EXCEPTION: main 08-09 14:36:21.752: E/AndroidRuntime(543): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.apache.cordova.example/org.apache.cordova.example.cordovaExample}: java.lang.Cla
Hanky ? Panky
php html mysql database pdo
I’m receiving this error and it’s got me scratching my head:Fatal error: Uncaught exception ‘PDOException’ with message ‘invaliddata source name’ in/Users/aaronwilson/Desktop/testing_server/ATOM_CMS/functions/sandbox.php:10Stack trace: #0/Users/aaronwilson/Desktop/testing_server/ATOM_CMS/functions/sandbox.php(10):PDO->__construct(‘SELECT title FR…’) #1/Users/aaronwilson/Desktop/testing_server/ATOM_CMS/config/setup.php(30):get_title(NULL, ‘blog’) #2/Users/aaronwilson/Desktop/testing_server/ATOM
Rocket Hazmat
php html
Warning: Please contact support about failure in /public_html/install/index.php on line 1295Fatal error: Function name must be a string in /public_html/install/index.php on line 1296Okay so I did bad at explaining the whole thing. So Basically I’m trying to install Boonex Dolphin 7.0.6 (Social Networking CMS) on my Web site. I installed all the files correctly. I went to the install page. Went to the second page where I had to make all the files Writable. Once I made all the files Writable I wen
MrFoh
javascript android backbone.js cordova datepicker
Am developing an app using phonegap/cordova 3.0.0 and I am trying to get a native datepicker in my app using the datepicker plugin which i found in this repo. However after going through the plugin documentation for phonegap 3.0.0 i figured that the plugin was not compatible with phonegap 3.0.0, so i tried modifying using the guidelines in the phonegap documentation and hosting it on github here so i can add it my project. But when i try triggering the plugin in a backbone view i see these error
user3478224
android datepicker
I have an app with three popup windows. First two works properly but when I try to show the third I got an android.view.WindowManager$BadTokenExceptionIt´s working properly in actual devices but not in all android versions.The errors appears in line 162 in selectipo.javaThis is the error and the code:ERROR:03-30 08:31:15.944 1370-1370/com.save.coinch E/Handler? Failed to handle callback; interface not implemented, callback:android.view.View$PerformClick@40d99990java.lang.IllegalStateException
Mr. Jack
javascript jquery datepicker drop-down-menu options
I have Datepicker working, but my problem is the coding of the options.I’m trying to take the date that the user picks, split it up into multiple values, and send those numbers into hidden dropdown boxes that are more acceptable to the eCommerce software that this site uses. I’m fairly new at using Javascript and jQuery, so this may be something small I just haven’t thought to try yet.I keep getting the error in the Chrome console for ‘Unexpected Token, “}”‘. But when I remove it, it gives me ‘U
Avinash Jha
iphone datepicker
I have a date picker to calcuclate age. When first time I select date it shows correct o/p but when next time I select date – app crashes.My code:NSDate *selected = [date1 date]; NSDateFormatter *df=[[NSDateFormatter alloc] init];float interval=[selected timeIntervalSinceNow] * -1.0;float year=interval/31556926;if (year>10) {alert.tag=0;alert=[[UIAlertView alloc]initWithTitle:@”Calculate Age” message:@”Congratulation!!!!Your Age Is Grater Than 10″ delegate:self cancelButtonTitle:@”Cancel” o
j08691
php javascript datepicker
I have two datepickers as follows :<input type=”date” name =”datepicker_start” id=”datepicker” value=”” class=”datepicker” size=”20″ />and<input type=”date” name =”datepicker_end” id=”datepicker2″ value=”” class=”datepicker” size=”20″ />And i want to calculate the difference in days and then compare the difference in days with :<input type=”text” name=”tleave” value=”Var” readonly=”true” size=”10″ />where Var is a variable.then i need to popup an error message if the differen
nueMind
jquery datepicker
I can’t figure out what I’m doing wrong. I have dynamically generated input fields with class=’freeze-date’ that only works on the 1st datepicker input-field generated. I have the code @ http://jsfiddle.net/Someguy2k/L9nvs/3/Thanks
Kartik Prasad
javascript jquery datepicker jquery-ui-datepicker jquery-ui-timepicker
I keep on get an error when using this the JQuery time picker add-on from here trentrichardson.com/examples/timepicker/ I don’t know what’s wrong with it and no matter what I do it doesn’t change. my code goes something like thisJavaScriptvar queryDate new date(document.getElementById(‘tempcontainer’).value); $(function()){$(“#tempcontainer”).datetimepicker({timeFormat:”hh:mm:ss”,dateFormat:”d M yy”,defaultValue:queryDate, … etcHTML<input id=tempcontainer name=fld-date-24 value=”28 Septembe
orange88
html ruby-on-rails datepicker erb jquery-ui-datepicker
I have my code structured in such a way that clicking on an ‘Edit’ button displays a hidden form (written in embedded ruby) within a ‘div’ html tag and within that form is a text_field_tag whose id is used to tie to a datepicker using Jquery.Using my current view code and jquery datepicker code in rails : I can click on an edit button and select a date using the text_field_tag for each form. However, when I try to submit that datepicker value it only gets submitted for the first form (for the fi
Mike D
c++ visual-c++ controls dialog datepicker
I’m using a usoft date time picker control in a dialog box. I started by setting the format to “HH’:’mm’ ‘ddddMMMdd’,’yyyy” and the current local date & time using DTM-SETSYSTEMTIME. If the user changes any field in the control, the program can not reset the date and time in the control using DTM-SETSYSTEMTIME although SendMessage returns a 1. As far as I can tell, the dialog box returns false (zero) to any notifications it receives concerning the control.The problem as described above is
Gury Max
javascript jquery datepicker datetimepicker timepicker
I’m using Timepicker (extended Datepicker from jQuery UI here). My code:$(‘.one’).datepicker({dateFormat: “d” }); $(‘.two’).timepicker({timeFormat: “hh” });When I click on field .two, Firebug shows me an error:Error parsing the date string: Unexpected literal at position 2date string = 10date format = mm/dd/yytimepicker.js (line 1911)Everything seems to work just fine, but I wonder why is this error showing up and how can I make it disappear?EDIT: Actually my code looks like this:$(‘.one’).datep
inky
jquery-ui-datepicker jquery-ui-timepicker
I have two input fields, one with a date picker and one with a timepicker (showing only the time sliders, without the calendar). I wanted to show a different time span in the time picker, if Saturday has been selected in the datePicker. So, the html is like this<input id=”datePicker” type=”text” name=”date”/> <input id=”timePicker” type=”text” name=”time”/>The javascript looks like this$(“#datePicker”).datepicker({dateFormat : “dd/mm/yy”,onSelect: function(dateText, instance) {var d
Kartik Prasad
javascript jquery datepicker jquery-ui-datepicker jquery-ui-timepicker
I keep on get an error when using this the JQuery time picker add-on from here trentrichardson.com/examples/timepicker/ I don’t know what’s wrong with it and no matter what I do it doesn’t change. my code goes something like thisJavaScriptvar queryDate new date(document.getElementById(‘tempcontainer’).value); $(function()){$(“#tempcontainer”).datetimepicker({timeFormat:”hh:mm:ss”,dateFormat:”d M yy”,defaultValue:queryDate, … etcHTML<input id=tempcontainer name=fld-date-24 value=”28 Septembe
orange88
html ruby-on-rails datepicker erb jquery-ui-datepicker
I have my code structured in such a way that clicking on an ‘Edit’ button displays a hidden form (written in embedded ruby) within a ‘div’ html tag and within that form is a text_field_tag whose id is used to tie to a datepicker using Jquery.Using my current view code and jquery datepicker code in rails : I can click on an edit button and select a date using the text_field_tag for each form. However, when I try to submit that datepicker value it only gets submitted for the first form (for the fi
Nikhil Gupta
jquery jquery-ui jquery-ui-datepicker
I have added masking to jquery datepicker & added validation.here is the jsfiddle & Code<input class=”datepicker” type=”text” /> <br /><br /> <input type=”button” style=”width:50px;” />$( “.datepicker” ).datepicker({ dateFormat: ‘dd-M-yy’}); $(“.datepicker”).mask(“99-aaa-9999”);$(“.datepicker”).blur(function(){ var date1 = $(this).val(); var validate = IsValidDate(date1);if(!validate ){alert(“Invalid Date formart, Required Date Format : dd-mmm-yyyy”);$(this).val(“
Charles
jquery zend-framework zend-form jquery-ui-datepicker
I have a Zend form, for which I have enabled jQuery components via:ZendX_JQuery::enableForm($this);and then added several non-jQuery elements, and one jQuery DatePicker, defined as:$testing = new ZendX_JQuery_Form_Element_DatePicker(‘dp1’, array(‘jQueryParams’ => array(‘dateFormat’ => ‘yy-mm-dd’))); $testing->setLabel(‘Date of Birth 2’)->setRequired(true)->addValidator(‘NotEmpty’);I then set up the Decorators as follows (first for all the elements, and then replaced the Decorator
mattytommo
javascript jquery html jquery-ui-datepicker
In many cases, I use jQuery’s awesome datepicker in forms. I wanted a generic way to apply it without knowing what the id or class of the input would be. I came up with this:<span id=”datePickerChild”><input type=”text”/> </span> <script type=”text/javascript”>$(document.getElementById(“datePickerChild”).firstChild).datepicker(); </script>Using the mvc3 framework these inputs get put in with their own ids and such at runtime based on the helpers so I wanted this dyn
Robert
jquery jquery-ui-datepicker
I’m loading content via an AJAX call into a table row added to the DOM on the fly. I’m calling the datepicker functionality in my callback function and the calendar shows fine. However, when I click on the date, I get an error: inst is null. Here’s my code:$(document).ready(function() {$(“.edit”).live(“click”, function() {//Delete previously loaded edit row$(“#tempEditRow”).remove();//Get the record id of the row to be editedvar recordID = $(this).parent(“td”).parent(“tr”).attr(“id”);//Add the n
Matt Johnson
javascript asp.net-mvc-3 datepicker jquery-ui-datepicker datejs
I just dont get it why i get this Microsoft JScript runtime error: Out of stack space in my date.js file….return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case”hh”:return p(self.getHours()<13?self.getHours():(self.getHours()-12));case”h”:return self.getHours()<13?self.getHours():(self.getHours()-12);case”HH”:return p(self.getHours());case”H”:return self.getHours();case”mm”:return p(self.getMinutes());case”m”:return self.get
Ryan Naddy
javascript jquery jquery-ui jquery-ui-datepicker
I have this jsFiddle: http://jsfiddle.net/VebTY/It looks this this is only an issue in chrome.When you click on a an item in the page, it adds a text field, and then a date picker pops up. When you click out of the text box then back into the text box the browser hangs for 5 – 10 seconds. Why is it doing that and how can I fix it?Here is my relevant code:$(document).on(“focus”, “td input[type=text]”, function(e) {e.stopPropagation();if ($(this).closest(“td”).attr(“data-type”) === “date”) {var dt
Enrique Ramírez Vélez
jquery jquery-ui jquery-ui-datepicker
Fairly straight question:If I have an inline datepicker (call .datepicker() on a div instead of an input) and use the beforeShowDay function, everything breaks.I’ve created a jsFiddle here so you can test it: http://jsfiddle.net/MBwSe/1/The beforeShowDay function works for the first 4 days to me (jul 29 to aug 01 2012) and then breaks on aug 02 2012 with this error:TypeError: daySettings is undefined [Break On This Error] line 8827var unselectable = (otherMonth && !selectOtherMonths)
Web site is in building