Jquery Mobile autocomplete using remote source
I have an existing autocomplete code for Desktop computer using remote php source. My HTML is <!-- Custom Begin Date Render --> <input type="text" name="firstinput" id="firstInput" size="9" > <!-- Custom End Date Render --> <input type="text" name="secondinput" id="secodenInput" size="9" readonly="readonly" />Javascript var countryValue=$('#country').val(); var stateValue=$('#state').val(); var cityValue=$('#city').val(); $("#firstinput").autocomplete({
jquery Datepicker is not giving desired format for date
Hello, <script> $(document).ready(function() { $(document).on('click', '#enddatepicker', function () { $('#enddatepicker').datepicker({ dateFormat: 'yy-mm-dd' }); $(this).datepicker().datepicker( "show" ); }); }); </script> <input type="text" id="enddatepicker"/> It is giving me date in mm/dd/yy format but my desired format is yy-mm-dd. Regards Deepak Bhatua
Password validation
Why doesn't my password validation work? http://plnkr.co/edit/h60lRLZDEYxXa1TaJoro?p=preview
Jquery animation for data save response
Hi, everyone, hope everyone is fine. My query is, when i submit a form using ajax, after the data saved in database successfully then i want to show 'data saved' text in front of the form and disappear after e few seconds. How can i do that? Like, in this forum, when i publish my question, it shows a div saying, my question published successfully and disappear after few seconds. Thank you.
persist dropdown selected value not working
see below fiddle for my jquery code, let me know what is wrong with it. thanks. https://jsfiddle.net/rh8dqas5/5/
Dropdown created using jquery not opening in Chrome
I have created a dynamic dropdown list using jquery. This dropdown will get bound to kendo grid column based on certain condition. Refer the below code The code works fine when viewed from IE. But the issue occurs in Chrome. The dropdown does not open. Please suggest. CreateDropDown: function (e, grid, defaultvalue) { var field = $("#" + grid).data("kendoGrid").columns[e.index()].field; $("#" + field).hide(); var kendoddl = $("<input id='DDL' />"); e.append(kendoddl); $("#DDL").find('select').append(
Autocomplete with live links
Hi all, new here and new to JQuery, JS... What brought me here is Autocomplete jquery ui post/thread... The html at that link is below. What I was looking for is a similar search tool which allows me to pull working/live Ads-Text-links from some sort of file(s), of which house each affiliate programs ads, Instead of the pre-populated information. My knowledge here is light but I understand html for the most part. I can only assume those Ad-text-links would be within a CSS/text file that I can upload
.controlgroup() doesn't apply correctly
I have a w2ui layout -> jquery-ui accordion in left panel -> generated form with inputs/radios in the content section. When I do .controlgroup() on a jquery div, it doesn't apply correctly. But this happens only If there are several collapsible panels (with content->form->radios) in jquery accorion. If there is only one content panel in accordion, .controlgroup() applies correctly. The in-correctness is in visual appearance of radios. I really don't have much time to dig into source of a problem
Get input value with Jquery and add it to form action before post it
I tried already on stackoverflow - no answer :(. I have unknown many Forms and unknown many different values on my site. Thats why i would send all necessary data over the action and use it with $_GET['up'] . I have an input field wich i would send with my form too (value is given by the user). How can I get this value with jquery and add this to my action ? I tried already like above, but got errors like "Jquery not defined" or "Unexpected token <" ... I´m very bad with jquery, sorry. <form action="/de/site.html/index.php?up='.$sell['Name'].','.$sell['street'].',1,<script>$(\'.'.$a.'months1\').html(months)</script>"
How to move an element one level up?
Assume I have the following HTML source code <div class="foobar" ....>... <picture ...>.... <img ....> ...</img> ....</picture> ...</div> How can I extract the <img> element and move it one level up just before (resp. after) the <picture> element? This procedure should be done for all <img> below the enclosing <div class="foobar"> but not for the <img>s outside. Thank you Peter
removeClass & addClass not working
remove & addClass functions do not work. I am trying trying to make sure that the span class changes to a new one once it is clicked. here's the jquery code: $('.vote_btn').click(function(){ $.ajax({ url:'/joseph/pages/votes.php', type: 'post', //dataType:'json', data:{'comment_id':$(this).data('commentid')}, success: function(data){ if(data == 'up'){ $(this).removeClass('fa-thumbs-o-up').addClass('fa-thumbs-up');
Dynamic <select> - How to deal with?
Hi, I have employee evaluation for and it's populating the data from database and for every element of the evaluation there is a <select> to choose the employee rating. I want to know how can I implement this? I need to show the first question and when the user selects from the dropdown then only it will show the next question until last? How to name the <select>? will all have same name? here is my code: <table data-role="table" id="movie-table" data-mode="reflow" class="ui-body-d ui-shadow table-stripe
On event press Enter button call function
Could someone help me with the following line, it seems to make sense but when I press enter it doesnt call the serviceCall fucntion <div id="buttonSubmit" onclick="serviceCall();" onKeyDown="if(event.keyCode==13) serviceCall();">SUBMIT</div>
datepicker prev and next button icons don't show up
The buttons work and the tooltip shows but the little icons don't show up. I created a stand-alone page with nothing on it other than a datepicker and the icons show up there, so something else on the real page must be messing it up but what?
jquery ajax external url calling and json response problem
i want to get json response from this url:'https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/ajaxGetQuoteJSON.jsp?symbol=tatasteel'using jquery ajax.it gives undefined response and goes error function. but browser debugger shows response and 200 ok status code.
How to multiply 2 columns in html table using jquery
Hi following is my html table <table id="grdtable"> <tr><td>Charge</td><td>start</td><td>End</td><td>No</td><td>Total</td></tr> <tr><td>7</td><td>100</td><td>200</td><td>100</td><td>700</td></tr> <tr><td>8</td><td>10</td><td>100</td><td>90</td><td>720</td></tr> <tr><td>9</td><td>20</td><td>50</td><td>30</td><td>270</td></tr> </table> ts output is as follows Charge start End No Total 7 100 200 100 700 8 10 100 90 720 9
How to Reset form
In my form I have several jqueryui selectmenus and autocomplete and a date picker. How could I reset them all together? I'm not able to figure that out. Could someone please assist? Thank you. $(document).ready(function() { $('#reset').click(function() { }); });
How do I link to external js in this case?
Hi, if anyone can help me out with this, i would be really thankful. Basically, try to call external js that has EncodeSearchTerm function, because the external JS's EncodeSearchTerm function will be changed constantly by someone, so instead of going to change my js EncodeSearchTerm again, is there way to seamless integrate based on external js file? Let say, my JS file is myjs.js, and the external js is othersource.js Following are the myjs.js as an example: $("form.rm-search-form").submit(function(event)
iOS/Phonegap: jQuery Mobile Error loading page
I have been using jQuery Mobile for a few years now for building apps based on Phonegap Build. Since iOS 10 it seems regular linking to sub pages results in "error loading page". What I do is very simpel: index.html => a jQuery call loads the jQuery Mobile listview with: <a href="item.html?id=1"> Next I have that file (item.html) which is linked to in the same directory, so the file does exist. What could this be and why did it stop working? On Android is works fine btw. I have "cordova-plugin-whitelist"
Dealing with spaces in selectmenu options
I'm using a selectmenu to let people pick an item from a long list of options whose values can include spaces. They should be able to start typing a value and have the selectmenu automatically highlight the first matching option. So far so good - that is the standard behaviour. But when typing the name of an option with a space, the space is interpreted as a keyboard interaction to select the currently highlighted option. Consider the standard examples here: https://jqueryui.com/selectmenu/#default
Unexpected behavior from append()
I want to add some elements when a button is pressed, but have strange results: I set up a fiddle here: https://jsfiddle.net/vn65g5ve/3/ 1) Why is it saying add_room() is not defined? This is of course not related to the question per say 2) Why is the text in the inspector coming up as "Price", "type: " etc ? So why the double quotes? This seems to be because a text node was appended, and again not really related to the main issue, which is: 3) Why is the appended code not interpreted as HTML? Seems
Variable and div in place of selector
Dear everyone, I've been using jQuery UI Dialog to setup confirmation messages as follows: $('<p> Are you sure you want to remove user XX from your contact list? </p>').dialog({ But now I need to be able to display the real name of the user instead of "XX". I have this example variable : var name = 'John' ; that I need to insert it in place of "XX". Later on, I will pass variables from my Drupal module, but I need first to know how to insert the variable "name" in place of "XX". Can someone help
Persist all posting or changes
I just got checkbox checked/unchecked persist to work. Then i realized all the events i coded through jquery will have to be persisted as well, like hiding certain table rows by checking checkbox, or options selected through dropdown list, all these info will need to be persist, is there a universal way to persist all the jquery events, or do i need to code separately for each event? do i need any plugin for it? like jquery cookie?
Change radio button style
Hi , I would like to make the radio button check boxes on this page of my site larger and if possible with lime green colored check marks. I think it would look more attractive for the type of site I'm trying to create. I have no idea where to start with this. I would really appreciate some help please. The page: http://10meijin.com/babynames @extends('layouts.bg') @section('content') <div id="middle" class="full_width"> <div class="container clearfix"> <div id="mid_bird"></div>
Code to persist checkbox
I am trying to persist checkbox (when it is clicked, it will show as clicked, vice versa). This is the code i found online but doesn't work. Can you tell what is wrong with it? Or is there better code? var checkboxValues = JSON.parse(localStorage.getItem('checkboxValues')) || {},
$checkboxes = $("input :checkbox");
$checkboxes.on("change", function(){
$checkboxes.each(function(){
checkboxValues[this.id] = this.checked;
});
localStorage.setItem("checkboxValues", JSON.stringify(checkboxValues));
hide table row upon combo selection on two dropdown lists
I tried to hide certain table rows upon selection of certain combo values on dropdown lists. for example, if user choose "combat" in option1 and "skill" in option 2, then certain table row will hide. it doesn't work. see my code in https://jsfiddle.net/rh8dqas5/1/ what should be the correct code?
Sorting an array but only for values above zero?
If I have an array, myArray = new Array(0,1,8,3,4,10,0,0,0); how can I sort it so I have this as result; myArray = new Array(1,8,3,4,10,0,0,0,0); With the '0s' at the end of the array rather than the start. I have tried may ways but keep getting stuck. Thanks in advance;
How to convert html table into a string
Hi, Following is my html code <table id="grdtable" cellspacing="0" style="vertical-align:top; border-collapse:collapse;">
<tr><td>No</td><td>Charge</td><td>Start.</td><td>End.</td><td>No</td><td>Total</td></tr>
<tr><td>1</td><td><asp:Label ID="lb1" runat="server">7</asp:Label></td><td><input type="text" style="width:30px" value=100 runat="server"/></td><td><input type="text" style="width:30px" value=200 " runat="server" /></td><td><input type="text" style="width:30px" value=100
Change Order of Buttons
I want the rotate buttons to be on top of the submit button but when I put the rotate buttons on top and then click to rotate the form submits prematurely. Here is my plunker: http://plnkr.co/edit/C8m9fPgZmzc49snWL1cL?p=preview
jquery append behavior documentation
I'm modifying a Google Apps Script Web App within which I use jQuery, and it generally works fine. Anyway, the code includes this structure, which I continue to use, and works particularly well: $('#searchId').append( $('<h4/>') .attr("id", idVar) .addClass("whatever I want") .text(textVar) I can't figure out what this approach is called, in order to learn it better: when I look up append documentation, I don't find examples of this (specifically, I'm talking about the
Populate one dropdown list based on the selection of other dropdown list using json
Hi, I would like to the same thing as http://jsfiddle.net/kasperfish/r7MN9/3/ using json instead of arrays. With second select menu like this <select id="item"> <option value="1">Mercedes</option> <option value="2">Volvo</option> <option value="3">BMW</option> <option value="4">porche</option> </select>OR <select id="item"> <option value="1">Samsung</option> <option value="2">Nokia</option> <option value="3">Iphone</option> </select> Could anyone help me with that please?
code not working
why does my this code is not running? please help me $('#pmForm').submit(function(){$('input[type=submit]', this).attr('disabled', 'disabled');}); function sendPM ( ) { var pmSubject = $("#pmSubject"); var pmTextArea = $("#pmTextArea"); var sendername = $("#pm_sender_name"); var senderid = $("#pm_sender_id"); var recName = $("#pm_rec_name"); var recID = $("#pm_rec_id"); var pm_wipit = $("#pmWipit"); var url = "php_parsers/private_msg_parse.php"; if (pmSubject.val() == "") {
Issue with testimonials slider
Hi, I have a testimonials carousel at the bottom of my home page that slides in and out of the page - two slides at a time. What I would like to fix with it is when the first two slides are sliding out they disappear too soon, I would like them to not disappear like that and instead just slide out without incident. I've been unable to figure out what the issue is. My site: http://10meijin.com/ <div class="container"> <div class="row"> <div
parse textarea characters
Hi. Please check this site: http://jsfiddle.net/jsfiddleotc/eJzfw/212/ I would like to take the text in textarea and place it into textarea2 upon form submit. But I would like to limit the characters per EACH line to 20 characters into textarea2. I would like to do this where a word however does not split or be cutoff at the end of a line and be continued onto the next line. So for example: Let's say textarea was the quick brown fox jumped over the fence Upon form submit textarea2 would show the
what are the most efficient ways to return a value from a loop?
down votefavorite What are the most efficient ways to return a value from a loop? FlowId in the following example represents a concatenation of region names followed by "Flow". For example, "NortheastSoutheastFlow", "TexasSoutheastFlow", etc. regionNames represents an array of region names stored as a global variable like ['Northeast','Southeast','Texas']. The regionName function param represents a known region name and the goal of the function is return the other region name included in the flow:
get last before value from array
hi all, i am pushing array elements as dynamically i need last before array value every time.. ex: var array=[1,2,3,4,5,6,7,8,9,10] i need 9 if i have 3 var array=[1,2,3] <=== this time i want 2 var array=[1,2] <===this time i want 1 i tried like this array=[1,2,3,4,5,6,7,8,9,10] console.log(array[array.length-1]) it is giving 10 if i put array.length-2 it is giving correctly..but i don't want manual entry..
Issue with animated slider
My animated slider on my home page is not functioning properly for some reason. I've been trying to figure out how to fix this to no avail. Can someone please help me out. Thanks in advance. My site: http://10meijin.com/ <!-- header slider --> <div class="header_slider"> <div class="banner-container"> <div class="banner"> <ul> <li data-transition="fade" data-slotamount="10" data-masterspeed="300">
New to js and jQuery -
Hello all: I think I have a simple problem, but instead of playing guess and test forever, I thought I would ask here. I have a button in my header that I have open the aside. Can't figure out how to get the button background off: See how the reminants of the button are still there? Also, if I wanted to use the alternate color scheme icon, how would I do that? Here is the relevant header code, but if you need to see more I will certainly post the whole thing. <header data-role="header" data-position="fixed"
hover with new tr at runtime
Hi All, I use the "hover" method for highlight the table rows when the mouse is over them. But if I add a new row with "appendTo" or "prependTo" the "hover" method doesn't work. here there is a code: http://liveweave.com/mishUe#&togetherjs=zLETGFbl4v I don't understand the reason because the "length" method return the correct number of table rows. Thank you in advance. D.
Pagination conflicts when having multiple carousels on one page.
I have a question regarding the jQuery Cycle plugin. I have a Wordpress website where i want to use multiple carousels (per post to display my cases) on one page. It works fine, but the pagination (dots) conflict as it is displaying all dots (links) on each pagination in each carousel instead of per pagination per carousel. You can visit the website here: http://heart.fleurglansbeek.nl (scroll down to see the carousels).
Next Page