jQuery's .ajax not putting indexs in arrays
Hi, I have to send a several arrays as query parameters to a Spring server. The payload I'm trying to send is this: {"activeQuestion":"551","categories":["129","129","128"],"categoryAnswers":["487","489","488"]} Basically, it's an object that contains 1 property that contains a number, and 2 arrays that contain numbers. The problem is that as request parameters, they appear like this (taken from firebug): activeQuestion 551 categories[] 129 categories[] 128 categoryAnswers[] 487 categoryAnswers[]
Help with jquery accordion
Can anyone help me customizing the accordion that i am using?? i've finally gave up. Take a look on that website http://mlbshopgear.com/ i want to customized the accordion in that website. The accordion works fine but i want it to modify say for example when you click a category there and it will dropdown then when i click a menu under a certain category i want it to remain open. how can i achieve it? thank you so much
Range selection in slider
Hi all, I have multiple slider handles, say 4, sh1, sh2, sh3, sh4. These 4 values i get from four text boxes. I want them to be stable, so i used disabled: true. Now my question is how to highlight the range between sh2 and sh3 sliders. I used range: true option, but now only two slide handlers are appearing i want all 4 of them to appear, but the range between sh2 and sh3 should be highlighted, say in different color. How to do this? Following is the code. Here i have taken only 2 slide handler
About accordion's header's background
hello, I have a list of data using accordion, each data in the list contains header and detail. I looked at "ui.accordion.css" and found that I have to do something in this line : .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } I tried to add "background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x" in the css code above and it work. The headers' background are changed. But how can I change some of
Ho to change the selected element in a dropdown
I have a dropdown with following elements <select title='Location'> <option ></option> <option> AAA</option> <option> BBB</option> <option> CCC</option> </select> I want that once i select one element (AAA) from the dropdown and click on a button...it should set the selected element to none...so that i can make my second selection from the dropdown.. Thanks in advance :)
ajax and I.E. 8
Hi All, I'm working on an ajax slide-show. Can anyone tell me why the following code fails in I.E. 8? It works perfectly in Firefox and Safari. Is there a work-around for I.E.8? Is my code incorrect? In I.E., the html elements are created correctly, but their values are left empty. Thanks for any help you can offer! //Jquery Document $(document).ready(function() { autoUpdate(); $('span.notice').ajaxError(function() { $(this).text('Triggered ajaxError
jQuery :selected is returning an array????
Hello, I have a simple combobox : <select id="selwebsiteid"> <option value="0">Select a profile</option> <option value="1">Test 1</option> <option value="0">Test 2</option> </select> and when i do jQuery('#selwebsiteid :selected').text() to get the selected text and it comes back with "Select a profile" appended at the begining of any option i select. Any ideas?
Problem with slideUp/slideDown/css in Firefox
I developed my site using IE 8, and had no problems. However, after incorporating jQuery into my site, I found that it did not work with Firefox . Please tell me what I need to do fix it for FF. Thanks. http://www.totallyshrewd.com Please see the boxes on the right hand side of the page.
accordian how to determine if active
How can I determine if an accordion is active? I allow for multiple accordions to be opened by users and load an iframe with onclick event when user clicks on the div. However, I need to only load the iframe when the accordion is active but don't know how to do this. HTML example: <div id="toggleboxes" onclick="loadIFrame('iframe-${iframe}','${mstrObject.firstChild.objectUrl}');"> In my javascript I want to only set the iframe source when the accordion is active. How can I find out if my accordion
Chaining question.... making life more efficient....
Now, I KNOW there's a better, elegant way to do this, but since I'm about 1 week into Jquery, I don't know it. Help a brother out... $('table thead th:nth-child(4)').attr('align','right'); $('table thead th:nth-child(3)').attr('align','right'); $('table thead th:nth-child(2)').attr('align','right'); $('table thead th:nth-child(1)').attr('align','left');
How to determine if accordion is active?
I am using jquery accordion where multiple accordions can be opened by user. I added onclick event to that adds source to an iframe within that accordion when user clicks on it. However I want to only load the source into the iframe when an accordion is opened...currently I load the source into the iframe even if they close the accordion. Example: <div id="toggleboxes" onclick="loadIFrame('iframe${iframe}','${mstrObject.firstChild.objectUrl}');"> How can I determine if the onclick event on the
Help with hiding the submit button
I have a script that hides the 'submit to cart' button until all the required fields have been filled out. Does anyone have any idea why it won't work in IE7/IE8 but it does work in Firefox? The script: <script type="text/javascript" language="javascript"> function checkform(){ var f = document.forms["myform"].elements; var cansubmit=true; for (var i = 0; i < f.length; i++) { if (f[i].value.length==0) cansubmit=false;} if (cansubmit){document.getElementById('submitbutton').disabled=false; }} </script>
fadeOut followed by window.location redirect IE7 Issue
I'm getting an undesired effect in IE7 that maybe someone has some insight on... I'm fading out pages then redirecting to a new page: $("a").click( function(event){ event.preventDefault(); linkLocation = this.href; $("body").fadeOut(1000, redirectPage); } ); function redirectPage() { window.location = linkLocation; }; Works great in Firefox and IE8, but in IE7 the page fades and then
Moodal Dialog Box form submit - not passing data
First off, please excuse me if this is not the correct forum in which to post this question. If there is a better place, please let me know. I'm attempting to open a moodal box upon a form submit. The box opens fine, but the GET data is not there on the other end. If anyone has any ideas on direction, they would be much appreciated! Thanks. My working theory at this point is that the data isn't being passed correctly because of the way I'm calling the 'submit' event. HTML: <html> <head> <link
document.getElementById().click() gives error in Firefox and Google crome but only working in IE
Hi, i am try to place a dialog window which load after 3 second on page but my current script is working fine on IE but it is not working on Firefox or rest of other browsers but it is also not giving any error in any other browser. can you please guide me how can i fix this problem so that it works on all platforms. thanks here is complete website including script as under: <html> <head> <title>Simple JQuery Modal Window from Queness</title> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
Loading content in ajax way
Hi, my web app will have a main page, and all others pages will be loaded in a div container within this main page using jquery ajax functions. The problem is that this pages has its own scripts and css, and all this seans to disappear after load. There is a tutorial about this ? Can somebody put me in the right way ? Thanks.
jQuery to create items or items customized by jquery ?
Hello ! My question is more a good practices question than a technical one. In fact, I have a server that asks a Database for items. The server returns to the browser the main HTML page with jquery and custom scripts. The main HTML page contains also the items (returned by the database) listed in a javascript var encoded in JSON (var truc = {"items": [{"title":"A",...},{...}]};). There is NO AJAX process, all is given after a single request. 1/ The current behaviour is this one : After start, jquery
Dump large array into dropdown list
Hello all, I'm very new to jQuery and trying to seek a solution for my problem.. I've a large array of nearly 5000 entries and trying to populate those entries into a dropdown list of my webpage. By doing that so, it is taking so much time ( nearly 30 seconds ) and is freezing the page. Is there any way to load such a big array into dropdown in efficient manner... var handles = [ ... around 5000 entries .... ]; function populateHandles(){ objSub = document.getElementById('listBox'); for(x=0; x <
Adding a row to a table
Hi everybody; I know maybe this is basic stuff; but I'm in the middle of something with it. The question is that I need to add a row to an existing table, with four cells and in each cell I need to add different input types, In fact they are: One select, two text inputs [In separates cell] and an anchor in the last cell, except the anchor I need to give to every input an unique iterative id, starting with the last in the table plus one :-) I have this code, but I can't figure it out to create the
incompatibility for IE8
good morning! is there any standard or format for the run. click and animate the jquery in IE8? I have a site http://www.agenciafire.com.br/index3.php the whole system works on all browsers at least in IE8 Paulo Marcus Designer Web
hiding list items
Hello, I would like to display only a certain amount of list items on a page. can someone help me get started? Thanks for any thoughts
results.push is undefined
I'm getting this error when trying to simple traversing. results.push.apply( results, checkSet ); jquery-1.4.2.js (line 2743) I read that it might have something to do with arrays??? Any solution to this?
Altering content of title in head fails..
I'm using jQuery to make ajax calls for content, when I click on a link and pull in the new content, I want the <title> in the <head> to change. I thought that since head and body are both siblings in the DOM I could target the <title> in the same way as a <p> or any other element and write a new value in, using replaceWith() which would then change the text in the tab at the top of the browser but it doesn't seem to work. I even tried adding <title id="title_text"> and targeting #title_text, but
Why does jquery fadeOut not work in the second time?
I have this code: function CodeEasy(function_name) { $("#content").fadeOut(1000); setTimeout(function_name,1000); } function goto(p) { $.post ( 'ajax.php', { action: 'ppage', page:p }, function (data) { $("#content").css("display","none"); $("#content").html(data); $("#content").fadeIn('slow'); } ); } <div id="content"></div> <a href="javascript:CodeEasy('goto(1)');">Click</a>
Select a Link caused by a click event
Hello, i have build a website with google maps. You can find it here: http://geeko16.comze.com/hohen/ Within this website you can search for farmers in Baden-Württemberg Germany. So if you try to use it for debugging just search for "Stuttgart" f.e. My problem is that if i click on a marker displayed in the map the associated pagination tab should be opened. I tried to select the link matching the pagination tabs within the Google Gevent.addListener event like: $('a.'+linkid).html('klick mich');
IE issue with .children()
I'm trying to use the following code to get me the html of a div with the id of accordion and then append the code to another part of the page. ... // set accordion object var accordion = $('#accordion'); // get html for each section var sectionHTML = accordion.children(); ... accordion.append(sectionHTML[i]); ..The "accordion.append(sectionHTML[i]);" html appends correctly in Chrome, FF and Safari but not IE6+. Instead only the container is returned within IE. I realize I can use .html() to get
Class and JQUERY
Hi, sorry for my English, ... Look at this code : ... <p class='example5' id="results<?php echo $row_Rsetaecole['ID']; ?>" onclick="setClass(this,'example5');window.location.href = 'distance_ok.php?id=<?php echo $row_Rsetaecole['ID']; ?>'" onmouseout="setClass(this,'example0')" > </p> <?php } while ($row_Rsetaecole = mysql_fetch_assoc($Rsetaecole)); mysql_data_seek($Rsetaecole, 0); ?> <a class="example5" href="itineraire.php">Iframe</a>The class "example5" call à JQUERY function
[jQuery 1.4.1+] Safari 2. SyntaxError
Safari 2 have syntax error in jquery.js file On line 920: div.attachEvent("onclick", function click() { Who have Safari 2 and same problem, how to solve it? Thanks.
Scale picture (dynamic pic) recieved from XML response & DOM insert
When parsing XML document, i have a <ContactPicture> element , wich i get using: var conPic = $conNode.find("ContactPicture").text(); I use string concatenation inside each().. for example: html+='<li class="withimage"><a href="...'"><span class="picHolder"><img src="data:image/png;base64,'+conPic+'"/></span>....etc and when finished, insert the whole DOM at-once. What i want is, before DOM insertion, to scale all those pictures (conPic) by 57%. I found a nice jQuery plugin: jScale, but it won't
using the .load function with varibles
I cant seem to get this little bit of code working. What i am trying to do is dynamically load the href of a link that is clicked, but this seems to return with nothing. I have left out the opening tags $("a").live("click", function(){ var raw = $(this).attr("href"); var link = "'"+ raw + "'"; alert(link); $('div#result').load(link, function(){ alert('contentLoaded'); }); }); I have a series of checks filed out and they all fire accordingly, but no content
Setting a div position in $(document).ready()?
I have a 'window' that is moveable on this test page: http://www.hindbrain.net/ex11.php I'm trying to use cookies to store the window positions in the mouseup function. That part is working fine. The problem is that I can't figure out how to locate the window to the x,y variables after returning from checkCookie(). I've tried a few things and they are commented out if you look at the javascript. I thought that this would work, but it doesn't: $(".window1")[0].offsetLeft = x; $(".window1")[0].offsetTop
Animating new item...
I am making a ajax chat using jquery, and I am trying to animate messages that are new. $("#submitmsg").click(function(){ var clientmsg = $("#usermsg").val(); $.post("post.php", {text: clientmsg}); $("#usermsg").attr("value", ""); return false; }); function loadLog(){ var oldscrollHeight = $("#chatbox").attr("scrollHeight") - 20; $.ajax({ url: "log.php", cache: false, success: function(html){ $("#chatbox").html(html); var newscrollHeight = $("#chatbox").attr("scrollHeight") - 20; if(newscrollHeight
check attribute value
Hi. I am new to jquery. I have made a function, that should only work if my attribute style on ul is not 0. However I think I am doing it wrong. I want to check the value of style attribute, not the string. $(function () { $('.topTenTwocolumns .topTenTwocolumnsWrap .up').click(function () { $('ul').each(function () { bottom = this.getAttribute('style'); if (bottom !== 'bottom: 0px;') { $(this).parents('.topTenTwocolumnsWrap').children('ul').stop().animate({
jquery for gadget development
I have used the fade in and taggle functionality for image slide show gadget using jquery. It worked correctly in ie but not gadget i can't show any images in gadget. Please provide the solution for solving this. Thanks in advance...
ajaxSubmit rename filename
Hi, I'm trying to use ajaxSubmit to upload a file, however i would like this file to be always uploaded with a specific name. So for instance if a user uploads a file called "foo.png" i want the image to be uploaded with file name "bar.png" I was looking at the beforeSerialize() and beforeSubmit() callbacks, because they seem to be the right place, however i got confused on how to use them. Anyone else that knows how todo such a thing, or if it's even possible todo at all? Arthur
Update from version 1.7.2 to version 1.8
Hi, I have problems updating from version 1.7.2. to version 1.8. I'm using a custom theme - can anybody give me a step-by-step guide how to update without destroying the whole site ? :) I would like to have the button featueres in the new version... THANKS, Mathias
e.target.id
e.target.id returns a blank value on alert, what have i done wrong ? <div id="navbar"> <ul class="top_menu" id="pula"> <li id="home"><a href="#" title="home page"><b>home</b></a></li> <!--<li><a href="" title="our software">software</a></li> <li><a href="" title="work / portfolio">work</a></li> --> <li id="contact"><a href="#" title="Contact"><b>contact</b></a></li> </ul> </div> $(document).ready(function(){
License query
Hi, We are planning to use jquery for our application. The application developed would be used for commercial purposes. We expect about 1-5 developers working to develop the application.Is there any licence that needs to be bought for this? Thanks, Saravana
Text replacement technique
Is there a better way to do this? Basically I am inserting text into a form field, and clearing it if it gets focused, and putting the text back if nothing changes. Everything works, just want to know if it can be done more cleverly. Thanks in advance! function textReplace(selector,text) { $(selector).val(text); $(selector).bind({ focus: function() { if($(this).val() == text) { $(this).val(""); } }, focusout: function() {
Why doesn't $.get() work with a variable containing the URL?
function readPage(keyPage,container) { $(function() { if(container=="registerCont") { //This works //$.get('http://www.site.com/page.php?a=something',function(data) //But this DOESN'T work? $.get(keyPage,function(data) { $("#"+container).html(data); }); } }); }
Next Page