Google Chart Data table Nor working
<script type="text/javascript"> var data = '<%=jSerializer.Serialize(ObjList)%>'; google.load("visualization", "1", { packages: ["corechart"] }); google.setOnLoadCallback(drawChart); function drawChart() { var tabledata =new google.visualization.DataTable(); tabledata.addRows(data.length); tabledata.addColumn('datetime', 'Timestamp'); tabledata.addColumn('number', 'DataValue');
Refresh when loading image
Hello, I have a problem when I have modified an image and asked AJAX to reload it. Below is the code. In a php procedure, I create dynamically a map of a different French area (called "department"). According to values found in a cookie several parameter are retrieved by the procedure. It could be : - department name - map size, - - colors Because the user has no button to trigger the refresh, this is done on an interval time basis. Everything works fine except when the department name
Retrieve and Manipulate with Particular Elements from External Website
I have a question regarding using jquery. I would like to load page from another website (e. g. www.15min.lt), and retrieve only elements which starting "div". Later on, I want manipulate these elements in the next operations of JavaScript+JQuery like calculate how many times a specific word (e. g. "15") is in the code of that website (i. e. www.15min.lt). Than output results in my website. I tried several functions, like .load(), .html(), but haven't got the described result.
How to use jQuery to modify css style of an option element?
Is there a way to modify the CSS style of an option element? One of the option elements are too long and I can't find a way to limit the width from CSS
Cannot append Table Rows to dynamically created Table Rows
Hi, i am looping through a JSON response and creating and table with an image in each row. When the user clicks on this icon, i start another ajax call and get the child results for this row. I see the result in the console when i do a console.log. But i am not able to do an .append on the .closest("tr"). Whats is wrong here? Here is my code: $(document).ready(function () { var url = location.protocol + "//" + location.host + L_Menu_BaseUrl; var JSONService = url + "/_vti_bin/GPExt/GPService.svc";
Help with chat code
Hello I am writing a chat application using XMPP... http://www.arialboundaries.com/chatting signin: mary@blah.im mary You add a user to chat with (alotofmath@gmail.com, which is me), and then chat. I hit a snag; the Javascript I am writing is not registering the enter key; it should work that, if you enter text, and press enter, the message should be recorded in the chat window. $('.chat-input').on('keypress', function (ev) { window.alert("I'm here"); var jid = $(this).parent().data('jid');
how to DRY the function
function addContentFormHelp(baseUrl) { if (!baseUrl) baseUrl="../.." $.each($("[name*='content']").prev(":not(:has(img)):not(div):not(span)"), function (key, elt){ $("<img class='ttc-help' src='/img/help-icon-16.png'/>").appendTo($(elt)).click(function(){requestHelp(this, baseUrl, 'content')}); }); $.each($("[name*='[template]']").prev(":not(:has(img)):not(div)"), function (key, elt){ $("<img class='ttc-help' src='/img/help-icon-16.png'/>").appendTo($(elt)).click(function(){requestHelp(this, baseUrl,
Focus issue Youtube popup
Hi Everybody, I'm building a small application for my son, who - due to his handicap - is incapable of using the computer with a standard mouse. Because of that I'd like to navigate trough the application with the use of the so called MakeyMakey, an Arduino based microcontrolller. (www.makeymakey.com). The idea: Using predefined search queries displayed as images and positioned on top of the page, my son is able to choose and display a maximum of fifty movies related to the predefined query. He
Find children then appendTo
Hi, I'm having an issue with finding the first child of a container then removing it from that container, and appending it to a new container. I have 3 containers with 3 elements, but they all append to the first container. I'm not sure if it's because my entire structure is poorly created, or if I'm misusing ".children". But I was wondering if anyone could give me a hand understanding what I'm doing wrong. In the end each element should shift to the next container. http://jsfiddle.net/mmbVr/ $(document).ready(function()
Any way to know how far a user has scrolled in a div?
I have a div that has a fixed height (and a max-height) and I give it the css attribute: overflow-y:scroll so it has a scrollbar when there is a lot of content. I do have a lot of content, and it would be nice to be able to tell the program, perhaps when the user clicks a button, just how far he has scrolled in the div so far. Is there any way to do this? Thanks
beforeclosing event for browsers in i phone and android
In desktop, beforeunload event is working when I try to close or reload my web page. But It is not detecting when I close the browser in ipod or android phone. Is there any other way to detecting the browser[ chrome,safari,firefox] during closing by clicking the exit button or by swiping the browser on background ?
Removing all listeners on delegated events
I have container with some elements. They have some delegated event listeners. Like this $('body').on('click', '.container .button', function() { ... }); I want to remove all listeners from all elements in the container (whatever event type and selector). Like this $( "body" ).off("*", ".container *"); But it doesn't work. My jsfiddle: jsfiddle.net/KT42n/4 Can anyone help? Thanks for your help in advance.
Work out the difference between two values and displaying result in a textbox
Im trying to work out the difference between two values in a textbox and display the result on a label or textbox as soon as the second number is entered. This is what i tried so far. This is in the <script> element $('#BeginSN').on(function () { var diff = Number($("#EndSN").text()) - Number($("#BeginSN").text()); $('#Form-amount').val(diff); });This is my control <label>Number of Forms to be allocated:</label> <input id="Form-amount" type="number"
Value not coming (showing object).
Hi, i have written a code and want post happen within a loop but the values are not coming i suppose. $("#save").click(function () { var i=1; while(i<=29) { var val_s=$("#slno_"+i); var val_a=$("#album_name_"+i); var val_p=$("#paper_used_"+i); var val_f=$("#finishing_"+i); var val_pr=$("#price_"+i); var val_v=$("#vat_"+i); var val_t=$("#total_amt_"+i); $.post("save_customer_price.php",{val_s:val_s,val_a:val_a,val_p:val_p,val_f:val_f,val_pr:val_pr,val_v:val_v,val_t:val_t}, function(data) { if(data=='Thanks
Columns hide after button click.
Hi, I have a code in which when i click button all my previous data removed automatically, <script> $(document).ready(function() { //$("tr:even").css("background-color","green"); ////$("input:even").css("background-color","green"); ////$("td:even").css("background-color","green"); //$("tr:odd").css("background-color","red"); $("#save").click(function () { var i=1; while(i<=29) { var val_s=$("#slno_"+i); var val_a=$("#album_name_"+i); var val_p=$("#paper_used_"+i); var val_f=$("#finishing_"+i); var
How to take values of html rows using jquery?
Hi, I want to fetch all data of these 29 rows (screenshot attached) out of which 25 rows coming form database and 4 rows for extra use, here is my code please suggest , how i can take these values and send in other page. <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>REGISTRATION FORM</title> <script language="javascript" type="text/javascript" src="js/jquery.min.js"></script> </head> <body > <div> <form id="registration" name="registration"
how to get NaN to number in jQurey?
I am trying this code, but getting the result as NaN. Please give solutions for this. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="Scripts/jquery-1.11.0.min.js " type="text/javascript"></script> <script type="text/javascript">
In Jquery tabs i used sliders
I used jquery tabs, in content section i used sliders in each tab. slider is displaying content for first tab by default, if i click on second tab the slider content is not displaying however if i do inspect element it displays the content and previous slider content is hiding slider which i used is BOX SLIDER responsive http://bxslider.com/ link: http://amrockytechnologies.com/2/ index page code <!DOCTYPE html> <head> <title>Indicated Tabs Tutorial</title> <meta charset="utf-8" /> <!-- stylesheets
How can I append a table row with jquery to the "parent table"?
For example if I have a table with an inner table: <table id="table_1"> <tr> <td><table id="table_2"> <tr> <td></td> </tr> </table></td> </tr> </table> If I use this code: $.get("../php/new_row.php", {id: id}).done(function(data) { $('#table_1 tr:last').after(data); });It applies the new row to the table_2 and not the table_1... And if I apply this code: $.get("../php/new_row.php", {id: id}).done(function(data) { ('#table_1 > tr:last').after(data); }); Nothing happens
how to show negative currency in bracket ?
I have variable which is negative numbers after $ sign (actually it shows currency with currency sign). Please tell me how to show minus currency in brackets with currency sign. I mean to say how to change var val=($125,220,328.00) if this is $-$125,220,328.00 My code is looks like this function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx,
Problem using append in audioplayer
Hi everybody! I'm trying to put sources in a audio playlist with append() but doesen't work. I can put the audios, but then the script of audioplayer not affect them Script to add songs to the track div <script> $( document ).ready(function() { $("#addsong").click(function(){ $("#tracks").append("<li><a href='Kalimba.mp3'>Ravel Bolero</a></li>"); $("#tracks").height(); }); }); </script> Audio player <audio id="audio" tabindex="0" controls="" type="audio/mpeg"> <source type="audio/mp3" src="">
how to change menu color according to scroll
I developed one page website, onscroll menu items also should change according to scroll
Delegation with * selector
I had an odd situation in jQuery Mobile (but JQM is incidental, so posting here). I bound to a vmousedown event on a page. The purpose is to dismiss any menu shown when the user touches any part of the page. I also have my own "fast button" implementation that uses jQuery Mobile vclick event. It delegates vmousedown, vmouseup, vclick and click to the page. From the latter, I call event.stopPropagation(); The problem is, this prevents the bound vmousedown from being triggered. It's not absolutely
[jQuery] Thickbox 3 disabling input boxes in Internet Explorer
Hello, this is happening in both IE6 and IE7: after opening a thickbox with some input boxes, writing something on any of them and closing it, input boxes are disabled on the whole page. If I open the thickbox again I can't write in the input boxes. If I have input boxes outside the thickbox, on the parent page, I can't write on them. I've noticed I can press the Tab key to get out of the problem and I was wondering if there's some way that jQuery could simulate this so the input boxes are 'unstuck'.
How to run javascript functions after replacing code
Hi, I need to add several times a chunk of code that's hidden after being changed. I created some functions to hide part of the code, remove it all and sort those chunks, combining Connect lists with tabs with Hide and Accordion. Initailly that function was working but when i added the part to replace existing code with the chunks that i want to show, that function stop working. The code that repalce the exixting one is this: var template = '<ul id="sortable-' + j + '" class="connectedSortable ui-helper-reset"
Popup window Problem
Hi, I have a Scenario.: If I Open a Page twice in diffrent tabs. The page have 'Add Item' button. When clicks, It will open a popup window. Which adds Items from Popup window to respective Parent Windows. But when I open same url twice and click on Add Item button on respective pages, Items are getting added only in first window. and not in second window. Thanks and Regars, Gauri Rane
how to add two numbers in jQuery ?
can somebody help me in this , i want use two two text boxes . i will enter values in each. i will have a button control to add those values . when i click on add button the resultant value should be displayed in the third text box. Thanks in advance !
how to make this regex insensitive
I have been working with regex lately and this following code filters out 2 words perfectly but I can seem to make it case-insensitive [RegularExpression("^((?!(Stupid|www)).)*$", ErrorMessage = "Invalid character")]That above filters out 2 words but if a user writes Www then it gets pass the regex, how can I correct that I have heard that maybe ?i will work but do not know where to put it in there; i'm new to this any help would be great.
i want to stop this floating sidebar when it reaches header and footer....it must floats only in between header and footer but should not override it
i tried like this...pls see this fiddle http://jsfiddle.net/ENFWJ/1/
event handled removed and replaced with Jquery.event.dispatch but how to use?
Hello, I use used the undocumented and actually pretty awesome e.handled to temporarily fix the problem of an event over-firing. The jQuery migrate plug-in just asks if $.event.dispatch exists, then give a warning. Great. But how does event.dispatch work, there doesn't seem to be any documentation it. Is there any polyfill or shim to replace just that one piece without having to use the entire migrate plugin?
reverse counter
How to write reverse counter code. i want my number count 100 to 0 (reverse count) Code: $({countNum: $('#counter').text()}).animate({countNum: 10}, { duration: 10000, easing:'linear', step: function() { $('#counter').text(Math.floor(this.countNum)); }, complete: function() { window.location = "http://www.google.com"; } }); Thanks in advance
How to remove or hide added rows in an HTML Table?
Hi, i aked before how to insert dynamically HTML Table Rows under the current row. This works now. But now the next question: How can i hide or toggle these newely created rows on image klick? regards Yavuz
Can use append but not prepend in a table td
I try to use the prepend method in a td but I encounter problems My example is a visible window in a carrousel of thumbails I want to shift one position left or one position right. In the first case it works shiftLeft : function(){ var lastNum = parseInt($(".navigation").children(":last").attr("alt")); var nextNum =lastNum+1; if(nextNum>this.nbSlide){ nextNum=1; } //remove the first thumbail $(".navigation").children(":first").remove(); //introduce a new thumbail at end console.log("introduce "+nextNum);
How can I clear/delete a variable?
How can I clear/delete a variable in Jquery?
Cannot Figure this out this jquery function
$(document).ready(function () { for (var i=1;i <29; i++) { $('.box').append(i+""); } }); its overlapping and trying to fit 1-28 inside one of my 28 boxes on every box why? Help appreciated im new to jquery.
detect a word from a sentence
hello, how I can do with jquery to make the words of a sentence detectable in mouseOver and launch an event with a click like in the translation of google translate.
Submitting data to php via json
Hi guys , I have been trying for days to get an answers , here is my problem I have a link : <a href="cart.php?id=2&rid=2&db=user" id="foobar"><img src="story.png"></a> I want to submit this link to a php page which will process the page . Below is the javascript that I am having a problem with : $(".foobar").click(function () { $.ajax({ type:'GET', url:'cart.php', success:function(data) { if(data=="Something")
Rewriting existing slidetoggle?
Hi, I´ve got this function, but it didnt worked well for me: http://jsfiddle.net/DvG6H/21/ How can i rewrite the function, that when I click on a "level_1" "li", the "level_2" nav gets "visablity:visible", the div with the id "nav" gets the height of the child "level_2" ul and slides down. When I click on another "level_1" li, the div "nav" goes up again and the child "level_2" ul gets "visabilty:hidden" again. I tried it like that, but didnt work: var $topLevelItems = $("nav > li > a"); $topLevelItems.click(function(event)
Stop Sending Browser To Top When Auto Change Of Div
When running the following jQuery code on my website, if your browser is not at the top of the page then, every time one div fades out and the next one fades in, it will send the browser back to the top of the page. What code do you need to insert to stop it doing this. I have tried 'return false' in most places but it either stops the script working or shows all the divs at once. $(document).ready(function slideShow () { var $divs = $("[id^=noticeboard]").hide(), current = 0; $divs.eq(0).show();
Pop up and pop in like gmail chat
My need is as follows I have 4 different page I am including the 4 page in one html using jquery.load() I want to popup any of this window or all some time(means I want those in different page) consider as I am doing marketing analysis and I am having 4 display machine, one page will contain data one will contain chart, another will have data etc... I want to pop out the data and put it in one screen and pop out the chart and put it in another screen. I have did some work around and facing some problem,
Next Page