Unreasonable behavior when dealing with variables ouside the callback.
var repeat = 1; function RefreshPage() { $.post("php/getchatmsg.php", function(data) { repeat = 0; }); alert(repeat); } This code will alert the value 1 on the first time the function RefreshPage() is run, but will output 0 on the rest of the calls, furthermore this code: var repeat = 1; function RefreshPage() { while (repeat == 1) { $.post("php/getchatmsg.php", function(data) { repeat = 0; }); } } just makes my browser crash UNLESS
Submit form with one image and show all results on same page without refresh with the help of Ajax,Jquery,php and mysql
please help me friends i want to Submit a form with one image and show all results on same page without refresh just like----- Name:........................... Email:.............................. Image:............................. Date:................................. skill:.................................button for Add more skill submit show result bellow after submit without page refresh....just like--- S.No.----,Image----,Name-------,DOB------------,Email------------------,Skills 1----------,@--------,Nadeem,----10-06-89-------,ha@gmail.com-----,
Photoslider using ken burns plugin?
I'm looking for a free photoslider script with a Ken Burns plugin, or somethings that looks like that. I found the WOW slider, but it is not free for commercial use. Can soemone help me find a free working one?
default date is not getting set
Hi, I am using this code to set the default date of the datepicker to 7 days from today but it's not working and I am getting the datepicker blank. what's wrong with the code please? <script type="text/javascript"> $(function () { $("#dateClosingDate").datepicker({ dateFormat: "dd-mm-yy", numberOfMonths: 2, changeMonth: true, changeYear: true, minDate: +1, maxDate: "+90D", setDate: 1,
Photoswipe <li> images took dinamically from a folder
Sorry for my English, I am a new to jquery mobile and only have basic knowledge about javascript languages in general; I was playing around with a single page website mobile ( I usually use Dreamweaver CS6) and I reached a good result with photoswipe and everything was good since I had just few images. I have added a lot of them so now I would get the images' link dynamically. In short, I want to start from a folder on my ftp and read all images file within it and create the <li> items for each one.
Buttons behavior between PC and Touch devices
Basically I am a web designer and I don't know much about jQuery so I'm a little bit lost. I wrote some jQuery scripts to manage buttons but they don't have the behavior as I would like on PC and on Touch devices. I have two families of buttons to manage. The "images" buttons (swap) and the CSS buttons (background color change). I would like to disable the "hover" effect on Touch devices because it's mismanaged but keep the mouse clicks on Touch devices AND PC. But the drama is there. Here is a model
Does google js api make XHR?
I am trying to deconstruct an autocomplete that someone else wrote who is even more clueless than me. She basically did a cut and paste of an example she found somewhere and it worked. This example uses google apis, so I am trying to find out if google api makes the XHR or what is going on because I want local copies of jquery, ui, etc. Let me show you the code and please if there is a brief explanation as to why it would work but attempting the same with latest versions of jquery, and a theme roller
Team selection
I’m currently using a script/form that has served a purpose for me for some time but I keep thinking back to a vision I had some time ago that I was never able to master. The closest thing I can find to what I want is shown here http://www.dhtmlgoodies.com/scripts/drag-drop-quiz/drag-drop-quiz-d2.html but it’s still not exactly what I’m after (im not looking for a quiz) Basically I am creating a team selection page for my users (there only a handful of them) What I would be doing is list on the right
jQuery Css Selector
Hello, I have a question about jQuery and Css Selectors... My HTML is: <div id="rev_slider_3_1"> <ul style="Something"> <li style="Something"> <div class="slotholder"> <div class="tp-bgimg defaultimg" style="background-color: for example blue"></div> </div> </li> <li style="Something"> <div class="slotholder"> <div class="tp-bgimg defaultimg" style="background-color: for example
jQuery Menu
Hello! I want to know how i can do it that if i press at a link at my navigation (#home) then the div with the id home should be visible at the content. and if i press at another link then the other should be visible and the home should be hidden. how can i do this, im new to jQuery so i have no idea, please help me, thanks
regex expression isn't working in my page
I'm experimenting with jQuery and jQuery validator. They're amazing, and I'm SO close to what I want the page to do. This particular regex isn't working for the "work phone" field: ^\d{3}-\d{3}-\d{4}[\s\w]{0,13} I want a phone number in the form NNN-NNN-NNNN and then the user can add an extension or some other text up to 13 characters long. I've validated the regex in several validators; I can't figure out why it's not working here. The other regexes are working fine. I'd added this to the page
Superfish Menu Plugin - v1.7.4 Problem: TypeError: o is undefined
Hi, Firebug is reporting the error TypeError: o is undefined in the clearTimeout(o.sfTimer) statements in Superfish 1.7.4 highlighted here: over = function () { var $this = $(this), o = getOptions($this); clearTimeout(o.sfTimer); $this.siblings().superfish('hide').end().superfish('show'); }, out = function () { var $this = $(this), o = getOptions($this);
listening to DOM events 4.2 tutorial question
Hello: I"ve been working on the jquery tutorial and have been trying to understand the difference between the following code $(document).ready(function() { $("#tour").click('button', function(){ }); }); $(document).ready(function() { $("#tour").on(‘click’,'button', function(){ }); }); the correct answer is the second bit of code, but I'm not sure why it is more correct than the first. The error message that comes up is as follows: "You'll need to target all 'buttons', so pass that in
Script not working after navigation
Hello, I passed the last days reading through the internet to find a solution... Maybe someone here can help me. The problem: Javascript works only on the first access to the page. If you navigate to another page and then back to the initial first page, the scripts are not working anymore. (Nothing happens) Page A is the page with the scripts. 1. Direct access to page A -->> Script works 2. Change (click link) to page B 3. Go back to page A (click link) 4. -->> Script is not working anymore If the
Is there a workaround to this Autocomplete feature?
Hello Experts, First, hope it is ok to post a link from another source. On the link below: http://harvesthq.github.io/chosen/ we are very much interested the Standard Select part of the <SELECT>...</SELECT> option for two reasons. 1, it allows for autocomplete 2, it is beautifully designed. However, the issue we have run into is that it doesn't work for dynamically populated data. For instance, the code for SELECT box below, uses ajax call to a webservice to populate the buildingId
Can't Set Height Style in Accordion.
Hello there. I'm totally new to this and have made it thus far on sheer luck. I have on my page a FAQ with a query accordion widget. I can't set the height style to content because I don't know where to put it in the code. Would someone please take a look at my code and tell me where I should put it? Thanks a million in advance. Thomas. </ul> <head> <meta charset="utf-8"> <title>jQuery UI Accordion - Sortable</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
"Unexpected call to method or property access " error
Hi, I am pretty new to Jquery. And I got this error with IE 11. I attached the code causing the error, but I didn't see anything wrong since I used like this before. And I tried Chrome which gave no error but no data. Basically, I am using script to get data though web service. And I believe the code on the backend is correct since I can get the data. Please help me out. Thanks <script type="text/javascript"> (function () { PageConfig = { GetPositionDetails: HS.BaseController.PositionUrl
Slider issue
Hey guys, Im having a slider issue. I just simply copied (copy) the code of the slider on jquerymobile.com and paste it in a dreamweaver cs6 html file. But when i do a preview on safari / google chrome, the slider is not showing correctly. The slider works, but the slider shouldn't look like this. I tried different things to solve the problem, but i don't get it. I paste the correctly CDN codes in the head tag. "<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"
getting the contents
iam very new to xml parsing in jquery. i want to accomplish the below task which iam not able to. any help would be greatly appreciatedI have the below xml <svg xmlns="http://www.w3.org/2000/svg" class="no_class"><ellipse class="no_class" id="shape:45822758-f1cf-9985-7294-67dc74ef3a51" style="position: absolute; z-index: 5000;" fill="red" stroke="#000000" stroke-width="1px" cx="419px" cy="98px" rx="18px" ry="25px" val_fillcolor="red" val_strokecolor="#000000" itemtype="ellipse" PageNo="1" UserId="2"
jQuery BBQ Implementation
I'm trying o use jQuery BBQ to load content onto my website without reloading, although i cant seem to get it to work at all. I'm not sure what must be changed in order for the code to work with my HTML. How can i implement the following jQuery BBQ code with my navigation bar? <ul id="navigation-links"> <li><a href="#product-showcase">Product Showcase</a></li> <li><a href="#about-us">About Us</a></li> <li><a href="#about-me">About Me</a></li> </ul> <div id="content-loads-here"></div>
$.getJSON Increase Timeout/Default Timeout
Hey all, I'm trying to figure out how to increase the default timeout setting for the .getJSON method call. We are using .getJSON several places in our code and it would be nice to not have to go back through and replace everything with the more generic .ajax method call. I've found examples on the Internet of increasing the timeout using the .ajax call, but I would prefer to stick with the .getJSON call. Does anyone know how to increase the timeout for that call? Also does anyone know the default
Linking to accordion widget from another page
Hi, I'm using the jQueryUI Accordion Widget on a client site. I need to link to the individual divs in the widget from another page. I've added IDs to each h3. A hash link will take me to the location of the h3, but won't activate the div. Any help with specific code options would be great. This is the accordion widget I'm using: http://jqueryui.com/accordion/ Thanks
single quotes in data break the page
I have a php page that populates a form from data pulled from a postgresql database. Jquery is used to populate the form with the pulled data as below. If any piece if data has a single quote in it, like Jim's the the form is displayed but no data is populated in any field. $(document).ready(function(){ <? $i=0; foreach($keys as $key){ if ($i%2==1){ if($key!="reason" && $key!="parent_deceased" && $key!="to_account"
Feature request: remove undelegated events without removing delegated
off() already supports the opposite of this To remove all delegated events from an element without removing non-delegated events, use the special value "**". How about enabling removal of non-delegated events without removing delegated by passing in null or an empty string as the selector? Here is my use case on page load my modal module attaches triggers using a delegated listener (to allow for lazy loading content into the page without having to worry about attaching new listeners) $('body').on('click.modal',
jQuery autocomplete and event concept
The jquery website gave the autocomplete code I needed, which specifically is autocomplete for a comma separated list of words. But when I use the autocomplete code something does not work. I am building a single page application where divs are being swapped in and out. When I reach this function, I confirmed through chrome dev tools that my array of possible words has been generated after consuming a web service I built. I must be missing something conceptually since I don't see anything wrong.
Trying to have something execute on a particular page, only once
Hi folks, I've seen many others post about similar things, where they have events firing for the number of pages that have been visited, and I've gotten around the problem by unbinding my events prior to binding them, like so. $('td[id^="someElement"]').unbind(); $('td[id^="someElement"]').each(function() { blah blah }); But now I'm trying to have my application cache check for updates when a specific page is visited, and it's behaving the same way
Functions not working in Internet Explorer
Hi! So, I have this page with a dropdown containing a list of states (id #province). When a button (id #buyThis) is clicked, the user is either given an error telling them the state is not allowed or, if it is allowed, a modal pops up with a checkbox they must check (id #age_verification) before proceeding. Everything works perfectly except on internet explorer. Nothing happens when the button is clicked, no modal, no errors...I'm wondering if I have a syntax error in my script. Thanks in advance!
viewport font refresh when resizing
I am using vw as units (also for font units) , it works fine for my needs but not when window resizing how can I refresh all vw units when resizing , maybe a jquery class already exists ? thanks
hide and show button based on selection from the drop box
Hi, I have the select drop box with Add and Remove value. The default is all fields are showing up the page along with the submit button. What i need is when i select Remove from the requestType box, all fields are hidden and only Remove button shows on the page My code didn't do what i want. 1. When i first go the page, the Remove button is hidden which is correct. 2. As soon as I select Add from the requestType field, the Remove button appears which is not correct. 3. When I select
Unable to access POST variables on the server-side
I am trying to access a variable value. Here is my code: <script language="javascript" type="text/javascript"> function UpdateRecord(){ $.ajax({ type: "POST", url: "test.php", data: {name:"EG13291001"}, success: function(response) { alert("Success"); } }); } </script> <input type='button' id='button_id' value='Update' onClick='UpdateRecord()'>Here is my php code(test.php): <?php $num = (isset($_POST['name']) ? $_POST['name'] : "unable to access
panel issue on iphone
Iphone 5 with ios 7 issue is when scrolling a panel the panel disappears suddenly then is no longer able to be re-opened. you can see this if you go to http://view.jquerymobile.com/1.3.2/dist/demos/widgets/panels/ on iphone 5 latest os. thanks in advance.
Updatin list with jquery ajax and jQuery Waypoints infinite scroll
Hello, I have few problems. I try to use http://imakewebthings.com/jquery-waypoints/shortcuts/infinite-scroll/, to load more in my list when i arrive on the end of the list. I do not found better way for that. I have a lot of data. So It works. BUT. When I load from another php. more <li> rows, and they have right classes attributes, but somehow I do not have the usual list look like in normal way wit JQM. I can not figure out why it do not formating it. Another stuff is, that I can not find a logic
Accordion IE11 help
I have inherited website from a previous employee and I am still learning web development. IE 11 came out and broke my accordion on the site. I have tried for days to find the solution but I am having trouble following all the code and understanding which scripts are actually doing the work and maybe failing. the site is jprofleetproducts.com the menu on the left side is what is broke and works in firefiox and chrome not IE 11 but does work in IE10 and below.
Get the value listview
hi! how to get the value listview?
why this code not working?!
Hi, I am using the following to set the text and readonly attribute of textbox when checkbox is clicked but it's not working properly. First when I load the page it works fine.. then I set click the checkbox so it will be readonly and text will change.. then when changing it back to editable it also works but the problem occurs when I change the company name then again click the checkbox to set it to readonly... nothing will work that time.. $("#chkHideCompanyName").click(function () { if ($(this).is(":checked"))
Make a button off with jQuery
Hi,I have a project that I have made a web application that shows some buttons which interact with the client and accordingly to the values of the buttons, it makes changes on the server such as: if you turn on a button on the site, on the server you can see a led on...and so on.What I want to do now is upon a value (that is displayed as well on the site) put the button off and keep it there for secure reasons lets say...the code for the buttons is above "<script>" "$(document).ready(function(){
jquery popup
Hi I'm trying to create a popup where it shows up when the page has loaded. Do you know of a good tutorial that can show me how to do this.
undefined' is not a function (evaluating '$('#pf-article')')
I am trying to hide an element if another one exists $(document).ready(function(){ var pf = $('#pf-box').length; if (pf != 0) { $('#toTop').hide; } }); I get the error : undefined' is not a function (evaluating '$('#pf-article')') and of course there is an element id="pf-box" in my page thanks for helping
Dialog in a gridlist or any list
Hey guys, I am trying to make a web-app that will display a video via a list view. I was going through the demos on jquerymobile.com and came across something that exactly fits what I want. (jquerymobile.com/demos/1.3.0-beta.1/docs/demos/popups/dynamic-popup.html) The problem or problems are that I am code illiterate and depend on examples and utilize them to use for my purpose. I couldn't find the full code to create dynamic popup's. If someone could provide me with some information on how I could
HOw to use localStorage to create an array used to hide certain table rows
I am trying to use localStorage values created on one page to hide table rows on another page based on similar text strings. It is a sharepoint page so the html is very verbose and hard to find the correnct elements. I've set up a fiddle here to the best of my ability http://jsfiddle.net/vhabhsrosed/62Kv5/1/ I have the local storage piece working from the first page but am having trouble using it as an array to indexOf values on the second page to determine which table rows should be hidden. Lots
Next Page