var valArray = data.valarray; // data is coming in correctly from an ajax call $('#selectid).children('option:not(:first)').remove();
// selfld are defined correctly for (var i = 0; i <= valArray.length - 1; i++) { $('#selectid).append('<option value="' + valArray[i][selfld] + '">' + valArray[i][selfld] + '</option>'); }
When I view the select list and click on it, the above code runs inside of an on focus and the new option values are coming in correctly, but the selection list is NOT extended. I have to click again to get the dynamically-generated option list. Is there a way to show the option list right after they are generated ?
I have a number of stacks on a page w/ their respective functions. I need to run my stack before the others, or put another way, pause the others till my stack is finished.
If this is an example of a variable assigned to a function for another stack that I want to pause.
stacks.com_company_product1 = (function() {
... other stack function
});
I tried using $.holdReady() to stop all other functions and then release it, but didn't really work.
Is there a way to pause those stacks, using their variable, and then run them once my stack is done?
I have some forms and inputs that are appended to a span. I'm trying to target the span's id and it has special characters in it '~~' & then get all the appended inputs inside of it (var fileupload).
Not sure if it's the characters or the appending causing the problem. How can I target the inputs?
I'm trying to show a simple preview of a file, once it is selected in a form input. The image that I am trying to write a source to is appended after the page is loaded but before the image is displayed.
I'm trying to get at variables returned from an ajax. Found out that those variables aren't available outside the function, so I wrote those variables to data attributes & then trying to call those later.
function myajaxcall() {
var v = new Array();
$.ajax({
url: "pathto/check.php",
dataType: "json"
}).done (function(check) {
v = check;
console.log('v Inside: ' , v); // Getting correct values, BUT it's running twice, for some reason?
I'm trying to write a string to variable & then write that to a file, but the quotes are coming in as " I've tried several things & not having success.
Currently have this:
var keystring = "$easydb->key="" + usersalt + "";";
Which yields the following string in the file:
$easydb->key="GN86rI4pZ5ggGGjp";
I want it to end up as:
$easydb->key="GN86rI4pZ5ggGGjp";
So how do I write it to get those double quote to actually show in the file?
I'm trying to get jQueryUI Slider w/ two handles working (range). It keeps generating 8 slider handles instead of just two and they aren't being set to the initial values. ON change, I call ValSlider to get the values to update in the input box. I'm using data to pull the required settings into the slider function (I have to share this data w/ other scripts, so using this as easiest way), but I don't see any problems w/ doing that.
The mouse enter console shows, and then reCaptcha exists console shows when clicking & then then the mouse leave shows, but then the reCaptcha exists starts all over again. Would like to stop it once a mouse leave occurs. What needs to be changed??
I have a form that's inside of a lightbox and I am trying to cache any user input to sessionStorage before an orientation change / window.location.reload occurs & then retrieve the sessionStorage key/value pairs & put them back into the form inputs afterwards.
- 1) Caching any input - done
- 2) If the form is in a lightbox & in mobile browser, then I need to trigger a tap on the a link: a[data-rel^="lightcase"] after the window reload
- 3) Write the key/values to inputs - mostly written, but need to get #2 working first
For #2 I tried putting this in doc.ready:
if (lightbox == "true" && sessionStorage.length > 0) {
console.log('SessionStorage detected');
$('a[data-rel^="lightcase"]').trigger("singletap"); // using jQuery Touch Events plugin
}
I'm seeing the console.log but the lightbox doesn't open. Why isn't this working, any thoughts on how to fix?
I noticed when running on a mobile, when selecting a form input, the keyboard opens at bottom, but also the page zooms in. Is there a way to prevent the zooming when selecting an input? Or at least a way to return the zoom to normal when the user clicks the 'Done' button in keyboard?
I've got a form that I'm submitting by ajax, but I guess during the ajax sendoff, I'm getting an error: Can only call Blob.slice on instances of Blob I don't see a console.log immediately after so I assume the ajax is choking?
I create a simple object that contains all the inputs in key/value pairs - shown as the last log entry.
I'm guessing this has something to do w/ file attachments, but I don't know what I've done wrong.