Adding and updating multiple tables from within one form?
Hi, I am new here and more or less new to jquery & Ajax but I'm fairly adept with MySQL and more. Before I begin I'm trying to find a good direction to follow as I will be learning on the fly. I basically want to be able to enter a bunch of info about an item(building) and submit it from one page. This building will contain some basic info where there is only one value for each item, so one table will be fine for this part, but it will also contain info for items that have multiple values - this
Reloading/refreshing a div..
Hi, how to reload/refresh a div with the same content on button click, I used location.reload(), but it refreshes the entire div.., I want to only refresh/reload the div... I also tried using $('#refresh').html( 'content for the div' );, but it replaces the original content of the with 'content for the div', I want the original content of the div to be refreshed and not replaced. looking forward for a reply...
$.unique not giving unique results in chrome
I have the following function that parses a text file and is supposed to return unique results. It works in IE and Firefox, but not quite in chrome. Also I thought unique sorted values, and I assumed this would be an alphabetical sort. I get different sort orders in in all three browsers, and none is alphabetical. Any insight would be appreciated. var getDb = function(select){ //get database names from inputQueryExamples $.get('inputQueryExamples.txt', function(data){ var string = data; var dbDynamo
Object Oriented After Page Load
I'm trying to write object oriented so : $(function(){ Obj.IntervalTime(); }); var Obj = { Features : { Length : $("#NAV").children().length }, IntervalTime : function(){ alert(Obj.Features.Length); }, }; <ul id = "NAV"> <li> 1 </li> <li> 2 </li> <li> 3 </li> </ul> code should alert 3 but alert 0 Why? Thanks All
Trying to figure out best solution for being able to resize the x axis on a table with a mouse
I am trying to find a way to be able to make a table in a website and be able to drag the cells open and closed closed to no wider than 100px. I can't seem to find any plugin to do this. I want it to behave like the resize functionality in Jquery UI but only on the x axis. Does anyone know of a plugin that can do this for me or a solution I can try out? I also contemplated using divs but I need to have something with multiple cells so I wasn't sure if using divs would be more complicated or not.
Export to CSV is displaying content in browser itself in Safari
I am using the below code to export to csv:- window.open(data::application/csv;charset=utf-8," + encodeURIComponent(data), '_blank', ''); This is opening file with name and type Unknown. I have tried to use "text/csv" mimetype and download attribute of hyperlink(anchor tag). But it is also not working. Is there any way to set Content-Disposition in Jquery. I read that we cann't use that in client side it is response headers property. Please let me know if there is a way to resolve this. Thanks
Simulate continuity of a section menu highlight item
Hello, I'm trying to simulate the continuity of a section by keeping the parent li highlighted in my menu. For that, I put the child when there is one as hidden. In my Jquery code, I managed to do what I want for the fist item but for the others it doesn't work and my buttons next and previous stay blocked. Do you have any idea how to resolve my problem. HERE MY FIDDLE My HTML looks like this : <div id="cssmenu"> <ul id="list"> <li id="item1"><a href="#home">Home</a></li> <ul
Slide html elements with the mouse
hi there, I'm newly formed web designer and need to make a jquery application to position and resize the tables html page with the mouse, then lock. So it is easy to handle but I'm not getting. What can I use? thanks.
.find() function failing when <body> does not have a container <div>
Hello, I've been reading "Learning JQuery, 4th Ed" and I think that an exercise on Chapter 6 may have led me to a bug in the .find() function. I am attaching the pertinent files to this post. Here is the setup. There is an index.html file that has some clickable letters on the left-hand column. The whole chapter was about Ajax, so clicking on the letters loads in dictionary entries using a variety of Ajax methodologies. One of the exercises asked to create a tooltip that displayed entries begging
initialize var inside .click() fn -- have it avail. outside fn....
how can I initialize a var inside a click() function, and have it available later, outside the function? (I think this fun returns the element you call fn on? can you have it return anything else?) thank you.....
Playing with swipe
$(function(){ // Bind the swipeHandler callback function to the swipe event on div.box $( "div.box" ).on( "swipe", swipeHandler ); // Callback function references the event target and adds the 'swipe' class to it function swipeHandler( event ){ $( event.target ).addClass( "swipe" ); } }); im new but I dont give up, im trying to UNDERSTAND how this works. I want to make swipe do another thing, BUT...do I need a jquery method to link an url or I can use html5 IN juery mobile? $(
Validation group fields using datepicker and validation plugin
Hi all, I want to validate a group fields using datepicker and validation plugin. My problem is when i change one value (textbox), all elements aren't re-validated. Ex: I manually select textbox to change value: -Textbox 1: 5/5/1987 -> (return true, because (now - date of birth) > 18). -Textbox 2: 5/5/2000 -> Error 2 (return false -> display error 2, because (issued date - date of birth) <14). If i change textbox 1: 5/5/1980, textbox 2 isn't re-validated and still display error2, although (issued
Is it possible to use ?
Is it possible to use JSON data to Table body content?
Re-arranging a link in a website
Hi Experts, i am new to jquery and dont know how exactly jquery works . i have a requirement . Thinking jquery can do some help here i have a custom application which i access using a URL . i have two links on the application webpage which are "Help" and "Getting Started" which are alligned exactly one below the other . my requirement here is to place them side by side i.e. "Getting Started" "Help" . can this be achieved . My application is Oracle Discoverer and its on linux . please let me know
Get Json data from url source code
Hi, I want to json data from the website code source. Is it possible ? Web site url : http://www.betorder.com/SportFixtures.html?sportTypeId=1
XML parser not working except for IE
Hi guys! Trying to parse an xml using jquery. This seems to work only With IE 11 (didn't try older releases). Chrome, Opera and Firefox don't do anything.. <script type="text/javascript"> if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } else { xmlHttp = new ActiveXObject("Microsoft.XmlHTTP"); } xmlHttp.open("GET", "DataSources/XML/XMLCountries.XML", false); xmlHttp.send(); xmlDoc = xmlHttp.responseXML; var $xml
Shopping cart with json
I have been pulling out my hair trying to find a solution for this particular problem . I have built a shopping cart . Once a users clicks on adds to cart the session is stored in a multidimensional array . Everything works perfectly , my problem lies when I try to submit the data via json (I am submitting via json to prevent the page from refreshing). Please view my code below <a href="cart.php?add=2&rid=2&db=user" class="default"><img src="add_to_cart.png"></a> Here is the html code // This is
Strange behavior with Ajax and HTML Audio resources
I'm using Jquery's GET method to dynamically retrieve a recording and insert it in a element like this : $.get("getrecording.php", function (data) { var audio = "<audio onended='finiAudio()' src='"+data+"' id='mp3' preload='none'></audio>"; $('#somediv').append(audio); }); If I'm checking the src url with Firebug, or just doing an alert on the SRC attribute, I get the proper URL : http://testing.com/recording/call/REa989b3de9edf2c270c20007251268969.mp3 However, if I try to play the audio file with
JQuery increment maximum
I am learning jquery and have been given a little problem to solve and I cannot find the solution so hoping you can help me. I am creating a small increment calculator which i have pasted together from bits and pieces I found online. The problem I have is that i dont want it to go past 10, so if you press plus on teh calculator you cannot go any further. Also I dont want it to go past zero if you press minus, so no -1, -2 etc. How would I achieve this? The code i have is below. many thanks! Hayden
Percentage Loader on Button Submit
Hi, I am using a Form uploading images and informations once I select submit I want a percentage loader until it is get submitted. THANKS IN ADVANCE
Jtable and JQuery
i'm displaying values from database to jtable through a list in java servlets. now i want to take 2 values from that list and perform some arithmetic operation and forward that to next .jsp file... any help please how to accomplish this jquery?
Is ajax safe to use in asp.net projects that also have scriptmanagers for their own ajax?
I have an asp.net project that uses their scriptmanager for managing ajax. I was wondering if this would conflict if I used the ".ajax" feature of jquery to make a call to a web service? Does anyone know? Thanks.
Using Jquery animate() with a delay to load 2 different div
Hi, I am new here, and I hope I post in the good section. I'm currently working on a mini-educational game for the primary school where my children are. I have some basic html, php, mysql, but I am a newbie with jquery ... I built a quiz, and when the schoolchildren get good answers, they win a fish to place in a virtual aquarium. The fishes are png files, and I found a great way on the web to animate them with this code <script type="text/javascript"> $(document).ready(function() {
same event on different divs all executing at once
I have eight hidden divs, which I am trying to fadeIn one at a time, in sequence, with a pause between each one. I have tried creating an array of the individual div id, and putting the fadeIn effect in a for loop, and using the incremented value to advance from one div to the next. But all the fadeIn is executed on all the divs at once. And more puzzling to me, when I add an alert function to execute prior to my fade in, to show the array element for each div as it progresses through the for loop,
Having trouble using jquery to add an "null" attribute to form submitted by javascript submit() only.
I have a form that submits by javscript's submit() function only (no button or mouse click) and I am trying to add an attribute to it using jquery when this submission is activated. Since the code is lengthy, I am including only the form code itself, the javascript line that triggers the submission, the jquery code that is being used (it creates a message box warning the user that they are about to leave the page and the jquery that I have written that does not work. The jquery intent is to create
Using .slide on 2 separate elements.
Hi All, I'm using the code below to show and hide a div. jQuery(document).ready(function() { $('#blag-booking-drop-down').hide(); $('#blag-booking').click(function(e){ e.stopPropagation(); $('#blag-booking-drop-down').slideToggle(); }); $('#blag-booking-drop-down').click(function(e){ e.stopPropagation(); }); $(document).click(function(){ $('#blag-booking-drop-down').slideUp(); });It's working great for one div. I've replicated the code for another div on the same page and it works
Anyway to put a space between dialog button name
When I try it I get js erros buttons: { Do Stuff: function () { doStuff(); }, }
Favorite code editor and why?
mconway and I were talking and it made me want to ask: What's your favorite code editor and why? I really like Dreamweaver for its clean look and helpful commands, but I can't afford it at home. For a while I was using Crimson Editor and then PSPad, and recent started using Eclipse, but it lacks some of the simple features Dreamweaver does. So, what's your favorite code editor and why?
Create events dynamically for listview
Hi All, Dynamically created the listview elements. I have to create event for those list items. I tried like this : $.each(singles, function (key, value) { $("#Div1").append('<h4></h4><ul data-role="listview"><li><a href="#ShipsRef" onclick="fnTest(' + value.SHIP_CODE + ');">' + value.SHIP_CODE + '</a></li></ul>'); $("#Div1").trigger("create"); }); function fnTest(obj) { alert(obj); } If
Voting system (AJAX)
I'm implementing a voting system and I when I want to update the number of votes using AJAX, I refresh the count of all the publications. But I cant to refresh only one publication. See my HTML: <li class="like-publication"> <span class="votes"> {{Publication::find($publication->id)->profilepublicationvotes->sum('vote')}} </span> {{ Form::open(array('url' => 'profilepublicationvotelike', 'class' => 'vote_ajax')) }} <input type="text" id="disabledTextInput" style="display:none"
Display Block Required for older plugins and certain animations
All JQuery seems to have issues with hidden content, certain animations, etc. The solution for this roundabout for Safari and some other browsers is to add the css display block to your code $('.class').css("display", "block"); Example below will fix your safari display issue and certain mobile browsers. I found this issue with a number of older plugins and JQuery 1.11 Came across when I build a marquee I noticed that if I loaded JQuery 1.6 that that appended HTML and CSS automatically added display:
jQuery selector not working in IE7-9
Hi I have this simple code: var data = $('<xml><customtag>If you see this it worked!</customtag></xml>'); alert(data.children('customtag').html() || "This time it failed"); Here is the jsfiddle: http://jsfiddle.net/me2loveit2/bZwC9/ UPDATE: in IE use http://jsfiddle.net/me2loveit2/bZwC9/show I can't figure out why this wont work in older IE versions. I tried to call data.children() <-- without selector works in IE8 but data.children('customtag') <--Does not work for me in IE8 Thanks for any insights!
Helping to search this scenario
Is it possible in jquery these scenarios. I have form which include text field called 'ID', I want to add specific person under name field, so the user will click the link (add person) and show a modal form or ajax form on the fly, (A post variable 'ID' will included to ajax/modal form so there's a unique id under it) after he/she is done filling up the ajax or modal form the page will redirect to a form where he/she begun filling up.(important that the head form will not be refreshed after filling
[Solved] Range slider multiple steps
Is is possible to have a range slider that can have multiple steps? so for example <script type="text/javascript"> $(function() { $("#slider-range").slider({ range: true, min: 0, if(ui.values[1] >100) {step:50;} else {step:25;} max: 500, values: [75, 300], slide: function(event, ui) { $("#amount").val('$' + ui.values[0] + ' - $' + ui.values[1]); } }); $("#amount").val('$' + $("#slider-range").slider("values", 0) + ' - $' + $("#slider-range").slider("values", 1)); }); </script> the reason is that
Opacity not fading back with a hidden menu on Safari and chrome browser?
0down votefavorite please see this example http://intelligen.info/index.html The menu at the top of this page has opacity set at 0 and when you hover at is change to 1. This works fine in firefox but if you view it on safari and chrome some of the menu sticks and doesn't fade out when the hovering has stopped. Anyone know how to prevent this sticking on safari and chrome? $('#nav, #logo').hover(function() { $('#nav').fadeTo(1,1); },function() { $('#nav').fadeTo(1,0); }); $('#lfw-link, #lfw').hover(function()
Sticking?
I have created some jQuery code that runs when the mouse hovers over spans. These spans are on top of images. In the function I have written it also changes the class of other images. This is all to create a type of show hide effect that can show an image when I am on a particular part of the graphic. It basically works but it is ‘sticky’, meaning that sometimes the images get stuck or don’t roll back. Does anybody know the concepts I am dealing with here. Does this relate to binding? Can anyone
Problem uploading files
Hi, I am trying to use the upload sample here: http://www.sanwebe.com/2012/05/ajax-image-upload-and-resize-with-jquery-and-php It works perfect on my localhost but when I uploaded it to my web host it does nothing and I am getting the following in the console: Uncaught TypeError: undefined is not a function mypage:203 (anonymous function)mypage:203 jQuery.event.dispatchjquery-1.9.1.js:3074 elemData.handlejquery-1.9.1.js:2750 jQuery.event.triggerjquery-1.9.1.js:2986 (anonymous function)jquery-1.9.1.js:3677
Help with .val /. find with select boxes
I am using the following code: $(function(){ $(this).on('change','select#type',(function(){ var defaultVal = $(this).find(":selected").attr('default'); $('select#agegroup').val(defaultVal); })); });It controls take the select box "type" and applies a default value to select box "agegroup." I recently have made it so that several of these select boxes can be added on the same page to enter multiple values at once. However, when a change is made to the "type" select box, all
Interesting selector behavior - how does this work?
Yesterday when exploring a class toggling snippet I found that the following will work - HTML - <div class="smallImage"> <img src="http://placehold.it/150x150" /> </div> jQuery - $('.smallImage').click(function() { $(this).toggleClass('smallImage bigImage'); }); Here it is in action - http://jsfiddle.net/jayblanchard/5j8aJ/4/ Here is where I got into a bit of confusion: it would seem to me that when you click once, causing the element to lose the smallImage class that any subsequent click
Multiple ifs in another if.
Hi guys, I want to add different ifs to one parent if. If any of if's are met, then go and do the else. Here is my code: if (document.URL.indexOf("xxx.co.uk") != -1) { Site='xxx.co.uk' }; if (document.URL.indexOf("xxx.de") != -1) { Site='xxx.de' }; if (document.URL.indexOf("xxx.fr") != -1) { Site='xxx.fr' }; if (document.URL.indexOf("xxx.it") != -1) { Site='xxx.it' }; if (document.URL.indexOf("xxx.be") != -1) { Site='xxx.be' }; if (document.URL.indexOf("xxx.nl")
Next Page