How to add a AJAX Language Dropdown that reloads the current page?
I'm trying to write a language dropdown select into my header of my JQM apps. The language is handled by the server side coding (PHP/SQL); data, stored, etc. The server side part works perfectly, but I can not figure out how to handle the ajax events and the existing bindings on the current page. I'm seeing multiple events firing off after I select the language more than once. I think it's due to the use of the "pagecreate" which I use when loading the page. Here's the index pages 'pagecreate' (trimmed
Upgrade to v1.4.*: Proper use of pagecontainer's change method.
Quick Upgrade Question: Is this the proper change to pagecontainer's change method from $.mobile.navigate()? Old: $.mobile.navigate(self.settings.base_url + response.controller + '/' + response.method); New $(":mobile-pagecontainer").pagecontainer('change', self.settings.base_url + response.controller + '/' + response.method, {allowSamePageTransition: true, showLoadMsg: true, reload: true} );
How to set img width/height inside div of same id
Below is the code from my jsp: <div id="photolib_notfirst"> <img src="/wps/wcm/myconnect/4931f17e-41de-4e09-9639-609c12f7a1d1/Ammonia+Training+class+003+resized.JPG?MOD=AJPERES&CACHEID=4931f17e-41de-4e09-9639-609c12f7a1d1" border="0" width="200" height="200" /> </div> <div id="photolib_notfirst"> </div> <div id="photolib_notfirst"> <img src="/wps/wcm/myconnect/4931f17e-41de-4e09-9639-609c12f7a1d1/Ammonia+Training+class+003+resized.JPG?MOD=AJPERES&CACHEID=4931f17e-41de-4e09-9639-609c12f7a1d1"
Changing a dropdown list value makes the value blank
Hi, I'm trying to change a dropdown value depending on a radio button that has been selected. My code didn't work so I brought it back to the absolut basics, which look like this: $(document).ready(function(){ jQuery('#attribute92').val("W"); });My DD looks like this: <select name="super_attribute[92]" id="attribute92" class="required-entry super-attribute-select"> <option value="">D</option><option value="3" price="0">W</option><option value="10" price="0">VW</option></select>It
append image with variable assigned ID(called using ajax)
Solution ------------------------------------------------ dsvick Re: append image with variable assigned ID(called using ajax) 37 minutes ago I assume "album1" is a div or something that holds all the images? This code here $(this).children().attr("id") is getting all of the children of the element that was clicked, then you are asking for the id, it will always return the id of the first child. If that doesn't help you may want to post the actual markup that you're dealing with. Dave ----------------------------------------------
using .live() to select text in a textarea
I am trying to do something really simple, using .live() and I get $(...).live is not a function. What am I doing wrong? $('textarea').live('mouseup', function() { $(this).select(); });
jQuery Multi Select not load option values with ajax
Hi, Values sent by php are not loaded properly in the plugin. Can anyone help me? HTML <div id="controlSoft" class="controls"> <select multiple="multiple" id="my_multi_select1" name="my_multi_select1[]"> <option value="dads"> </option> <option id="softHint"/> </select> </div> PHP <?php $q = intval($_GET['q']); $con = mysqli_connect("127.0.0.1", "root", ""); if (!$con) { die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,"pcd"); $querySoftware="SELECT * FROM software WHERE
neither .post() nor ajax() will work with this code
If I use .click(function .post will access the url. If I use .change(function .post will not work. ajax will not work in either case I am baffled. Can someone explain please. <div id="forms"> <fieldset> <form name="myName" id="myName" > <p>To Search for a Name: Type Partial Name Then Enter: <br> To Display all Names: Type All Then Enter:<br></p> <p> <label for='partName'>Enter Name</label> <input type="text"
Listview widget - Collapsible dividers
JQM 1.4.4 How can I make the dividers on a listview widget collapsible? I see lots of hacks like http://jqmtricks.wordpress.com/2014/05/02/make-listview-dividers-collapsible/ Is that the best way? Is there a more "out of the box" way to do this with markup and JQM features? Thanks
Responsive listview grid - Disable Ajax
I use the responsive grid widget in my app and as I navigate the pages, many times I find that the page displays in a narrow form-factor in spite of being on an iPad. Tapping the Refresh button on the Safari URL bar fixes the issue (changes listview to tiles). I am thinking the media queries that implement the responsive views are getting confused as various pages are getting loaded/unloaded from the DOM. Is there a way to globally disable AJAX so that pages are loaded like on a desktop browser and
viewport size from JQuery
I tried several things using JQuery to get the usable window size, mostly of the $(window).width() and $(window).height() variety, and never found something work in all browsers. Using older JQuery 1.11.1. I finally found a snippet on stackoverflow for a routine they called getViewPortSize() that seemed to work nicely in IE, Chrome, Firefox, and iPad/Safari. It really seemed like something pretty basic JQuery would do. But the $(window).height() kept coming up way small in Firefox 32.0.2. Recommendations?
just reporting two css-lines, where it shoud not be!
Hi guys there are two css lines at forms where it not should be, as tou can see at attachment doc. http://demos.jquerymobile.com/1.4.4/forms/#&ui-state=dialog Just trying to help :D Regards, Eudes Mazo - From Colombia
See if input and span is the same
Hi, I have following html: <span id="results">xxxx</span> <input id="input_here" type="text"name="UserInput"></input> If #results has the same value as input_here I would like to alert a message. If there would be two inputs there wouldnt be any problem. But if results have for example the value 5 and I put in 5 into input_here I want an alert. I have tried to do different if else but can't get it to work. if(parseInt($("#input_here").val()) == $(parseInt("#results").html()) { { $("#used").html("number
Is there a similar plugin but free for interactive maps?
Here is the link, http://codecanyon.net/item/mapplic-custom-interactive-map-jquery-plugin/full_screen_preview/6275001?ref=jqueryrain It is a premium plugin. Any one know of something similar but free? I need the same features - SVG generated map of a country + states(separately clickable) Click state to zoom in... Please let me know.
Drag and Drop weird bug
When I drop an li element from one list to the bottom of another list, the highlight animation doesn't trigger. Only when I drop it to the bottom. However, after the initial drop if I move it after its been dropped slightly, it will trigger the drop effect. What on earth is going on? thanks!
Update a form input value after ajax call
I have an input field on a for that has an initial value set as follows <input id="ZTotalDate" name="ZTotalDate" type="date" class="form-control" value="2014-09-22"> I want to change this value after a ajax call on the change of another field e.g. $('#BU').change(function(){ $('# ZTotalDate ').load('Fetchmaxdate.asp?buid=' + $('#BU').val()); }); but this fails to change anything. I tried $.get('Fetchmaxdate.asp?buid=' + $('#BU').val(), function(data){ $('#ZTotalDate').val(data); }); but for some
removeAttr ('disabled') is not working
$('#imgbtnNew').click(function () $('#imgbtnsave').removeAttr ('disabled'); return false; ) Is not working. Thnks
Validate required dropdown/select inconsistent behavior with input via keyboard vs. mouse
Trying to unobtrusively validate a required dropdown/select. Everything works fine when form is submitted. While user is editing, however, input is validated inconsistently depending on how they do it. Can demo this using the standard jquery demo page (search for "Please select a fruit"): 1) Use your mouse to select a fruit from the list. 2) Tab out of field. Valid value reported. 3) Use your mouse to select the first, default, "Select..." item. Valid value still reported. This is incorrect--the
Validate Email For A Specific Domain
I am trying to get this to work without any success https://forum.jquery.com/topic/validating-multiple-domain-email-addresses-which-a-form If anyone has a working example, I would greatly appreciate any assistance. I can not even begin to describe how many hours I have put into this without success. Any help is appreciated... <script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.js"
Select only text visible on webpage, from DOM parent element
Inside a content script of my work-in-progress Firefox add-on, I have a variable named `element ` containing the reference toward a generic DOM element. This element may contain children or grandchildren, which in turn may contain text nodes visible on the rendered webpage. My goal is to extract all the visible text contained in this DOM `element `. Internet Explorer has the innerText method, which does exactly what I need but, unfortunately, that is not a standard method and does not work/exist
what is @Html.ValidationMessageFor and how can i use it.
Hi Could you please let me know the steps involved i using @Html.ValidationMessageFor and does it do validation on client side or server side. Does it mean it will show the annotation messages we write to the model properties. Please explain each step involved in implementing it. Thank you, Best regards, Joseph.
Problem parsing AJAX response as valid JSON
I'm having a terrible problem try to track down the cause of/solution to this problem. I'm also unable to copy the data here as it's on a different network/system. Thus, any help would be much appreciated even though I understand it might be difficult. Here's the issue: I have a simple sever set up to send me JSON data. Using firefox I can enter the url and get back the JSON result. I can copy/paste that result into Java and parse it into a JSON object no fuss/no muss. Thus I am confident the JSON
Just dont get it
I have the following jquery contact form on my site. As soon as I fill in the form and press submit the form disappears and I get thrown back to my home page. I suspect it is the <div> at the beginning of the code that is throwing me back out. Anyway, the mail never gets delivered. <div class='mainbody'> <?php //If the form is submitted if(isset($_POST['submit'])) { //Check to make sure that the name field is not empty if(trim($_POST['contactname']) == '') { $hasError = true; } else { $name
using jquery to select 3 items from a list?
so I have this list in django <div class="box"> {% for b in list %} <div class="id">{{ b.id }}</div> <div class="image">{{ b.image.url }}</div> <div class="name">{{ b.name }}</div> {% endfor %} </div> // for display of selected items <div class="listbox"> <form action="." method="" class="c"> <div class="item one"> <div class="imgholder"></div> <div class="name"></div> <input id="one" name="one" value"" type="hidden">
AjaxForm beforeSubmit with ajax calls and Alertify plugin
I'm developing a quite complex validation system, where there have to be two ajax calls to validate uniqness and repeatness of some data. To be clear I require presence book, owner and number fileds but except of presence the combination of these files should be unique (this is when a function should return false) and if the cmbination of book and owner is present in db a confirm dialog should be show to make that this combinations can be doubled. Now when the $.get call are complete the functions
Filtering a table on number values
I have the following code I am using to filter some table data... $(".filter").keyup(function() { $("tr:hidden").show(); $("td.gradeName:not(:contains( '" + $("#filter_grade").val() + "'))").parent().hide(); var solidMin = $("#filter_solids").val() - $("#filter_solids_pm").val(); var solidMax = $("#filter_solids").val() + $("#filter_solids_pm").val(); $("td.solids:not(:contains('" + $("#filter_solids").val() + "'))").parent().hide(); }); There are text fields with the IDs filter_grade, filter_solids
Uncaught Error : Function not defined
I am trying to embed scrollbox in my webpage http://svanubhuti.in/core/itad/corbod1.php with include method. . When i load that webpage, each jquery library gets loaded but scrolling effect is not working. When i check it in console, it shows Uncaught error : function not defined Please help. I'm really confused. Source code of embedded file is as follows.. <link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet"> <link href="demo.css"
jQuery return link
I have following GetLink function to return a url to button click which browser go to the link return. I wanted to add jQuery to validate and prompt user to choose to continue or not. Once I added jQuery then it does not go to link, it seems that GetLink function does not return right link to jQuery. The confirm message shows when it validates the result. I think I am missing something here to get link from javascript to jQuery. Your help and information is great appreciated, Regards, iccsi function
how to keep the same height of the header
Hi ! I would like to keep the height of the header in desktop mode and mobile mode. - When I am enlarging the size of my browser, the header image becomes higher. - And when I am reducing the size of my browser, the header image becomes thin.. I prefer this presentation and I would like to keep this small height... Did you get what I said ? lol Thank you very much for your help guys...
Basic loading scripts asynchronously question
When dealing with multiple external javascript script files what is the best practice to loading scripts asynchronously? Is it a good idea to add the async attribute to all the external scripts links?
cycle plugin slideshow serving responsive iamges
I have installed a cycle plugin responsive slideshow with pagers on a web page. Everything works fine as intended on a desktop. However, the images which are optimized for a desktop device take a while to download on a mobile phone. Can the cycle plugin 2 deliver specific images according to the device that is serving. For instance: img-01-small.jpg for mobile img-01-medium.jpg for tablets img-01-large.jpg for desktops
hiding script temporarely
I have contact form problem. The form fails to deliver a message. The source of the problem is two conflicting script libraries. Both libraries are needed for different effects. The fancy box scripts works with the image display mechanism. <script type="text/javascript" src="./fancybox/lib/jquery-1.10.1.min.js"></script> The jquery scripts works with contact form mechanism <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> If I remove the fancy
Customizing the new and prev button and also
hey guys i came across this light weight plugging online and it seems to be good . heres what i created .. Js Fiddle. , going through the documentation it said that you cannot use ur own pagination . but on the examples page here , the slides do have custome a pagination , (i suspect the icons used on the home page is from , font awesome icons Font Awesome) . i would really like to create my own pagination icons and previous , next buttons. Thanks and regards . Gautam .
retrying a post
Could someone provide a quick snippet of code for setting a timeout on a post? I tried using JQuery post but it sometimes just goes away and never comes back. I have retry logic in my app that will survive network blips and retry a data communication but it needs a timeout to work properly. Or if there's a way to just ask JQuery to do the retries, that might be fun too. Thanks.
presistent storage in JQuery
Persistent storage is pretty easy but I had hoped JQuery would provide a handy API for it. I have old code that wraps the two main ways to do it, IE-specific and standards. I found a plug-in but it seemed tricker to use than my old code. Am I missing something? Is there a cute way to do it in JQuery?
tool tip handling
how to control the tooltip over the page after partial postback.
Overlapping posts using infinite scroll + masonry
I have installed the theme "Issue" on my tumblr blog, but infinite scroll + masonry is overlapping all the posts. I've read some threads about it, but nothing seems to work. This is the code: $(function() { $( '#posts' ).masonry({ itemSelector: '.post', columnWidth: 1 }).imagesLoaded(function() { $( this ).masonry( 'reloadItems' ); }); if( Issue.index_page ) { if( Issue.infinite_scroll ) $( '#posts' ).infinitescroll({ navSelector: '#pagination', nextSelector: '#pagination #next', itemSelector: '.post',
Calling function by closing popup
Hello, I make a popup in jQuerymobile with <div data-role="popup" id="pop_'.$row_artikel['ArtikelNr'].'" data-theme="a" data-overlay-theme="b" class="ui-content" style="max-width:340px; padding-bottom:2em;"> <h3>Artikel in den Warenkorb legen?</h3> <p><strong>CD Player</strong></p> <p>Sie können den Artikel später noch aus dem Warenkorb löschen. Die Bestandsprüfung findet es im nächsten Schritt statt.</p> <a href="#" name="artikel_999" class="ui-shadow ui-btn ui-corner-all
Select dynamically appended element
I have a list to which I am creating list items for on the fly in my JQuery script. The problem is, after attaching these elements to the list on the fly I cannot select them. The setup is below, line three never ever works var li = "<li>List Item 1</li>"; $("#mylist").append(li); $("#mylist li:first-child").addClass("bold"); Any idea whats going on here? Thanks.
jQuery slider animate()
hello everyone! here are my code : html : <div id="slider"> <ul class="slides"> <li>slide 1</li> <li>slide 2</li> <li>slide 3</li> <li>slide 4</li> <li>slide 5</li> </ul> </div> css : #slider { width: 500px; height: 300px; overflow: hidden; } .slides { display: block; height: 300px; margin: 0; padding: 0; z-index: 10; } .slides li { list-style: none; float: left; text-align: center; width: 500px; height: 300px; } jquery : $(function()
Next Page