Checking if a remote file exists once detection is realised.
Hi, I have a function that detects internet connection by returning true or false. Using: status=checkConnection(); then returning either True or False from the function. Now if that statement is returned as True so I now know that I have a connection I then want to do something similar to detect the existence of a remote file. So the function would be something like. file_exist=lookForFile(); function lookForFile(){ Ajax call to look for file. If it exists return True otherwise False.
Loading a remote JSON file.
Hi, I am having problems trying to load an external JSON file. I have established the file exists on the server but now want to use it to make a list. This is the JSON file I am using: var employees = [ { "firstName":"John" , "lastName":"Doe" }, { "firstName":"Anna" , "lastName":"Smith" }, { "firstName":"Peter" , "lastName": "Jones" } ];But unsure using JQuery how I access it to return an array. Thanks in advance.
I want to write less and do more while creating sliders, but unfortunately I can't...
With your tagline being "Write less, do more" you really should make it so that sliders use aria values for their min, max and value attributes. There were at least 3 old projects I came across to fix this behavior, yet the stock implementation never even allowed for such. I have to literally create new JS to implement each slider I want to use. It's impractical. So, please, allow us to write less and do more by implementing common basic functionality that everyone expects to have at their disposal.
jQuery Validation on jQuery Autocomplete
I am trying to validate jquery autocomplete to select only from the prepopulated list.I have done this in the autocomplete change event as below : $( "#supcode" ).autocomplete({ source:tags, //To select only from the autocomplete change: function (event, ui) { if (ui.item == null || ui.item == undefined) { $("#supcode").val(""); $("#supcode").attr("disabled",
1.4.0 Collapsible: Icon dissapears when updating header
I have a project in JQM 1.3.2. This project uses a collapsible. For multi language I have to update the header and the content dynamically. In version 1.3.2 this worked: HTML <div id="idCollapsible" data-role="collapsible"> <h3 id="idCollHead">OK!</h3> <p id="idCollCont"></p> </div> JS $('#idCollHead').text('translation'); In 1.4.0 this no longer works. The icon dissapears. I tried a lot to fix this, but without success. Please help!
how to add a new member to group?
Hi this is the fiddle this is not working for small screens so for display please use this link. In the users tab,there are 2 tables.left side are group members and right side are group members. For example,when you clickon del group name then their respective group members will be selected(check boxes will be selected). The member so of del group are 1st row,2nd row and last row.So when you click on the del group button(on the left side) then 1st row,2nd row and 3rd row checkboxes will be selected.Also
panel between page header and footer
Is there a clean way to render a panel between the page header and footer? I'm working on an application that requires the window to be (vertically) split in half and the panel widget seems to be perfect just for that. But panels are always rendered on top of the header or the footer but this gives the user the feeling that the content of the page doesn't really belong to the scope between the header and footer. I made a jsfiddle for people who know how to change behaviour of the panel. http://jsfiddle.net/3cVXu/
$("html").empty() fails in IE.
Hello, this will be my first newbie question on this forum, so go easy.... I was just experimenting with methods to erase all children of <html> and replace it with an entirely new DOM structure. I tried something as basic as this: $("html").empty().html("<head><title>Hi!</title></head><body><h1>Hello World!</h1></body>"); So, this code fails in IE6 and IE8, but it works in the latest version of Chrome. Does that mean this is a bug? What would be a better alternative solution that works for IE
Datepicker Positioning
Using 1.4.2 and ui 1.8. I have an text box datepicker. I want it to display above the text box, and cannot figure out how. I read the docs, searched this forum, read some of the code... This should be easy. In Chrome it appears above. On IE and Firefox it appears below. Any help appreciated. TIA
Gary Seckendorf - Technical problem
I am unable to install jQuery on my system as every time it shows technical error. Can someone help me? Thanks Gary Seckendorf
jQuery infinite scroll problem
Hello! How do I get jQuery Infinite Scroll Helper to return the next page? Right now it's returning the existing one: http://jsfiddle.net/frank_o/63hUp/ As I wasn't sure how to properly emulate pagination in JSFiddle, I've provided a demo Rails app with working pagination that's easy to get up and running: https://github.com/frankie-loves-jesus/proper-infinite-scrolling/ Location of JS: app/assets/javascripts/application.js Location of pagination link: app/views/forem/forums/show.html.erb#L22
1.2.0 and 1.4.0 Compatible ?
I developed my site using jQuery Mobile 1.2.0. I am now starting a new site based on the old site. I tried to use 1.4.0, but things do not format correctly. Are 1.2.0 and 1.4.0 compatible with one another?
Active accordion problem..
I use jQuery accordion, and I want set accordions expanded or collapsed dinamically. I do this: <script type="text/javascript"> $(function() { $( "#_title_${sec_id}_id" ).accordion({ active: ${open}, collapsible: true, heightStyle: "content" }); }); </script> But if ${actived} is true accordions are collapsed, and if ${active} is false they are collapsed again. Is this a bug?? Or is there a solution?? Thank you very much
how to display images based on their ids in dialog box
Hi, i am having online shopping site which has lot of product images. if user click the quick view , the corresponding product image should be display in the dialog box. The following jquery display first image only if user click any one of the images. Each product image has unique id.How to use this id and display the corresponding image according to user click. $(function () { $("#dialog").dialog({ modal:true, autoOpen: false, resizable: false,
Activating tabs not working?
Hi Everyone, I am trying to activate some tabs, that I disable when the webpage comes up. I call three different functions one after the other (I don't know if that is the reason why), but the last function is where I activate the tabs. Here is the when the webpage comes up (its a script), I am disabling all except tab 0: //Dissable all tabs except 0 $( "#Main" ).tabs( { disabled: [1, 2, 3, 4, 5] } ); <-------- This works fine. The following is where I am disabling tab 0 and activating the rest
Tomorrow and next day date
I need some jquery for an arrival and departure date which is tomorrow and the next day which is mm/dd/yyyy. Can anyone help?
How to reload news ticker?
Welcome, I would like to ask you how to solve my problem. I'm using an Alex Fish's script called List Ticker. Working very good. The code placed on my site is: <script type="text/javascript"> $(document).ready(function() { $('#fade').list_ticker({ speed:6000, effect:'fade' }); }); </script>On the <body> section: <ul id="fade"> <li class="teksthosta">Text 1</li> <li class="teksthosta">Tekst 2</li> <li class="teksthosta"> <a href="#"><img
add a listener to activate jQuery Mobile listview after dynamically injecting code
I am having trouble finding the correct event to add a listener to jQuery Mobile listview with filter and custom "autocomplete" code. $('.autocomplete').on("listviewbeforefilter", function (e, data) { will work when unordered list is already on the page <ul class='myclass' data-role='listview' data-inset='true' data-filter='true'> However if I inject the unordered list, it does not work. For greater clarity, try my js fiddle! You will see the first listview works, but those subsequently added, do
getting data from webmethod
Hi; [WebMethod] public static string SendData() { string ssa="example" return ssa; } Html <input type="hidden" id="gin"/> hidden input value need to be return data from webmethod(value=ssa) how to do this with jquery/ajax please help me
Detect if any fields have a specific value on form submission
I'm trying to prevent a form from submitting if any fields on there have a specific value: $('#form-register form').submit(function() { if ($(this).find('*[value="Select Brand"]').length > 0); alert ('Please select an appliance and a brand'); return false; });However I seem to get the alert message every time I try to submit the form, even when no fields have that value. There is a select box that has 'Select Brand' as its default value, however I still get the message even when
Cluetip "delete" my images after ajax update
Hi, I have a problem with a dynamic forum where images are displayed in cluetips. If an images have been shown in a cluetip and the forum is updated by a ajax function is only the new images visible in cluetips. See more here: http://goodbeer.dk/forumtest.php and try to expand a tread by clicking on the magnifier or read my code here: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "> <html> <head> <?php include("../includes/tinymce3.inc"); ?> <link rel="shortcut icon" href="favicon.ico">
Unique advantages about the web app - questions
Does a mobile web app have the greatest advantage in terms of APIs? What favors the web app, if ordinary websites also have access to the same API's and can use them the same way? Can you call a website "mobile web app" simply by inserting jQuery Mobile and data tags, for example by taking a WordPress template and change the head portion and insert data tags in the HTML page? Is a mobile web app the only web application that can be converted to a native app?
Jquery-ui autocomplete is not working properly in IE8
Hello, Jquery ui auto-complete is not working properly in IE8.I'm getting the value when start typing but after select the value,` its not closing drop-down in IE8`.But its working good in Firefox and IE9. Could please help me what is the issue here. $("#ordernumber").autocomplete({ source: function(request, response) { $.ajax({ url: "searchOrder.jsp", type: "POST", dataType: "json", data: { part: request.term,}, success: function
How to use Jquery animate function with links that are styled in a class?
I'm looking for the correct syntax for make this work. The thing is so simple as select different colors for links (link, hover, visited and active) depending of the color theme of the webpage. Let's see: CSS --- .DarkTheme a { color: #66cccc; } .DarkTheme a:visited { color: #66FF99; } .DarkTheme a:hover { color: #AAFFCC; } .DarkTheme a:active { color: #FFFFFF; } ------------------------- JQUERY (I'm using JqueryColor
Send selected value to new page
Hi; I have 2 drop downs, the one under changes based on whats selected on the one on top. I want to send the value of selected city to the function and it reloads a new page in the div. But it doesn;t work and I don't see any errors in Fire Bug. Please guide. Thanks <script type="text/javascript"> function update_suburb_dd() { $.post('page.php/'+city, { city: document.form.city},function(output){$('#suburbs').html(output).show();}); } </script>
Copy text from textarea to file and prompt user to save on desktop
Hello all, Please help me, I am new to jQuery. ToDo : - Copy data from textarea in to a text file (default file name "output.txt") - Prompt user where he want to save Thank you in advance
JQM 1.4 scroll to top on collapsible click bug
Hello everyone, Trying not to fall behind, I recently started to update my website's JQM library from v1.3.0 to v1.4.0-rc.1 So now I have this bug. When a user clicks on a collapsible widget that is placed inside a panel, the page automatically scrolls to top. I would also like to mention that I also use ember-1.1.2.js , handlebars-1.0.0.js , jquery-1.10.2.js in case it matters. Here is some code from the panel: <div id="create-machine-panel" class="side-panel" data-role="panel" data-position="right"
jquery form with upload image
Hi all, how can I create form with this attributes: - name - photo ... so, as you see, I would like to upload a photo and then (before submitting form), that photo should appear and I can edit it to my size. - resize, move it ... I hope you understand me ... this would be very helpfull for me .. thanks a lot
using php in collapsible-setn doesn't work
Is there a specific reason that I can't execute some basic php-code inside a collapsible-set? I have tried it on many ways, but without succes. Is there some kind of basic rule which I don't know of? My code is: DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>jQuery Mobile-webtoepassing</title> <link href="jquery.mobile-1.3.0.min.css" rel="stylesheet" type="text/css"/> <link rel="stylesheet" type="text/css" href="style.css"> <script src="jquery-1.8.3.min.js" type="text/javascript"></script>
autocomplete span
I have a functioning autocomplete <input> control and I am seeing a <span> created with the number of results available. When this <span> tag is created in the markup, upon successful completion, it shifts my <input> control to the right. I would like prefer this be placed above the <input> control. How can I accomplish this?
.animation not working
<script type="text/javascript"> $(function(){ $('.menus').hover( function(){ $(this).animate({ "backgroundColor" : '#CCC'},500); }, function(){ $(this).animate({ "backgroundColor" : '#000'},500); } ); }); </script>
accordion actions
I have this code: <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.2.js"></script> <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script> <style> #accordion-resizer { padding: 10px; width: 350px; height: 500px; } </style> <script> $(function() { $("#accordion").accordion({ heightStyle: "fill" }); }); $(function() { $("#accordion-resizer").resizable({ minHeight: 140, minWidth: 200, resize: function()
Jquery UI tabs question in LifeRay 6.1
Good morning, I am trying to add a tabbed interface to a Web Content Area in LifeRay. However, I'm running into some frustrating problems and as a non-developer I'm not really well equipped to handle them. I'm hoping they are rather simple and someone can give me some quick pointers. Basically I have a page that is now loading into 3 separate content areas on the LifeRay page. I tried adding the source from many of the examples on the page, but they wouldn't load correctly and instead were rendered
Documentation deficiencies 1.4.0
Friends, I am having trouble finding adequate guidance on a couple things: 1) there is reference to deprecating fixed toolbars in favor of "true" persistent toolbars, but not much discussion on how to implement, where to put header/footer, etc. 2) the section on using the pagecontainer to achieve page changes, rather than the .mobile item is also kind of light; the spec given for using the change method gives "to" and "options" as parameters, but the code examples don't demonstrate use of "to" Would
preview images before upload it
hi, i have preview images before upload is works great in jquery see the code ... and in the form i have two different images and add type=file in each images and hide, so meaning that when click on the image it will prompt the upload form, however, when i clicked on first images under (id= "images_1") and replace with other images and see the preview image is works fine, but in second images (id=" images_2") when i clicked to replace images, it does not replace in second images but it replaced first
RC to Final
Hello, If I have the Release Candidate being used, is this the exact same as what was released yesterday? There is nothing (no documentation, post or FAQ) which describes any differences between the RC and the final release - and if people need to reupdate their source.
Create JQuery toggle using hide and show methods
I tried to hide and show a html element using hide() and show() JQueary methods. I wrote a very simple JQueary script for that. Its working but has a problem. its only work corectlly in one loop. after 1st loop its not working what I expected. here is my code ------------------------ <html> <head> <script src="jquery-1.10.2.min.js"></script> <script> $(function(){ $("button").click(function(){ $("#image").hide("slow",function(){ $("button").click(function(){ $("#image").show("slow"); }) }); });
closest(class) needs to be a cookie's name
I'm dynamically assigning tables as data1, data2, data3, yadda yadda. Inside these tables, I need a function that grabs the closest table's class, so I can assign it as the cookie name. So in theory, I should be able to go inside data2, click on this function, get a data2 cookie, and ta dah. I'm hoping the solution to this problem will provide insight to how I can assign the cookie value, but right now, I'm just focusing on the name. How would I grab the closest table's class? I've tried $(this).closest("p").class.val()
UI Tabs with drop down
I'm developing a site where I'm using UI tabs to exchange content. I'm using UI Tabs correctly, but I can't find a jQuery plugin that plays nicely with a drop down menu. I want users to hover over a title button and the tab links are the "Sub Items". Does anyone know something that could do this for me? Also, the divs and the unordered list are generated by PHP database values. Hover over the top button and select an item below it, then the tab content will change
Web page full of different Ajax requests with different refresh intervals
Hi, I've developed a specialised web server. It is capable of serving up a list of different values from attached engineering systems but, at the moment, it needs Ajaxifying and I will be doing the work using jQuery. The idea is that a single web page might contain a few dozen Ajax URLs which are refreshed at potentially different intervals (e.g. anything from 5 to 30 seconds, to be specified by the engineer who composes the web page). As the values are collected, the jQuery will simply drop the
Next Page