JQuery ID problems
Hi I am currently using struts2 for my web application. <script type="text/javascript"> $().ready( function() { $("#delete").confirmer(); }) </script> <s:iterator value="#session.result" status="status" id="David"> <tr bgcolor="eeeeee"> <td> <s:property value="#status.count" /> </td> <td>
Rotate an bullet image in an accordion
Hi, I know that it involves css, but I'm not sure which functions to use. I'm trying to have somesort of triangle, with its tip pointing right, but when slide down, it points down. How do you do that with css and jquery? Thanks
Overriding toggle()
I have developed vertical navigation with sub menus that slideDown and slideUp when clicking the heading using toggle(). All sub menus begin closed when the page is opened. However, when a visitor is on a page that is within a menu then I want that menu to be open when the page is opened. So far, so good. The problem I am having is that when one clicks on that particular open menu item to close it, nothing happens. This is because the action of toggle() is to open the already opened menu. The
please help me in finding Jquery Scheduler..
Hi; please provide me some useful link where i can get the jquery scheduler source code.. Thanking you Manish k
how to show an error message when server is down
hi i wanted to know if its possible to show an error message or load a custom error page when the server is down or not running and the user requests some service on the web page. i am also using reverse ajax, can the same task be done using this?
how to use datepicker in Advance
ex from date (24/-09/2000) To date MinDate : ADD one Year(or)Month(or)Days from the FromDate (24/09/2001) Thanks In Advance
How to handle array returned from PHP?
Can anyone advise on how to parse returned data from a PHP script? I've got jQuery sending form inputs via ajax to a PHP script, which operates on the inputs, pushes the results into an array, and sends back the array. I want to plot the data, but I'm not sure what to do with what comes back ("data"); how to wrestle it into a JavaScript array that can be plotted. ---------------------------------------------------------------- My form has a few buttons & sliders & whatnot. Values are sent off to
Callback function, but just at the end!
Hi to everybody! It's my first post here!!! Let's try to explain the problem that i have... I need, in a script, to call an ajax (.post) function, and while i read the data that this function return, i need to call another .post function with some of the data that i read. so something like it $.post( "ajax/func.php", { ope:"leggiOpereMuseo", idM:idMuseo }, function(xml){ $(xml).find('opera').each(function(){ var idOpe = $(this).attr('indice');
Show/Hide Div Flickering in IE8.0
My working code is attached here. Problem: When i click hide , the content will be hide from screen with flickering again when i click show , the content will be displayed without flickering. How do i avoid the flickering when i click hide ? <table width="60%" cellpadding="1" cellspacing="1" align="center"> <Tr><td align="right"><span class="arrow">»</span><a href="#" onClick="showSlidingDiv(1); return false;">Show</a> <span class="arrow">»</span><a href="#" onClick="showSlidingDiv(0);
Pass in var as a method
Hi, I'm stumped trying to figure out if this is possible. I'm creating a function to show/hide a menu when clicking an anchor. I want to determine the effect it uses by passing it in as a variable but it no likey! What am I doing wrong? Check out the code below... <script> function clickMenu(menu, trig, tran) // hide menu jQuery(menu).hide(); // setup transitions var t; if (tran=='slide') {t = ['slideDown()','slideUp()']} else if (tran == 'fade') {t = ['fadeIn()','fadeOut(']}
datepicker with dynamic restriction-dates from smarty
Hi all, i am using smarty and jquery and have got a little problem with the jquery datepicker with restricted date range. min- and max-date are coming via smarty, and i can't figure out how to pass those to the Date-Object. Here is what i've tried so far: var projectEndDate = "{$projectEndDate|date_format:'%B %d, %Y 00:00:00'}"; alert(projectEndDate); // shows exactly what i need, e.g. "December 23, 2010 00:00:00" // Following won't work, no max-date is submitted: $( "#datepicker" ).datepicker({
convert an UL/LI list to a COMBO box
Hi, Is there any code to convert an UL/LI list to a COMBO box please?! I need be like this: http://aplud.com/du4tq Thanks Nabi
Potential issue with jquery.load in IE 8 ?
I have started developing a website, which implements loading on demand of sections in the user profile using Jquery.load(). Have a look at: http://www.creativelunch.com/atesore/user/profile/rwap_software This works fine in Opera, Google Chrome, Firefox. However, in Internet Explorer v8 (including under the compatability mode), I get an "undefined" error when the .load() function ends The section of code (in global.js) which causes the issue is: //On Click Event $("ul.userTagList li").live('click',function()
JQuery Selector on Dynamically Added Element
I apologize since this must be an incredibly obvious thing that I'm just somehow missing, but I can't figure out how to coax JQuery in to selecting an element that is manually (dynamically) inserted in to the DOM after the page loads. For example: If I have HTML: <div id="bar"> World! </div> Then I create a new element and insert it in to DOM: var foo = '<div id="foo">Hello</div>'; $("#bar").before($(foo)); I end up with this, which is great: <div id="foo">Hello</div> <div id="bar"> World! </div>
$.get() or even $.ajax() returns me an empty ResponseText ! Why ?
(translated with google) Hello everyone. Here's what I try to do: The goal is to change the source on the fly (as with a firefox extension webdev or another or even Greasemonkey) to add a link. Until then, easy does it work well. This link launches an application ajax jquery like: $.get(...) or even $.ajax(...) If I'm on www.mywebsite.fr, added my link, I click and it works, I see the ajax request and pass my "alert ()" gives me the return of application. Great ! But if I'm on a site other than mine
get id from element in string
I have an element tag stored in a variable: var bla = '<img src="path/to/image.jpg" name="something" id="myid" />'; Is there a way to get that id from that var??
different behavior using .removeAttr() on IE8
I'm encountering a situation where .removeAttr() is working on my local dev env but it's causing runtime error: Not Implemented on the stage env. My code is like this: Response.Write( string.Format( "<script language='javascript'>if(top==self){{ window.opener.jQuery('[SubmitCaseId*=' + {1} + ']').attr('disabled', 'disabled'); window.opener.jQuery('[SubmitCaseId*=' + {1} +']').attr('href', '');}} else parent.disableCase({1}); alert('{0}');if(top==self)
has() assumes default DOM and context?
In both 1.4.2 and the latest nightly build, the implementation of has() looks like this: has: function( target ) { var targets = jQuery( target ); return this.filter(function() { for ( var i = 0, l = targets.length; i < l; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, Doesn't the first line ("var targets = jQuery( target );") mean that the has() method will not work when operating against anything but the DOM of
Help with Ajax and errors.
I have my ajax function working, but I need to handle to error cases, one is a timeout and the other is a 403 not authenticated. I am having trouble figuring this out, any tips on how to set this up? Can I have two error possibilities? Here is the function so far. Thanks! $('#container').html('<img src="loading.gif" />'); var url = "proxy.php"; var data = "?c=product&m=categories"; $.ajax({ type: 'POST', url: "proxy.php", data: url+data, success: function(data){
Fading Navigation Menu in iWeb. Please help?
Hello, I have never designed my own website and about 2 months ago, I have been trying to do so using iWeb. I am a self professed ludite so please be patient with me. As you know, iWeb is very limiting. To compound problems, the genius's at the the Apple store say that iWeb and jquery are not compatible. Even so, I have managed to get a jquery based Fading Navigation Menu up and running on my website. Here is a link to the code that I used: http://css-tricks.com/color-fading-menu-with-jquery/ - I
Accordion & Google Static Maps API - Prevent images being loaded until needed
Hi, I have a working accordion, which amonst other things, loads a static map image based on a postcode variable, and it all loads nicely within each Accordion 'Draw' as expected.. My problem is that we have about 50+ draws, each with a map (a dynamic image) so when the page loads, you can see in the browser that the page is downloading 50+ items, and for one thing is seriously slow, and secondly, it blows the limit of x maps per day from Google after a few refreshes of the page.. Is there a way
Problem while detaching an event with an element
Hi, I have a <a> element to which i am attaching a click event.This element is created inside a <div>. I am attaching each div a unique id during its creation time.This is not a static div and is created dynamically. This <a class="icon"> provides an image for removing the <div>. The problem now is eg:i am creating the div as <div id=divid><a class="icon"></a></div>.At this time i am attaching the event to the <a> as follows jQuery('#'+divid+' .icon').live('click',function(){ jQuery(this).die();
after .remove() I can jQuery('#id') still returns Object
If execute the following jQuery('#'+id).remove(); alert(jQuery('#'+id)); alert(document.getElementById(id)); the first alert returns [object Object] while the second one returns null surely the first one should also return null as the documentation states that it uses the document.getElementById function internally? (remove does clear the inner HTML, so .html() returns null) using jQuery v1.4.2 Thanks
Hidden iFrame Does not Jump to Anchor in FF
I have a hidden iFrame (display:none) which I change the src attribute of to load new contents. When the iFrame has finished loading I make it visible again (display:inline). This works fine except for anchors. The iFrame will not jump to an anchor when finished loading if its hidden in FF. Any fixes or ideas? Thanks
Special characters (åäöÅÄÖ etc) are replaced by "�" when using $.get function
Hi. All my special characters are replaced by a "�" when returning a php database generated file with the get function. Is there a simple way to solve this issue? Thanks!
CSS and images path problem
Hi, I have my css in one folder "/stylesheets" and my images in the "/images" folder. Because of this jquery-ui-1.8.2.custom.css looks for the ui images in "/stylesheets/images" not "/images". How do I specify where the UI images are? Richard
jquery events in IE 8
Hallo, I have a scrollbar based on JQuery and Interface. It works fine for FF, Safari and Chrome, but in IE the user can scroll only once. If someone tries to scroll once again jQuery returns `null` instead of event and breaks. the problem comes in JQuery code here: ..... handle: function( event ) { var all, handlers, namespaces, namespace, events; event = arguments[0] = jQuery.event.fix( event || window.event ); event.currentTarget = this;
scrollbar in IE8
Why does the red div not trigger a scrollbar in IE8? Here is my test case: http://jsfiddle.net/HcejX/8/ Thanks.
$.ajax(...) Problems
Hi, I'm using the function $.ajax(...) to get information from the server. I'm using JQuery 1.4.1 version. However this works ok in the IE but not in the Firefox nor Chrome. In the server side I'm returning response.setContentType("application/json;charset=UTF-8"); out.write("{\"XXX\": \"1\",\"YYY\": \"2\"}"); The client looks like this $("input.buttonGetAjaxRestfull").click(function () { $.ajax({ url: "http://localhost:8080/RestFullServiceProject/resources/employeess/1002/",
animate height is not animated
I'm trying to toggle between showing a whole paragraph or showing just the top line. var myDiv = $("<div></div>").css({height:"1em",overflow:"hidden"}).text(lotsOfText); myDiv.click(function() { myDiv.animate({height:'100%'}); }); When the div is clicked, it doesn't animate. It just pops open to the right size. Is the problem because I'm going from "em" to "%"? Is there some way around this? I would use "px", but I have no idea how tall the div will be. Any ideas? Thanks in advance. --
bind("click")
Hello again. I have a problem with click event. I want to develop cool music album management. I imagine that this way i have 3 tabs, in first tab is included php file, second and third are blank. Php file ahows list of albums, and on click on some album another tab populates by ayax load. $("p.albico").bind("click", function(){ var albind = $(this).attr("id"); $("#tabovi").tabs("select", "album"); $("#album" ).load('ajax/prikalb.php?id='+albind ); }); That works. i get album info, but when I click
Clear All Javascript On New JSON Callback Search?
Hey all. On my site load, I have JSON going and grabbing some initial data to populate my frontpage. Once populated, if the user clicks on one of the search icons to get new results, my previous results from the initial load are still there. The search is coming back and appending to the original data that was brought in on the page load. It will continue to do this every time for every search button clicked. How do I make it so that all of the previous searches go away and the new search is putting
How select a div dynamically and then keep that selection while moving within the DOM (passing a target path)?
Sorry for the vague subject line. Let me try to explain: I built a reusable plugin for slideshows. Client now needs me to add something that will affect its reusability. The line below is a snippet which is attached to a nav button. Each slideshow has a dot per slide. When clicked I get the number of sibling that it is within the group and then I look UP the DOM to the nearest div with the class called 'slide_holder'. I then display the slide that has the same sibling number as the dot (In other
ajax call to jsp that returns xml
I'm having a heck of time getting jquery, to parse a returned xml from a jsp page. Any help being able to parse this data would be great. Or why I cannot parse the data. If I convert the jsp to xml by removing "<%@ page contentType="text/xml" %>" and renaming it .xml the script works like a charm. I'm running this on Apache Tomcat 7.0.2 if that makes any difference. Here is the Html file with the ajax request. <html> <head> <script src="jquery.js"></script> <script type="text/javascript"> $('document').ready(function(){
Jquerry / Contact form and Accordian
Hey all, I have a completed contact form ready to do. There is a section that is fairly long but not applicable to to all. So my idea is when the user selects the radio button "YES" then the reson of the fields show up like the accordian. Has anybody done this or knows how to do this that they can share with me? Appreciate it.
Removing transparency in menus
Hi, I am new to jQuery and I am having some issues. My company uses IE6 and I have been able to make a drop down menu with sub menus work...but I do have a small problem. All of the sub-menus have a transparent background. I need the background to be a solid color and I am not sure how to do that. Here is what i have for the css .posmenu, .posmenu ul { margin: 0; padding: 0; width: 200px; position: relative; list-style-type: none; } .posmenu a:link, .posmenu a:active, .posmenu a:visited { padding:
Contact Form - accordian?
Hey all, I have a contact form completed working etc. I would like to have a portion of the form appear AFTER a radio button has been selected. So when the user checks YES - more files show up. I am thinking of using the accordian effect. Is this a good way of doing this, if so does anyone have and example or can show me how it is done? Thanks :)
Having a child effect another parent and vice versa as an independent set
I currently have a set up where a child element toggles its own parent and another. They both uses the same classes. However, I want them to function in pairs as, I have another set after those two and I want them to function independently. I've been looking at the traversing classes and I'm having a bit of trouble understand what each does. What I need is something where the "cousin" effects the parent. Here is a diagram of what I'm trying to accomplish
Append/Prepend Issue (attempt to match closing/opening tag positions)
I think I used to be able to do what I want to do now with an older version of jQuery but am now having problems. I want to insert a SPAN into an LI (yes, I uppercase my references to HTML elements when not within an XHTML document) so that I can have code like this: <li>Bullet Point example</li> in the HTML but end up with this in the DOM: <li><span>Bullet Point example</span></li> I have tried all different variations on the following code (sometimes trying appendTo/prependTo): $('LI').prepend('<span>');
Expand TR in table?
I have a table with a few rows in it. What i want is when i click on a row, that right below that row a DIV opens. But i´m not sure how to do that. Anyone any diea?
Next Page