dynamically adding textboxes gives a problem
hi, when i ada textbox dynamically it gets added bt then even if i giv id d script doesnt work for tht id...
JQuery Ajax call is fail on window.onbeforeunload event in Firefox.
Hello, I have following scenario where jquery ajax call is fail. I want to save user information in database when user close browser/ leave a webpage. So for that I am making an Ajax call from window.onbeforeunload =function() { } function. Below is a sample code. window.onbeforeunload = function () { $.ajax({ Async: false, cache: false, dataType: 'json',
regarding jquery with rest Service
after changed json instead of jsonp responses not coming, i have tried following code using $.getJSON $.getJSON( 'http://10.163.14.56:9000/customerservice/getDet', function(data) { jQuery.each(data, function(i,item) { var consultant = item.consultant; var consultantHtml = '<tr>' + '<td>' + consultant.firstName + ' ' + consultant.lastName + '</td>' + '<td><a href="' + consultant.blogFeed + '">' + 'Blog Feed</a></td>' + '</tr>';
invalid label from jsonp response data
while getting response from rest webservice call ,am getting the following scripting error Timestamp: 08/06/2012 06:16:58 PM Error: SyntaxError: invalid label Source File: http://localhost:9000/customerservice/getDet?callback=?&_=1344257218195 Line: 1, Column: 1 Source Code: {"sage":100,"sname":"lenin"} last line represents jsonp data from the server. for your reference my ajax call is $.ajax({ dataType: 'jsonp', type: "GET", url: "http://10.163.14.56:9000/customerservice/getDet?callback=?",
Find a div in Callback string
Hi folks, I'm starting with jQuery (and I'm not very familiar with Javascript). It's probably an easy question but strangely enough I couldn't find anything that could help me solving my problem : I have to get the status of a server via SSI command (<!--#echo var="myVar" -->). In my callback, I can display the whole webpage without problem. I can also see the relayDisplay div filled with my answer. Great! But I want to extract it from that string. Tried with find and other functions, selectors...
How to preserve link state or CSS class on a link (anchor tag) with cookies?
Hello, I have this piece of code which adds and remove a class on my links. The class is added to the linked clicked or active and removed from liked that are not active/clicked. However I would like to preserve the state of the active link so that it remain active even when the page is refreshed, this is for a single page. JQuery: $(document).ready(function() {
$('.navbar li a').click(function(){
$(".navbar li a").removeClass("currentTab");
$(this).addClass("currentTab");
Make a nested repeater sortable
I am trying to have a sortable list inside of another sortable list. The outside list becomes sortable but the nested list does not. Any idea on how I could accomplish this? <script type="text/javascript"> $(document).ready(function () { $('#sortContainer').sortable(); $('#sortContainersub').sortable(); }); </script> <!------------------First sortable list begins here----------------------------------------------------------------> <asp:Repeater ID="rptEmploymentData"
Creating dynamic event listeners for element class?
I would like the best suggestion for the following scenario: I have for example <img id="image1" src="img/img.." class="clickimage"> <img id="image2" src="img/img.." class="clickimage"> <img id="image3" src="img/img.." class="clickimage"> I would like to onload add an eventlistener that do action on the class and do get the id for that element, doing an action. $(".clickimage").click(function() { var idName = $(this).attr("id"); //Call a function to do something with the name of the ID....
How to read json object
Hi, Please help me on how to read a dynamic json object of below format using jquery. In the below sample , each data within { } i.e curly braces is read a row to a grid. [ { "Applies":"Grtx", "id":"27255.43719", "name":"Grtx/56310", "Affected Node":"1", --> ROW1 "Notes":"Dan on SOS check", "Req Priority":"High" }, { "Applies":"Oss", "id":"27255.43720", "name":"Oss/46310",
clientWidth and offsetWidth returns NaN
I am trying to handle a resize for JQGrid with a snippet of code below var width = $("#divGridContainer").attr('clientWidth'); if (width == null || width < 1) { // For IE, revert to offsetWidth if necessary width = $("#divGridContainer").attr('offsetWidth'); } width = width - 2; // Fudge factor to prevent horizontal scrollbars alert(width); It always throws the response to width
jQuery Logo usage
Hello, i want to show my customers on my website, that i am developing jQuery Plugins and also using this wonderful library. So my question is now, may i use the jQuery logo? I alreay read that it would be allowed but you have to contact someone first...? unfortunately i could not find any email adress to contact to. Thanks in advance! Regards from Austria, Alexander
Thumbnail Slideshow with overlay
Hi, I have a prob with jQuery. I needed a slideshow with only thumbnails (without the bigger image) and I did it with the GalleryView (http://spaceforaname.com/galleryview/) plugin. But now I need to create an overlay image zoom when i click on a thumbnail. I mean i want that i click on a thumb and it appears on the screen like lightbox do it (http://leandrovieira.com/projects/jquery/lightbox/). I tried to put lightbox on my code and used it on my gallery, but it doesn't work because: <ul id="#gallery">
Ajax form respond "OK" return
Hi all, I am trying to send a form to an email address and if the email sends properly my php return only 'OK'. This works fine but instead of my .ajaxComplete function recognizing that 'OK' is being returned it is simply echo-ing 'OK' directly to my page. I want to instead hide the form and fill a div with a custom message. Can someone please shed some light on why this is happening and what I need to do. Thank you for any insights you may/can provide. I'm using jQuery 1.7.2. And, here is my code:
jQuery, Twiter bootstrap: How do I generate alerts(and text) on based on actions?
Here is my html for alerts <div id="feature" class="feature"> <div id="alerts"> </div> # other html data </div> Here is my `Ajax` call $.ajax({ type: 'POST', url: 'addVideo', data: { video_title: title, playlist_name: playlist, url: id, // csrfmiddlewaretoken: '{{ csrf_token }}', success: function() { $('#alerts').addClass('alerts').addClass('alert-success').append('msg').fadeIn('fast'); } }, }) I am using reference from here - http://twitter.github.com/bootstrap/components.html#alerts
Setting Transperancy To Modal Popup Containing an iFrame
Hello, I am showing a pdf in the background and a Popup over the top which contains an iFrame I want to set the transparency to the popup. It works perfectly in Chrome browser and the rest it doesn't work :( Here is the Fiddler Link : Click Here Please Tell Me What should i do to work in all the browsers.
Jquery sliding DIV not working in browser compatibility issue
I am trying to implement a sliding div over pdf (Information : Pdf is Shown using iFrame). Its working on Mozilla Firefox, Chrome but its not working on Internet Explorer, Safari :(. Here is the jsFiddler Link. Click Here Will any 1 let me know what should i do to work in all browsers.
issue with jax-rs2.6.1 webservice+jquery
Hi, i unable to fetch the 'json/xml' data from server, please see the below client and server side code for your reference i have used server jetty-7.5.4.v20111024. client side code is: $(document).ready(function(){ var rootURL = "http://localhost:9000/customerservice"; $.ajax( { Type: 'json', type:'GET', url:rootURL+'/get/', crossDomain: true,
Problem with Chrome
Hey guys, i tried to script a new slider for my website which shows & hides my login-panel. You can see it on: http://lan-maniac.com/?admin=1 (You need the ?admin=1 after it to see the construction-site.) In FireFox the Slider on the top will hide & show after pressing the arrow under it. Its all workin perfectly there. But on Chrome i got a problem. The arrow is moving down all the time & when u check the console of chrome (where the console.log() comments appear) you can see the outputs which were
Drop down hang for a min
I am using drop down for my filter. When filter selected i fetch data from json and display in grid using dl and dt tag. I have 70 record in return JSON string . But seems to me it is not issue with data because drop down hang/freeze for a min and than it jump back to selection place. Any idea/suggestion would be great help?
Help with mouse selections!!!
I'm trying to get all elements in an iframe that have been mouse selected. At the moment, I'm doing it like this, I get the paragraph and all children inside it. I'm getting all paragraphs and its children, and then adding them the class .selected in case of mouseup or mousedown. Copy code $("p", $("#"+frame.id).contents()).each(function(){ $(this).mouseup(function(){ $(this).find('*').addClass("selected");}) .mousedown(function(){ $(this).find('*').addClass("selected");
How to solve Problem of Runtime element
i add RUNTIME new element of HTML,that's successful. but now i need to use that 'id' to check value of runtime is visible or not...please help me to solve this problem.
jQuery.appear
I've made a plugin that calls a function as an element "appears" - or in other words, as it enters the visible window through scrolling or changes to the dom. The idea is that you can have additional content load as the user navigates the page. This can have a few effects: The user loads pages faster The user and server both save bandwidth The user has a better experience because he doesn't need to click a "more" link to see more content - it gets loaded to the page as soon as he's gone through the
Add Swipe To This HTML5 Page!
Heyo, I've been pulling my hair out for a week trying to get this to work... I'm using Wix.com's html5 editor, which makes the html pretty wonky... I can text so that an alert pops up on my idea, but I can't get it to swipe from page to page! If you click on the first picture (lady holding hands to her face) on the webpage, it goes to page two, but I want to be able to swipe back and forth between these two pages... Any way to make this happen?! It won't let me post the entire html code, so you
How do I display a picture using jAlert
I am using the following code to create text for a jAlert $(document).ready(function() { $("td.codes").click(function(e) { var codesText = $(this).text(); var $curr = $(this).prev() var emailText = $curr.text(); $curr = $curr.prev() var cabinText = $curr.text(); $curr = $curr.prev() var fromText = $curr.text(); $curr = $curr.prev() var nameText = $curr.text(); $curr = $curr.prev() var unusedText = $curr.text(); $curr = $curr.prev() var ccidText = $curr.text(); Once I have these fields I string them
Cancel bubbling in firefox
Hello. The following issue is only in FireFox. works OK in IE and Chrome. I created the DIV bellow. When it reaches the someFnc - the event is "undefined" (nor window.event) How can I cancel bubbling?? jQuery('<div/>', { id: 'AA' + this.boxID, class: 'BB_Btn', click: (function () { current.someFnc(event); }) }).insertBefore('#box' + this.boxID + 'star');
defer parsing of jquery
Hi All, I am using below js code for jquery defer parsing. Here is my code: <script type="text/javascript"> function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "jquery-1.3.2.js"; document.body.appendChild(element); /* $(document).ready(function(){ $("a").addClass("test"); }); */ } // Check for browser support of event handling capability if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload",
Help with equivalent jQuery instruction :)
i have this javascript code: var message = data.getElementsByTagName("message")[0].childNodes[0].nodeValue; Message is an XML formatted string which i receive from the server. What is the equivalent jquery code for my instruction? Thank you.
Dynamic content generation breaks image slider.
Hi, I'm very new to this, I have been modifying a wordpress theme and I have come across an issue. The page I am working on is a portfolio page, It uses dynamic content generation. It pulls up all portfolio posts. I have added an image slider to each portfolio post. My original problem was that only the first portfolio items slider would work and the rest would not load. So I changed the script for the page to get it to call up the new slider for each project. My problem now is that if I click back
loading xml on chrome.
:) i am new to html5 and jquery development. i have a problem loading xml with jquery apperantly only on chrome. this is my site: http://shaharmesh.hostingsiteforfree.com/ you can see that the protfolio section working fine with all browsers exept chrome. when i open the chrome javascript console i can see this log: event_bindings:232 Failed to load resource: the server responded with a status of 403 (Forbidden) ... i am using: $(document).ready(function() { $.ajax ({ type: "GET", url: "../Assets/protfolio.xml",
A jquery picture slider/lightbox2 issue
I am creating a picture slider show for someone using jquery, it has a previous and next button. Here is also what i'm trying to acommplish. Whenever the user ciicks on the image, it enlarge the image. I am using lightbox2. Now, I have no idea why the slider is not workin. the image will "enlarge" http://www.rodriguezstudios.com/division9/gallery.html Here is the html, jquery,l and css code html <div id="information"> <h1>Gallery</h1> <div id="container"> <img id="prev" class="prev" src="Gallery/buttons/prev.png"
can not enhance page or listview to get it to genererate thumb css
I tried create a page following the thumb listview example. I start with an blank html page, then dynamically inject a listview with an image in it, call $page.trigger("pagecreate"), everything works like the example. <li> gets a style ui-li-has-thum, and <image> has style ui-li-thumb. However, if I add the listview w/o the image first, then inject the image and call either $page.trigger("pagecreate") or $content.find( ":jqmData(role=listview)" ).listview(), the page comes out without these styles,
Post DatePicker (yyyy-mm-dd) OnSelect to php mysql
Hi, I've been trying for a while now to get the following code to Post to a php/mysql page, but no luck. Can anyone please help? Thanks. <script> $(document).ready(function() { $("#datepicker").datepicker({ onSelect: function(dateText, inst) { $.datepicker.formatDate('yyyy-mm-dd', new date(dateText)); $.post("phpMysqlInsert.php", {visitdate: dateText} ); }}); }); </script> <div id="CSSformat"><div
How to achieve this effect of tool tip? shorter, please
How to achieve this effect of tool tip? shorter, please See project: http://jsfiddle.net/biofusionart/4esNj/4/
More efficient method?
Is there a more efficient method to go about doing this? I want to call the data on page load, and then start running through the intervals. My current setup: $(document).ready(function(){ //run it on startup $.ajax({ url: "js/latestNotice.php", cache: false }).done(function( notice ) { $("#notice").html('<b>Latest Notice:</b> ' + notice); }); $.ajax({ url: "js/online.php", cache: false
Call function every thirty seconds?
(ignore the 500 please, that's just for testing purposes) $(document).ready(function(){ setTimeout(function(){ alert('hey'); }, 30000); });Any idea regarding this? I've looked up several questions on google, although I haven't found a specific answer sadly enough.
How to pass string data from textarea using Jquery ajax as a parameter to a servlet?
I have a text area in html in which a user will paste a long string of data (with spaces) which needs to be entered into the data base. The user will click a button upload which will call a javascript function inside which I am giving a jquery ajax post call in which I need to pass that parameter to the servlet which is mentioned in the url. Following are my codes: <textarea id = "string" rows = "20" cols = "120" > Please enter the data </textarea> <input type = "button" value = "upload" onclick
using script tags to drive data as events into the dom
I was trying to use a script tag at the bottom of the body to retrieve the data from the server for the page. I wanted to drive that data into the page using an event. So that there is decoupling between the javascript that is using the data, and the script tag at the bottom that is producing the data. The script tag at the bottom looks something like: <script type="text/javascript" src="../../api/summary/level"></script> </body> </html> The contents of the script looks like: $(this).trigger("level",
Using jquery to replace flash
Hello, I have a web site to play flash. The flash file is a swf file which was created by images. For some reason I don't want to use swf, I just want to play pictures animation by pure jquery. I am not sure how to start off the journey. Thanks.
Automatically assign the height of a website
Heyllo everybody, could you please help me with the currently programmcode, to get automatically the height of my homepeage? I don't need to scroll the website. Thanks. $(document).ready(sizeContent); $(window).resize(sizeContent); function sizeContent() { var newHeight = $("html").height() - $("#header").height() - $("#footer").height() + "px"; $("#content").css("height", newHeight); }
How do you immunize the string when checking with td:contains?
I have a string like this $("td:contains('" + ldName + "')").each(function () { //do something } But when ldName has a value like 'RestoreFactoryState();' it is thinking it as an executable statement (function call) and is trying to execute it. Is there a way we can make this to think it as a plain vanilla string and proceed. I am getting a firefox error message like below Timestamp: 8/3/2012 3:25:20 PM Error: Error: Syntax error, unrecognized expression: td:contains('RestoreFactoryState();')
Next Page