Why this $.post() does not call the target php function?
I cannot for the life of me see what is wrong with the $.post call. This used to work, so I'm baffled as to what caused it to break. I am trying to use $.post() to pass two parameters, which are used to retrieve some data values in a database call, in the fetchAlleles.php script, then assigns them some id's in the page. When I step through the code using a debugger, however, I am unable to step into that script, and the variable "result" is never defined. If anyone can point out the error, I would
if class changed than do ....
Hello, i need a solution for this: if('#myelement').hasClass('myClass'){ do anything } This would only be checked at the Loading of the page, but the class will be added through javascript. How to solve this? And i can't write a setTimeout because the "do anything" plays a video". I need a solution like "if changed or .live ?! thank you
problem with receipt of custom event
Hello, in Jquery 1.6, I create a new window, and in that window I create a custom event, triggering it when the window closes var evnt = jQuery.Event("previewWindowClose"); jQuery(window).bind("onunload", function() { window.opener.jQuery(document).trigger(evnt, {"layerID":"' + layerID + '"}); }); in the main window, I bind a handler function to the 'previewWindowClose' event. jQuery(document).bind("previewWindowClose", function(evnt, evntData) { alert("handler called");
Reading a JSONP array
Hello there. I have an ASP page witch generates me the following JSON: jQuery182022068346734158695_1349456086955({"pr_codigo":"P111528 ","cr_codigo":"210373","serie":"02","turma":"0101","ma_codigo":"06129","sigla":"ARTE E CUL"}{"pr_codigo":"P111528 ","cr_codigo":"218623","serie":"01","turma":"0101","ma_codigo":"05664","sigla":"DESENHO CO"}); And i have the following JavaScript function that will read those JSONS $.ajax({ url: myJsonUrl, dataType: 'jsonp', success: function(data){ alert("sucess");
adding a javascript array to the post variables
I am catching a submit in jquery, performing a check and submitting the form if the check passes. If the check passes, I would also like attach a javascript array I have created to the post variables that get sent to the PHP page. Here is the code I have so far. All I am missing is attaching the array. $('form').submit(function(e) { var barcodes = new Array(); $('.highlighted').each(function(i, obj) { var barcode = $(':nth-child(2)', $(this)).html();
AJAX
I have been experementing with standard javascript ajax it goes something like this Var U = new xmlhttprequest Send data function { U.open(properties); U.setRequestHeader(properties U.send(data); } When data is recieved (U.readystatefunction) { do something with the data } Oh and the initial creating of the object is replaced with a string of if statements which test the browser for compatability with various alternatives to xmlhttprequest in order to select a compatable one. would i be better
Hello friends! Help please: problem with the tag "select" on a menu
The problem is to choose an option tag "select" without closing the menu. Help please! Job: http://jsfiddle.net/Yrz5c/9/ <div class="presup"> <ul> <li><a href="#">Button-one<span>▼</span></a> <ul> Cont-one <select id="select"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option>
jQuery 1.8.1 | How to get dynamically set li number of ol with corresponding title?
Is there a way to get the li number and title (after clicking on the li) of an ordered list that is set dynamically via ajax or jason? I use this as example for displaying the li in the hard-coded ol: $("#List ol").append('<li><p>' + '<img src="'+thumbnail+'"'/><br />' + '<span class="title">'+imageTitle+'</span></p></li>'); A function dynamically fetches (after selecting an option from a pulldown menu) the thumbnails (fixed amount of 25 thumbs) and displays them (with their titles) in the ol div.
I am trying to prepend an image until something loaded.
I have the following code. My prepend is not working. While my images are loading the ajax-loader.gif spinner is not displaying. Is the code syntax right. $(document).ready(function () { $(loaderImage).prepend("#book").prepend($('<img src="books/images/ajax-loader.gif", style="position:absolute;left:40%;top:50%;z-index:5000"/>').addClass("ShowLoading")); BookID = getParameterByName("bookid"); //Get the query string param that has the book Id CurrentPage = 0;
Attribute Equals Selector only retrieves initial vaues
Hi all. I've just encountered a problem, described here: http://api.jquery.com/attribute-equals-selector/#comment-79799646 Basically, when you use Attribute Equals Selector (although in my case it was actually Attribute Starts With Selector), the selector only retrieves the initial values of the elements, even if the value has changed since loading the page. The author of the comment in JQuery API wrote that this does not happen in IE, but in my case it does (after all, the comment was written 2
Issue regarding checkboxes in IE
I've got an issue where checkboxes generated with jQuery gets the value "on" in stead of the correct value, also described in this question http://stackoverflow.com/q/4071289/927408 on StackOverflow. Anyone familiar with this, or got an idea on how to solve it?
issue with $.post
Hi all, I am getting used to js/jq but i'm having issue with the $.post as when i click the button that has been sent to post the data in the form, it creates a query string in the address bar which only get does this. So why does post do this as well. Any help will be great. Thanks
using setinterval to make my ajax call repeatedly not behaving correctly?
function CheckNewImages() { if ($('#hdnNewImageCheckRequired').val() == "True") { $('#newImagesAlert').show("slide"); var data = '{"caseID": "' + $('#hdnCaseID').val() + '", imageCount: "' + $('#hdnImageCount').val() + '"}'; $.ajax({ type: "POST", url: "<%=GetRoot() %>Teledermatology/loggedin/teledermwhatsnext.aspx/CheckNewImages", data: data,
using load function within <ul> tags
Hi there im trying to use the jQuery news ticker (Found here: http://www.jquerynewsticker.com/ ) to load data from a feed html file using the following code: <ul id="js-news" class="js-hidden"> <div id="news-item"></div> </ul> <script> $("#news-item").load("latest-news2html.html"; }); </script> The reason im doing this is that im working on a website for a friend who needs to be able to edit the ticker content, but the CMS her site is on doesnt recognise the ticker or allow you to make
problem in calling restfulwebservice with jqery and ajax over cross domain
Hi, I have implemented restfulWebservice and deployed in jboss server in abc domain(http://abc.com:8180/restfulweb). when I am using jquery and ajax to access the restful service from different application(which is .net app) and different domain(http://xyz.com:1123/care/hello.html), I am not able to see the result on the page. It is working perfectly in local domain but not in the cross domain. Find the below code is used to call the restful webservice. $.ajax({ type : 'GET',
Simple delay for jFlow help!
I need to add a delay to jFlow, so something else runs one second before it stransitions, and I can't find the way through. Here's a link to the documentaiton for the timer, where I think is the way to go, but I'm affraid it's intended for step animations, rather than what I want. http://www.flowslider.com/for-developers/controllers/timer I'll try preventing the auto-play and setting my own timer in the while, but I'll leave this posted since I suck at managing JS timers and I'm affraid the pause
Help to validate correctly: form with ajax
Hello friends. This form works to email. I need help: when validate display the div "this form has been sent correctly" Example: http://pruebajquery.site50.net/ $("#form1").submit(function(){ if(validateUsername() & validatePassword1() & validatePassword2() & validateEmail()) return true; else return false; }); $(document).ready(function() { $(document).ajaxStart(function() { $('#loading').show(); $('#result').hide(); }).ajaxStop(function() { $('#loading').hide();
jQuery on Desktop Applications
Would it be possible to use jQuery on a desktop app and configure that JS which uses jQuery with a Windows Scheduled Task? Precisely what I am trying to achieve is to have a simple AJAX call to a particular page on my website at scheduled intervals.
Checkbox not an input?
Here is a function: $(document).ready(function () { $("input.commentBox").click(function () { if ($(this).closest('div.editor-field2').children('input:checked').val() == "True") { $(this).closest('div.formQuestion').children('div.hidden').slideDown(800); } else { $(this).closest('div.formQuestion').children('div.hidden').slideUp("fast"); } }); }); It works great if the input item is a radio button,
The script I'm using to redirect my homepage isn't working the way I need it to
I'm using the jquery script below to redirect my tumblr homepage to my latest post. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function() { $.getJSON('http://mydomain.tumblr.com/api/read/json?callback=?', function(result) { window.location.href = result.posts[0].url; }); }); </script> I'm having two problems with it. First, it doesn't redirect instantly, it loads my homepage and then changes
var abc & var $abc
What is the difference between var abc & var $abc ?? Thanks Foysal
Charset Problem
I have a page with a DIV which load other pages. The pages that I load inside the DIV have external JS files. I'm having problems with these files charset to display alert.
Retrieve value from object Object ?
Hi, I would like to know whether it is possible to get the exact value of string from object Object using jquery. I have been able to retrieve the key values of object Object using the following code. function GetKeys(obj){ var keys = []; for(var key in obj){ keys.push(key); } return keys; } Any help is appreciated, Thanks.
Jquery $ajax not working in Non flash browser
Hi all, I have 2 pages the first page have script tag with fusion charts latest javascript supported code.. that page called my a main page..using jquery ajax. The response will come.. If browser have Flash support then its working fine.... But If the browser is non-flash supported browser mean its not working.... its give some script error.. and blank page.. source ---------- $.ajax({ method: "get", url: url_str, dataType: "html", success: function( strHTML ) { $( "#Tab"
dfp ads in jquerymobile site?
Has anyone gotten interstitial or click to expand ads working within a jquerymobile site? They are supposed to be full page ads, but they appear embedded with the page. I have tried placing them above and below all the other html within the body but it makes no difference. Thanks in advance :) Dardoz
How to use .typewrite effect on an onclick event that is already assigned to changing div content.
I have an effect called typewrite that i am applying to any text in div #bubble so i just wrote it like this: $('#bubble').typewrite({'delay': 35}); It works just fine. Now i also have a link with an onclick event to change the content of #bubble as follows: <a href="#" onclick="$('#bubble').html('New content');return false;">Change</a> The problem is the link does not do the typewrite effect when it shows the new content. It shows the new text, but without the effect. How do i apply the effect to
I'm so close! Using jQuery with PHP to generate tables from a dropdown menu!
Hey all, Thanks for stopping in. I have a relatively easily answerable question I think. Here's my test page. I have a large PHP file and am trying to make a drop down menu work to generate table contents by using jQuery to eliminate the "Submit" button. The table is in an iframe. It works the first time but then it gets stuck after that. I've tried unbinding the trigger to no avail and I'm totally stumped at this point. How can I make this work? http://projectrepresentme.com/testpage/ Thanks
using animate with transform
I am trying to get the animate jquery function to work with a transform i started with this code which does work - it animates the border radius from 0-20 in 5 secs ------------------------------------------- <style> #jig{ position:absolute; top:100px; left:100px; height:100px; width:100px; background-color:red; -webkit-transform: rotate(0deg); -webkit-transform-origin: top right; -webkit-border-radius:0px; } </style> <script> $(document).ready(go) function go(){ $("#jig").animate( {"-webkit-border-radius"
Using Struts 1 nested:text tag and having problems....
I recieved Object doesn't support this method....Text below in bold red is where it seems to have an issue //From my jsp... <link rel="stylesheet" type="text/css" media="screen" href="<%= request.getContextPath() %>/LL_S/scripts/datePicker.css"> <script src="<%= request.getContextPath() %>/LL_S/scripts/jquery-1.3.2.js" type="text/javascript" ></script> <script src="<%= request.getContextPath() %>/LL_S/scripts/jquery.datePicker.js" type="text/javascript" ></script> <script type="text/javascript"
Help calling a function defined in loaded page
Hi, I am hoping someone can help me with this as I do not have many alternatives. First, let me explain why I am trying to do what I am doing. I need to convert PDF documents to HTML 5 so they can be displayed on mobile and desktop browsers. I found a program to convert pdf files to HTML 5, but it uses canvas and has scripts embedded on the page to get everything to show up properly. I need to load this created PDF to HTML 5 page into another page using the jQuery.load('PdfPage.html') so I can
Weird behavious in JQuery.ajax()
The code below is part of an autocomplete input created using JQuery UI. But my question here is related to the JQuery-AJAX part only. change: function(event, ui){ $.ajax({ type: "POST", url: "includes/c_t_v_choices.php", data: { filter: ui.item.value }, //dataType: "JSON", }).done(function( msg ) { c_t_v_choices = msg; alert( "Data Saved: " + c_t_v_choices ); $("#c_t_v").autocomplete("option", "source", c_t_v_choices); }); The last line in
Jquery Post's response rendering click events in jsp page on submit. How to stop them
Hello Users, I am using Jquery tabs and populating tab content dynamically. I have a huge form with bunch of user input fields. One of the requirement is i have to dynamically add the controls when the user click add more button ( eg: adding user technical skills/ proficiency level in drop down and adding multiple of the same rows). This one i am doing on click event appending controls to existing div. At entire page level I have save and submit options. When the user click save/submit request goes
if and else
hi guys i have 2 ids ON and OFF, both in html in the moment, and i using css3 for show or ON or OFF, how can i apply jquery for if ON do something else do another thing? if i only using css3? i using exaclty this effect http://dl.dropbox.com/u/391082/checkbox-ios.html
help understanding a return when its inside of a .each method
The following .each() function is inside of another larger function. I am having a hard time knowing if the "return;" below, is even nessessary... $('.something').each(function() { aid = $(this); aid.x(-player.aid.speed, true); var aidposx = aid.x(); if(aidposx < 0) { aid.remove(); return; } }); If the point of "return' is to say "now its ok to remove aid", then how else can I write this? What if return; wasn't there, wouldn't aid.remove(); still execute? Do I really need it?? What is the point
Clearling a List with jQuery Mobile - layout issue
Hello there. I got the simple following function that will populate a DIV element with a list function populate() { var turma = Persistencia.getTurma(); var ct = turma.alunos.length; $("#listaAlunosChamados").remove(); //removes the UL if exists (i tested w/o it) $('#alunosChamados').html('<ul data-role="listview" id="listaAlunosChamados" class="listaAlunosChamados" data-inset="true">'); // creates the UL into the DIV #alunosChamados while(ct--) { // fills the list var aluno = turma.alunos[ct]; if(aluno.presente)
Reload page on deleting cookies
Hi, I wonder how you reload a page, when you manually delete browser cookies using the browsers Ctrl + Shift + Del menu. Something like: $('window').bind('delete_cookie_event', function( e ) { location.reload(); }); I'm have looked on the internet for a solution, but I find nothing but pages on how to delete cookies using JS. Thanks in advance! Chirstophe
AJAX replaceWith using jQuery
I have a page that has two forms on it. Each form is a different way of filtering the results on the page. The first form is a `collection_select`. The second form is a `text_field_tag`. Each submits to the same controller and returns data using `index.js.erb`. Firebug shows that the Ajax call works for both of them and returns the proper results, however, only results that are returned from the `text_field_tag` form actually update the page. It uses the same code in `index.js.erb` to return
Problems getting value from textbox that has been hidden
Edit: Figured it out. Using .val() instead of .text() did the trick! I'm using jQuery in a SharePoint newform. In $(document).ready I hide a column/field (textbox) with the following code: $("input[title='myField']").parent().parent().parent().toggle(); Then, depending on a choice made in a different column/field (dropdown) I run the same code again to show the textbox. Furthermore, I have overridden the PreSaveAction function to do some custom validation. This is where I run into problems. If the
How to insert any html-php page to a #container by clicking a link button
Well here goes: Say I have a home page it needs to be on display in the browser at all time, Even when I want to call in another page. The correct place for the CLICKED-linked page is directed to the MAIN CONTAINER on the home page. I've looked at many examples but none seem to do this. And when I use jquery the page clicked in the menu shows up on a completely new page. It is supposed to show in the Container on the Home Page. Also should my jquery code be inside the body tags or below the
How to multiple select defined elements
$('.class, #id') is the way we normally used to select multiple elements, but if we already defined the variable such as var $a = $('div.a'), $b = $('#b'); Can I bind event on $a and $b at the same time?
Next Page