How to Convert 20-11-2015 to 20-11-2015 12:34:59 in javascript
I want to convert this date to 20-11-2015 12:34:59 for server side we can do like this DateTime expiredate=DateTime.Now; expdate=Convert.ToDateTime(date.Text); but for client side?
Recommended Price Format
I'm looking for a recommended jQuery price format that has support for different countries from Dollar throughout Europe. Any recommendation? Thanks!
preserve object type data to the next session
I try to preserve loaclStorage to the next session but its an jquery object so I use JSON.stringify(object) for that. I get "Uncaught TypeError: Converting circular structure to JSON(…)". Is there any way to overcome it? Regards I. Lesher
jquery 1.7.2 version ok 1.11.3 happen error.
1.7.2 $(this) [<input type="checkbox" class="pc" name="needCompare_1447745538243" id="needCompare_1447745538243" value="1" style="display: none;" checked="checked">] $(this).get(0).checked true $(this).is(':checked') true $(this).attr("checked") "checked" this.checked true $(this).prop("checked") true ok 1.11.3 $(this) [<input type="checkbox" class="pc" name="needCompare_1447751632524" id="needCompare_1447751632524" value="1" checked="checked" style="display: none;">] $(this).get(0).checked
IE9 - FormData undefinted in jquery-1.8.0.min.js
Hi, I am using swagger api for webservices and I get this error: SCRIPT5009: 'FormData' is undefined jquery-1.8.0.min.js, line 2 character 37889 But when I see the code for jquert-1.8.0.min.js, I do not find any formdata variable. How do I fix this error?
getting title atribute value from <th>
how can the title be selected from the below example There is 1 caveat this is a grid with a grid and the <th> can occur multiple time on the page an I would want the <th> of the actual grid the click event occurred <th class='grid-header' title='Name'>
$.mobile.changePage or $.ajax
Hi, I have just started using the JQM and would like to ask should I continue using $.ajax to ajax post my data or it will all be replaced by $.mobile.changePage? and if I have to use $.mobile.changePage then how can I do the beforeSend, success and error? Thanks, Jassim
jquery keyup problem subtotal and total
if i input qty and price, the second subtotal doesn't want to count. it's count, but it same like the first field.
Hide and show depending on media queries
This may be a super.easy solution for you guys but how am I able to set input to always show in greater than 500px width after hiding input in less than 500px width? Edit: Got it http://jsfiddle.net/eLf5688x/2/
Selection of <td> cell
I want to select cell value of first td on row on which click event is performed. My table structure is below: <table id="commission_view"> <tr class="comm_row"> <td><span class="hidemyrow">my value1</span></td> <td>my value2</td> <td>my value3</td> <td>my value4</td> <td>my value5</td> </tr> $('.comm_row').on('click', function() { var hideme=$(this).next('.hidemyrow').text(); alert('text='+hideme); }); }); It shows empty, i also tried with .html() but it still shows
Scroll to bottom when mobile device accses
Hello guys, thanks for some help Quick question, here is demo Please click button on that form will show another div in the right My question is how can when users accsess by mobile can scroll down, already google and got idea about width to detect how big screen but don't know how to applicated it ? Thanks
Two type of JQueries in one app
HI All, Very easy and maybe stupid question. I am trying to use a FB type slide out menu and an accordion style for a mobile app. However I can't seem to get the Accordion style code to work. I think I am missing something very basic when putting the two together. Any help is appreciated. Thanks <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="author" content="www.frebsite.nl" /> <meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes"
Breaking up jQuery Code......
I could swear that I read some where about breaking up the jQuery code so that it doesn't become huge and hard to follow. But I'm having trouble finding it. Can someone point me towards some documentation on doing this?
How to match empty content?
Assume I have the follwing simplyfied HTML code: <td> </td> I want to get rid of it and code therefore: $("td").filter( function(){ return $(this).text().match(/^\s*$/) }).remove(); This works in general but unfortunately also for situation where there is no text but images like in: <td > <img src="images/_banner.jpg" alt="myimage " > </td> How can I modify my jquery statement mentioned above so that the <td>...</td> is kept when an image is inside? Peter
Does an AJAX call send all HTTP headers by default? If not, how to?
Hi, I'm using a server side device detection script to detect whether my users are on mobile/tablet/desktop ( http://mobiledetect.net/ ). Normally this would be called directly by the user from the browser with a normal page load of a PHP file so the mobile detection script can examine the HTTP headers. However I need to call the detection script via a JQuery AJAX call (not sure whether to use GET or POST?) and get a response back. When JQuery makes that call to the PHP script, does it include the
How can the title attribute from a table header in a nested grid be obtained
The example below contains the html for the 2nd Grid (partial view) within the outer Grid. using the click event if (e.target.className = "grid-header") will let me know a click has occurred on a Grid header. 1) How can it be determined if a title has been clicked 2) how can it be determined which titled was clicked to do something different depending on the clicked title <tr> <th class="grid-header" title="genre"> <th class="grid-header" title="concert"> Grid1 First
randomizing link help
Hello, So I have this program I'm trying to create where there is 9 articles (the html tag) and I want 3 random ones to display at anyone time. When you click the link in the article, it should bring up that link in an iframe. A skip button then appears and when you click it, the iframe should disappear and three different random articles should come up. It works fine for the first time you click, but any time after that it just gets more and more messed up. If anyone can look at my code and tell
JQuery selector for Wildcard Charactors
Hi All, I have a requirement to loop ID's using JQuery selector. The ID's are like as below ddlPh1PAC ddlPh2PAC ddlPh3PAC ddlPh4PAC ddlPh5PAC ddlPh6PAC Please let me know the JQuery selector to loop using each function for the above mentioned ID's. Thanks, Ramesh
Accessing HTML content with Jquery and PHP
Hi, I'll try to keep this as simple as possible, and I apologise for my bad english I have a register-page.php file which contains <?php include "includes/functions/Register/Register.php"?> <?php include "includes/header.php"?> <?php include "includes/navbar.php"?> <?php include "includes/registerContainer.php"?> <?php include "includes/hidden.php"?> <?php include "includes/footer.php"?> Note that in the first line Register.php holds my functions. The Display function inside the Register.php: function
XHR failed loading: POST
I am using J-Query Ajax to call a servlet which return a String message. The servlet gets called successfully as I can see some println statements in my console. But after that i get an error XHR failed loading: POST. The code is- $.ajax({ type: "POST", url: "ItemsIDsDelServlet", data: data, success: function (data) { window.alert("done"); }, error: function (data) { window.alert("undone"); } }); variable 'data' here contains
Iterates a string array with each : Syntax error, unrecognized expression (JQuery 2.1.3)
Hi, I'm trying to iterate a simple array of string with something like $(MyArray).each but it gives me the error Syntax error, unrecognized expression. Who knows what I'm doing wrong ? See image below See attached image
link to specific tabs from link on a different page of site
Hello there, I have a set of tabs here: http://thetalbotcuckfield.co.uk/menus/ but I'm having issues linking to s specific tab using a link from another page... http://thetalbotcuckfield.co.uk/menus/#tab-5 on its own doesn't seem to be working. Any solution greatly appreciated. Damien
jQuery Capture Paste Event to Paste the String to a Particular DOM
I saw this solution but I'm not sure if this will work. $("#textareaid").bind("paste", function(e){ // access the clipboard using the api var pastedData = e.originalEvent.clipboardData.getData('text'); alert(pastedData); } ); What I'm trying to do is for example I have this string "Thanks 091215" in my clipboard copied from a different source. How when I hit press CTRL + V or clicked Paste on a particular page "Thanks" will be pasted to an Input Box, and "091215" will be pasted in a Textarea. More
parsing json using jsonparse gives [object, Object]
Hi Everyone trying to learn how to use API data but running into the following problem. I am using: $.each(outputDUPCount, function( key, value){ console.log(key + ": " + value ); }); but my output code gives me: 0: [object Object] jsonParse.js:12 1: [object Object] jsonParse.js:12 2: [object Object] jsonParse.js:12 3: [object Object] jsonParse.js:12 4: [object Object] Can someone tell me how do i parse the actual json object to show me the info
wordpress cycle banner loads very small size sometimes
Hello, in this site http://edson.darkstarmedia.net/ the home page banner sometimes (jquery cycle) loads very small and breaks the page, please see screen shot. how can I guarentee it loads full size (100% of device width, max 1200px) every single time, im almost thinking i need to got back to the days of preloaders Also, it does not respond very well Safari is the worst, but all tested browsers are wonky and inconsistant
wijgrid not defined
Hi All, I have a table in my aspx file and I am trying to populate it using json and an ajax call. This works perfectly in another web project but I get wijgrid not defined when I have copied the same code in a different project. Here is my ajax code :- function GetCICData() { $.ajax({ type: "post" , async: false , url: "CICSequence.aspx/GetCICs" , contentType: "application/json; charset=utf-8" , dataType: "json" , success: function (r) { cicdata = r.d; cicdata = jQuery.parseJSON(cicdata) $( "#grdCICs"
Combine the sourcecode of jquery to the clipcut in javascript
Goal: Copy the data when you press the button for instance if you press button named "a", you should make a copy of the value inside of id="a1" and then you paste the value by right clicking or ctrl + v. Questions: How are you enable to connect with the code from http://jsbin.com/wenuxupayo/edit?html,output to the http://jsbin.com/gobohejone/edit?html,output? Info: *I'm using the http://clipboardjs.com/ in order to make a copy. Thanks!
SPA best practices with adding and removing content
I've developing an MVC SPA site with handlebars. Is it common to remove pages from the DOM when a user navigates to another page, or is it better to just hide the page? All the templates are loaded and cached in single-file. The cache contains all the raw templates. When a template is requested, the element is built and appended to the DOM. From then I can either hide and show the page when navigated to or I can cache the built pages, where I would add and remove the pages from the DOM. I'm
HELP! I NEED TO HAVE IT READY FOR THURSDAY
I have to connect html with jquery. In my html page i have a combobox in which you select a drink, a textbox which you complete with a number, a button called BtnMas. When you click the button the idea is to get the values from the txtbox and the combobox and save them on a variable. After this the cmb and the txtbox are cleared and you can add new values into them, which you will save adding them to the same string we used before.
Tabs from XML display array content
Hi, I'm a bit blocked with my XML content. When I try to display the content of my array in a each loop I cannot get the text. A little help will be welcome http://jsfiddle.net/psylion/eh89p8eL/17/ thanks in advance
Adding my own X to input fields to clear like chrome
Can someone help me with this? http://jsfiddle.net/master412160/ajbzx8tg/8/
how to check if all radio box groups have a selection checked
What i am trying to do is go through a web page and check if all radio groups have a selection made , to complicate matters there are some text fields that I do not need check ...at least not yet I have been fiddling with it over the weekend with no luck http://jsfiddle.net/merrittr/t4akzLL2/4/
Help please.... Javascript (Jquery) -> TypeError: $(...).offset(...) is undefined
I'm from Brazil. My english isn't very good rsrs Error in my console Javascript error in Firefox -> TypeError: $(...).offset(...) is undefined error in Chrome -> Uncaught TypeError: Cannot read property 'top' of undefined This work was not that I did. I just maintenance. Can anyone help me, I'll send the error code excerpt $(document).ready(function(){ $(window).scroll(function() { clearTimeout($.data(this, 'scrollTimer')); $.data(this, 'scrollTimer', setTimeout(function() {
close speedo popup programmatically
Hi, I am using below code to view SpeedPopup and it's working fine. On address.php, I have a button and I want to close the popup when button is clicked using jquery. I tried: var speedoInstance = $(this).speedoPopup(); speedoInstance.hidePopup(); but did not work. How can I do his please? this is how I am viewing the popup. <a href="address.php" class="speedo-popup" data-speedo-options='{"caption": "Delivery Address", "effectIn": "fade", "effectOut": "none", "width": 450, "height": 450, "theme":
files onload
hey guys i'm having a little trouble when it comes to firing a onload function when selecting files on local drive. if i select multiple files to upload it can take a few up to 5 seconds for anything to happen due to how many images i upload and their size. i'm trying to use: this.files.onload = function(){ console.log('started'); }; but i'm not getting any response. ideally i'd like to know when files have loaded and finished...is and how is this possible please? thank
Return a value from a function using getJSON
Hi, I have a json file (detailing file extensions and their mime types) I want to pass a function a file extension e.g. docx, return its associated mime type and to stop further searching through the json file This is what I have so far but I'm getting undefined for mType in my function var fileExt = "docx"; var mimeType = getMimeType(fileExt); function getMimeType(fileExt) { var mType; $.getJSON('json/mimeTypes.json', function(data) { $.each(data,function(key, value) { if(key == fileExt) { mType
Targeting an element by only knowing the ID/Class of an element 2 levels down
Im trying to fire off an event of an element, but I need to target the element by only knowing the ID or class of an element thats 2 levels down. Example: If the DOM src is: <table> <tr /* Target THIS */> <td> <span id="test">Click me</span> </td> </tr> </table> Then I would want to target the <tr> element by only knowing the span#test element.. Heres some stuff i've been trying, obviously none of it works.. Any help would be appreciated! Thanks
receive data from a socket to jquery
Hi, I have a python program that send from server side random numbers to be displayed in an html page : $(document).ready(function(){ //connect to the socket server. var socket = io.connect('http://' + document.domain + ':' + location.port + '/test'); var numbers_received = []; //receive details from server socket.on('newnumber', function(msg) { console.log("Received number" + msg.number); //maintain a list of ten numbers if (numbers_received.length >=
marks calculation
here is fiddle http://jsfiddle.net/8r5s7knf/ i want marks calculation. i have attached image for better understanding
jquery Drag/Sortable and drop list items scrolling issue
Hi, I am facing one issue in the Jquery drag-able functionality. Previously, I have created the dragable functionality with the jquery version v1.3.2. which working as expected. Currently, we have upgraded the Application which have jquery reference to jQuery version v1.8.2. The problem is scrolling/Dragging not working as expected with the jQuery version v1.8.2.. When we drag the record from the list and scrolling it to downward/Upward direction the list is not scrolling automatically. Refer screenshot
Next Page