JQUERY JSON load page into div not working
I am really lost here.....i have written a little function to check if the username/password of a certain user is correct using a json query. If result is ok i want to load a certain page into a div, if the result is error i want to load a different page into a div. Any help / explantion would be really much appreciated Normally i would use $('#test').load("members.php"); to achieve this but it just isnt working (my div has an id of test - members is the page to be loaded. function dologin(){ var
Javascript function not executing because input field is hidden?
Hi, I'm trying to use this credit card validation library (http://jquerycreditcardvalidator.com/ ) and the primary method you call must have this structure: $('#card_number').validateCreditCard(function(result) { }); My form is a javascript multi-step wizard so the "card_number ( <input id="card_number" />) field isn't shown on step 1, it gets shown once the user reaches step 4 so when the page loads the above code doesn't really do anything because
.load() when getting remote content thats dynamically generated
I am using .load() to grab a remote div from an external site, the Jquery successfully locates and loads the remote DIV but not any of its content. I assume that the content of the remote div is dynamically generated/inserted since I get a DIV response without the internal content. So, I assumed that the .load() function waited for DOM READY before actually getting and parsing the remote page, but it seems not. How can I tell my local .load(); to wait for ('document').ready(); on the remote site
Avoid duplicates in array
I'm sure this question has been answered before but the answers I have found don't seem to apply. Insert code: (pretend this is in the code box) var arrayEngineSizes = new Array(); array1.forEach(function(entry) { if (entry.model == y) { var loc = $.inArray(entry.enginesize, arrayEngineSizes); alert(loc); if (loc == -1) // supposedly prevents duplicates, but not really, always says -1 //arrayEngineSizes.push(entry.enginesize); { arrayEngineSizes.push(entry); alert('pushed value containing
code issue
i have calulation code that is working in one file but in another file code is not working is there any solution?
Problem with moving item from select1 to select2
I am trying a new tactic to get a list of medical procedures performed. I am loading select1 with procedure codes and having a person click on add to add to select2. But I cannot get it to work. I followed the code closely but I am sure I am doing something wrong being new to JQuery. Appreciate any and all assistance. In script area: $().ready(function() { $('#add').click(function() { return !$('#select1 option:selected').appendTo('#select2'); }); $('#remove').click(function() { return !$('#select2
Please Help - Event on scroll
Hi, I have a problem to understand how to run my function properly. My function is like this : $(window).on('scroll', function(){ x = 40; while ( x > -1){ do something... x--; } }); My mistake is, event if the while is not finish, if I finish to scroll, my function stop ! But I want the complete execution of my function. So I want it start my fonction when I scroll and finish my function when x = -1. I try to use on('scrollStart'... but I function don't
Using Bootstrap Panels for Navigation
1) I am trying to use bootstrap panels and collapse for navigation. When I select a body item, I want the title of the body item to show up in the panel title. 2) But the first thing I need to figure out is how to change the panel-title content after selecting a panel-body item. As you can see below, I am trying to use the replaceWith() function. But no matter what I try, it doesn't work. I thought about putting a variable in the panel title, setting the variable when the page loads and then
How to disable link entering in textarea?
So I have a contact form on my website. Can I somehow, using jQuery, prevent people from sending links in messages? I've googled it, but haven't found anything for jQuery. Regards to all.
JQUERY dialog with different possible forms.
Hey All, First of all very new to jquery so sorry if this is a stupid question. I have a page which gets data from a database and loads it into a div on my index page. Within this page i have information about a certain user. (Name, Age etcetc) This information is outputted as a button which opens a dialog when clicked upon. Within this dialog i have a form. As things stand everything works perfectly but i have a lot of code because every form has its own dialog function. Is there a way to combine
loop increment incrorrect
the problem i'm having with this loop is when selecting 2 files in the input the files gets read with the read_file function, then when debugging my var id it always shows up as 2. as the id is increasing while in the loop i expect a result of 0, 1 or 1, 2 (maybe) =/ here is my fiddle if someone can please tell me what is happening here. https://jsfiddle.net/7ume34ea/1/ thank you
trigger fade on scrolling section change
hoping that someone can help me out here - i have this code <!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> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <link rel="stylesheet" type="text/css" href="/css/normalize.css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
Auto Populate dropdowns in a <table>
Hi, I have a table tableSearch in a page, rows can be added and deleted by the buttons on each row. the 1st dropdown (ddlType) drives the value of the 2nd dropdown (ddlSearch) on each row. The show and hide of the ddlSearch works fine by referencing $(this).closest('tr').find('.ddlSearch'). However after calling the webservice, populating the dropdown doesn't work (please see the red script below). Is there anything done incorrectly? The script works fine if the dropdown ddlSearchASP is not in the
Problems with navigation and json request
Hello, i have problems with navigation on my html site. I use the bb-bqq.js and jquery. Code Example: In one external javasrcipt file i started the standard json request and use the .push function for the result. the main file called the javascript by clicking button. The result will be pushed in a div and will be show - thats noch problem. i have problem to get back before i started the request by the button. I think the soultion should be easy, because it's a standard way in using mobile sites.
The asp:dropdownlist is not populated
Hi I have the following script which retrieves dropdown values from a web service, it works fine after making the call to the web service as it returns the 1st items if I display the value using "alert". However, it doesn't populate the <as:dropdownlist> ddlSearchASP at all Please see below for the script. Am I missing anything populating the dropdown? Thanks in advance. Your help would be greatly appreciated! <script> $(document).ready(function () { $.ajax({ type:
fullscreen.js transformation animation not working
I have a page made with fullscreen.js ( copied and modified directly from author's site). However the animation technique he describes in this youTube clip doesn't work for me. authors; clip: https://www.youtube.com/watch?v=qiCVPpI9l3M my page so far: http://www.mediaflash.ca/fullPagejsJIM/examples/navigationV.html can't figure it out any suggestions.
swipe up and down on iPad scrolls to exact div position
I need to understand what approach to take to get the up / down swipe events on iPad to function the same as click events that scroll exactly to a div position. If you view the page I've set up and click on one of the green circle buttons on the right it will scroll down or up the page to a absolute positioned div on the page and trigger a function to change the button color. swipping on the iPad will scroll right past any target or marker. I need it to stop at the div scrollTop() position. For
Ajax Reponse 200 ok, but shows failed to load response data
I am making an ajax call to a backend rest api, the api is returning fine. If I console.log() the success data and error data, it gives "resource logged in", 200 ok on the console but when I view it in the network tab response for that auth/login route, it shows "Failed to load the response data". And this happens sometimes only and not always. Why? Here's the snippet of my ajax call. ajax .post('auth/login', { data: { oauth_provider: 'google', oauth_token: (isToken ? authResult : authResult.access_token)
Visualization Chart for Commerical Purpose
I'm looking for a visualization chart (histogram or line chart)with jquery or javascript that can be used for public. This chart will be used for commerical purpose and I wonder if you guys know any website that I can download it? I'm not interrested in using source code from MIT or BSD.
problem with bootstrap datepicker in MVC app
Hi I'm somewhat new to jquery and trying to get familiar with coding it. In my mvc app there is a bootstrap datepicker (not datetimepicker which i couldnt make work) The problem and challenge is this, there are about 50 date fields. They are cast as string within MVC. In some records some fields will have a date already there, most will be blank. If there is already a date, it could be any format, if blank the formatting should be 07/04/1776 and actually if should always get converted down to
is it possible to open js using ajax and return a value from an array without loading the js file to the page?
I have a js file on my server that contains an array. I want to open the file with jquery ajax, and get a value from that array without loading the script to the page. Is that possible ?
alter text() not html()
hey guys i have a scenario like so: <div id="test-value" class="selected-option"><div class="remove"></div></div> $(document).ready(function() { $('#test-value').text('123'); console.log($('#test-value').html()); }); // returns: 123 how it it possible for me to add text to #test-value selector without removing the <div class="remove"></div> already inside? suppose i could do: $('#test-value').text('123<div class="remove"></div> '); but is there a proper way of altering the text but not the
Button Event When Page Goes Out Of Focus
Would like to ease in a dropshadow (or other animation) on a checkout button in a shopping cart as the user loses interest in the window (goes to click another tab or something.) How can this be achieved with jquery?
$.each for geojson
hello, I retrieve data using ajax:I success:function (data) { // {"type":"MultiLineString","coordinates":[[[33.4507,41.4721],[33.4519,41.4727]]]} $.each(data , function (k,v) { console.log(' k '+ k+ ' v '+v + v.coordinates); }); I just want to get "coordinates " with v.coordinates. But console.log(' k '+ k+ ' v '+v + v.coordinates) gives : k 3662989 v {"type":"MultiLineString","coordinates":[[[30.4099,40.7695],[30.4094,40.7697]]]}undefined
Jquery Ajax call returns data but success function not called due to jquery function [jQuery111208562382296659052_1443009765276 function] not called?
Hi EveryOne, var lsUrl= "service api url"; $.ajax({ url: lsUrl, type: "GET", crossDomain: true, dataType: "jsonp", // from the server async: false, contentType: "application/json; charset=utf-8", // to the server ProcessData: true, success: function (success) { }error:function(error){}}); My ajax call function returning json data but success function not called.How can i fix this issue. That service api returns data like jQuery111205524142505601048_1443178060859({"d":"{\"Table\":[{\"column1\":14}]}"});
j
hi all i am new to jquery, and need your support. how to get parent to parent li id, on clicking on anchor tag <li class="jFiler-item" data-jfiler-index="0" id="0"> <div class="jFiler-item-inner"> <div class="jFiler-item-assets jFiler-row"> <ul class="list-inline pull-left"> <li id="rotateRight"> <a onclick="rotateRight();" class="rotateRight">R</a> </li> </ul> </div> </div> </li> <li class="jFiler-item"
How to pass linear-gradient property through CSS
Please find my below code where i am passing the linear-gradient values through CSS in JQuery, i am able to see the colors in chrome and Firefox, but not in IE. I wanted this to work from IE8. $('.leftIpList:eq(' + i + ')').css({ 'background-image': '-ms-linear-gradient(90deg, ' + imgColours[i] + ', ' + imgColoursg[i] + ')' }); $('.leftIpList:eq(' + i + ')').css({ 'background-image': '-webkit-linear-gradient(90deg, ' + imgColours[i] + ', ' + imgColoursg[i] + ')' }); $('.leftIpList:eq('
Having Issue on Wrapping and Unwrapping Un Selected Checkbox
Demo I am trying to wrap each of disabled checkbox elements in a group into a div which enable users to click on the disabled items and be prompted if want to increase the limit or not? As you can see I tried to wrap the checked elements with `.fake-check-wrap` and all not checked in `check-wrap-sapn` dives. This is because the jquery unwrap() will remove all first parent of the checkboxes $("input:checkbox").unwrap("<span class='check-wrap-sapn'></div>"); now I am totally lost here! <div class="container">
css from iframe to parent page
I would like to add css from iframe... i have a file e.g. test.com/test.html and only filled with: <style type="text/css"> .nanana01 {background:#000 !important} </style> then i want the page which has my iframe css change the background e.g. otherpage.com. <html><body> <div class="nanana01"> text 1 text 2 </div> <div class="mypost"> <iframe src="test.com/test.html"></iframe> </div> </body></html> i wonder is there any javascript that apply my css into the parrent page? what should i put in test.com/test.html?
Ajax not returning value back to the calling script
Hello, After 5 days of picking at the code I excepted defeat and come seeking help..lol Working on a user registration form and in it i have 2 dropdown list, one for country and one for state/province. On page load the country dropdown list is loaded and it works. When a user selects a country the state/province dropdown list successfully loaded and this also works. Not working: in the event the user submits the form I like to have the states/province reloaded with the initial selection at the top
Ajax progress bar on upload
Hi, I'm having difficulty in getting the progress of the file being uploaded to be shown. I've searched all over and could swear I'm doing everything right but the only event that seems to be fired is the event.loaded, abort and error. I've checked moziila's page on this and stackoverflow and to no avail. Can anyone let me know where I could be going wrong? thanks $("#uploadSubmitBtn").click(function(){ var formData = new FormData($("#mediaUploadForm")[0]); var usersFiles=$("#uploadBtn")[0].files;
Which type of click handler is preferred?
Using ".click()" and ".on("click") seem to accomplish the same thing: $('#btnStraightforward').click(function() { alert('you mashed the straightforward button'); }); $( "#btnOn" ).on( "click", function() { alert('you mashed the on click button'); }); ...so is there any preference for one over the other? That is, if you're only responding to one event (usch as "click", above)?
SlickNav - root menu not clicking
Hi, can someone helped, I've set up SlickNav and have the following layout; About us - John - Sue - Pete However in responsive mode, the 'About us' button isn't accessible, it just only allows me to drop down making that page ineffective Can anyone help, I need the 'About us' page to be "clickable" as well?
Remove the Icon and its Functionality
Goal: When you have a lower resolution that is lower than 500 in your computer or cellphone I would like to remove the icon picture and its functionality shall not be active. Problem: I don't know how to do it. Info: http://jsfiddle.net/sL3c1v12/14/ Please remember that I would like to change with browser's width using the cursor without refreshing the webpage in order to not display or display the icon and its functionality The source code is from this website http://markgoodyear.com/labs/scrollup/
How to Increase Limit Of Checkbox by Click Event on Disabled Checkboxes
Can you please take a look at this demo and let me know how I can change the limit of checkboxes to 3 and then to no limit every time that user clicks on any of ONLY disabled checkboxes? How can I trigger an event on disabled checkboxes? This doesn't work: $('input:checkbox:disabled').click(function(){ alert("hi"); }); I also tried $("input:checkbox").not(":checked").attr("readonly", true); $("input:checkbox").not(":checked").prop("readonly", true); but now all checkboxes are available to be checked!
Form fields not populated from AJAX unless I include an alert in the code
Hi there. In my code I call a function which first of all displays a form and builds the select drop-down lists with the appropriate options. I then call the following function, passing it a case id. The function: 1. calls another file that uses AJAX to connect to my database and returns a single row of data for the case id specified. 2. checks if the ajax function has completed successfully 3. if successful, it populates the form fields with the json data This form is correctly populated but if
plugin multiple assign problem
hey guys i made my own simple plugin which can be seen here: https://jsfiddle.net/bgc329mL/ when assigning my drop down plugin to selectors I'm unable to get both of them to work $('.mutliple-select-dropdown').drop_down(); // not working $('.dropdown2').drop_down(); // working the colour drop down works as it should be the one above doesn't...i used "this" in plugin also. why isnt both drop downs working and how can i make it so both do please? thank you guys
Run through function one time
function jpPlayClick(){ //Code stuff }; Code I have tried so far: $(document).one("click", '.jp-play', function () { jpPlayClick(); }); I want to run through jpPlayClick() once if the user clicks on it for first time, the current code I have disables all my other clicks on class .jp-play obviously. Best way to do this?
Getting Error 500: Internal Server Error when I tried to called a web method from ajax in an aspx page
Hi, I created an Empty SharePoint 2010 project and with an aspx page. I get the idea/code from the following link except I didn't use web service, but I put all the code in the .cs file. http://aspdotnetcodebook.blogspot.ca/2009/11/cascading-dropdownlist-using-jquery-and.html in the aspx: I have url: "mypage.aspx/GetStates", where mypage.aspx is the name of the aspx page instead of url: "WebService.asmx/GetStates", Also below is top part of my aspx.cs page. And the rest is the same as the example
Unable to change inline css color of TD...
Hi, I have the following piece of code to change the text color of TD inside a TR when a Checkbox is clicked : I've inspected the element and it's the right one but the change doesn't take effect. I don't know what I'm doing wrong and I don't see any error in the console. It's just not doing the job! Any ideas ? $( '.SelectedProducts' ).click( function () { if ($( this ).is( ':checked' )) $( this ).closest( 'tr' ).eq(0).find( 'td.CellStyle.Product' ).eq(0).css( 'color' , 'white' ); else
Next Page