[jQuery] Online tutorials
Hi, I am an experienced programmer. I work with Drupal. I have no experience in Javascript, and every time I need anything I have to ask for help (see previous message). I was wondering if you could give me a list of pointers to: 1) A good tutorial about "pure javascript" aimed at programmers. I need something crisp and clear 2) A good step-by-step tutorial on how to use JQuery. The previous tutorial(s) would need to be enough to understand this one Any help would be highly appreciated! And... apologies
[jQuery] puzzle of "this"
hi everyone i am a newbee for jquery and trying to play with it, i was puzzled by the use of this somehow, for examle $('.delete').click(function(){ $.post("test2.php",{id:txt},function(){ this.something};}); here if i want to refer this to the $('.delete') element, what shall i write? in debugger i found this refers to the function body.
[jQuery] Display message for users with incompat. browsers?
I'd like to show a message (display a div) for users who show up with a browser that jQuery doesnt fully support - what's the best approach? Will jQuery work on old browsers, just not perfectly? -- A
[jQuery] retrieve values from func that calls a $.post
Hi guys! I'm having some problem, because I'm rearanging my programming method. I have the shoppingcart object, and it can fire many methods. But for examples i have a method "shoppingcart.set(id,prop,value);" that makes an ajax call via $.post and set for example the prop "quantity" to 5 in the cart. In the callback of the ajaxcall it sets shoppingcart.lastoperation=1; (that means last operation OK) then for example if I need to retrieve that value for a control, out from the callback, because the
[jQuery] Getting started
I am toying around with a form where I am using the validate plugin. http://bassistance.de/jquery-plugins/jquery-plugin-validation/ What I am after is that before a form is submitted, an ajax query must return true/false in order for the form to validate. Example: A select with country codes and names User puts in a phone number Clicks submit Before submittal the form sends an ajax query with the phone number and country code ( from the select's value attribute ) and gets a true/false of whether
[jQuery] Help with debugging/finishing a Drupal Digg/Pligg clone
Hello, I have just finished writing a full Digg/Pligg Clone. It's based on Drupal, and it is already functional. Have a look here: http://www.drigg.org (a test web site, after importing http://www.fsdaily.com, currently based on Pligg) http://www.drigg-code.org (the web site where I explain how to install it, etc.) Jake McGraw has volunteered his _precious_ help with the first version of this. However, he's extremely busy right now, and we are to the point where: 1) The code of Drigg is 100% finished
[jQuery] RE: How to get the TagName of a jQuery object?
DOH! var $kids=$('*').not('page').not('pages'); ar=new Array(); $kids.each(function(){ar.push(this.tagName)}); sorry guys!
[jQuery] How to get the TagName of a jQuery object?
Hello, let's say i have an xml (or html or whatever) of this sort: <pages> <page> <title>first</title> <content>lorem ipsum</content> </page> <page> <title>second</title> <content>lorem ipsum</content> <something>other</something> </page> .... </pages> and i want to iterate over the tags within each page and transform them into <page> <data name="title">first</data> <data name="content">lorem</data> </page> ... i've figured out a way of doing it by providing an initial array and using that as selectors,
[jQuery] missing leftOffset, topOffset in cluetip
Earlier on I tried offsetting the topBottom positioned tip with the topOffset parameter, this had no effect, but I just left it out, achiving a rather variable positioning using margin in css. Today I was trying to fix another bug when I noticed that both the leftOffset and the topOffset are missing completely. --------------- from the API: --------------- var defaults = { (...) topOffset: 15, // Number of px (...) leftOffset: 15, // Number of px (...) --------------- have I just misunderstood or
[jQuery] Is getJSON reentrant? Can I nest them?
It appears that I can't nest getJSON calls. When I make the second call, the throbber in Firebug spins forever. I'm getting a list of changes from a database and then trying to get more precise data on each change with a second getJSON call in an anonymous function in the first getJSON call. Can anyone enlighten me on this? Thanks, ml
[jQuery] Building RIAs
Hello! I just started using jquery and am blown away. I'm trying to build a simple task manager using jquery, with three simple pieces of functionality: 1. List tasks 2. Edit task 3. Add task I got a rudimentary version of 1. working, with this code: <code> $.getJSON("/get_tasks", function(data){ $.each(data.results, function(i,item){ $('#tasks').append($('<li>').html(item.name)); }); </code> That's nice. Super simple. However, I wonder, as more features have to be added (for instance, adding "edit
[jQuery] jcarousel: how to count click next and previous
Hi, I begin to use jcarousel now, and I think it is verey very well maked. I am not so expert in js so I have a need: I have to external control for next and prevoius button and they scroll fine. I want to take count of next and previous so I think to a variable that take currPage + 1 for next and currPage - 1 for previous to use it to make visible on the page an object based on what page I am visiting in that moment. I hope to make you understand. I think I have to put this in the jcarousel class
[jQuery] How to post a parameter with multivalues in ajax that PHP can understand
Hi all, I have had a problem in making a post to my PHP server in ajax manner. My form has a selection box that an user can select multivalue. It means that I need to make a post to my server using a parameter that accept multivalues. Here is my code: $("#submit").click(function() { $.ajax({ type: "POST", url: "post_json.php", data: { message: 'help', id: 1, year: $('#year').val(), input: ['45', '34'] // This line is ok with Java
[jQuery] WYMeditor - WYSIWYM XHTML editor
how can i retrieve the data in the textarea using wysiwym editor? if im using the $_POST['remarks'] to get the value of the textarea using wysiwym editor, i get empty/blank. code: <link rel="stylesheet" type="text/css" media="screen" href="http:// 127.0.0.1/paccountants/assets/javascript/jquery/ui/wymeditor/wymeditor/ skins/default/screen.css" /> <script type="text/javascript" src="http://127.0.0.1/paccountants/ assets/javascript/jquery/ui/wymeditor/wymeditor/jquery.wymeditor.js"></ script> <script
[jQuery] WYMeditor - WYSIWYM XHTML editor
how can i retrieve the data in the textarea using wysiwym editor? if im using the $_POST['remarks'] to get the value of the textarea using wysiwym editor, i get empty/blank. code: <link rel="stylesheet" type="text/css" media="screen" href="http:// 127.0.0.1/paccountants/assets/javascript/jquery/ui/wymeditor/wymeditor/ skins/default/screen.css" /> <script type="text/javascript" src="http://127.0.0.1/paccountants/ assets/javascript/jquery/ui/wymeditor/wymeditor/jquery.wymeditor.js"></ script> <script
[jQuery] Basic JQuery paging with CodeIgnitor
Hi there, I'm wanting to code a very basic pagination service that works with, or without JavaScript switched on. I do not want to use a plug-in of any kind to solve this. Primarily, I want to understand what the $.ajax is supposed to be like when handing $_GET/$_POST variables. This is what I have and uses CodeIgnitor. This is not a code ignitor question, it is a Jquery question. I want to know what am I meant to do in the $.ajax bit because I am utterly confused about it and there is no clear-cut
[jQuery] livequery with validate????
Hi, Im using a project that use the livequery to keep the navigation in ajax... The problem is when I use the validate plugin together, Im having the problem when I try to make a validation after a page is loaded with load method... the links its ok, but I loose the ajax on submit, even with return false... I try to change the submit event in the source of validate, but still doesnt work... Any ideas???? Thanks all...
[jQuery] jQuery Noobie Question - Dragging examples
Hello list. After playing around with some jQuery draggable examples, I would like to know how you trap for the location of the new object? What I would like to do is create a site where the user has a list of files (word, text, excel, pdf) represented visually by a series of icons. Via their browser, I want them to be able to drag those icons to a 1 of multiple "rolodex" cards. Each rolodex card is simply a rectangle with a persons contact information on it. When dragged to this rolodex card, I
[jQuery] Firefox/Mac scrollbar bug on slide effects
http://lab.atomeye.com/ This only applies to Firefox on Macs. In the above example the first 'close' targets an element with 'overflow: auto;' and opens/closes it correctly. In the second example the element with 'overflow:auto' is nested and the scrollbar remains visible when the parent div closes. Is there an easy fix for this?
[jQuery] Dynamic form field changes aren't POSTed
I'm using JQuery to, among other things, dynamically create and modify form input elements in response to events. I've noticed though, that whenever I do this, any newly created inputs or changes to existing inputs don't make it through when the form is POSTed. Example: $(function(){ $("#someButton").click(function() { fieldCount = parseInt($("#fieldCount").val()); $("#fieldCount").val(fieldCount + 1); ......... I can see the value of my fieldCount field changing when
[jQuery] Less Js Routes
Rails people might be interested in this: http://code.google.com/p/lessjsroutes/ -cut- Have you ever wanted to use named routes in your JavaScript? So have I. Now you can. Less Js Routes will generate a JavaScript file with functions that give you the path to the route and functions that will call these routes using ajax (uses jQuery or Prototype). -cut- -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Ajax window in jqModal not loading javascript
Hello, I am using jqModal to load an html page that needs to include additional javascript files to run properly. Everything runs great on FF but IE6 and 7 aren't allowing my includes in the jqModal ajax window (or so it seems). I include the css for the window in my parent page and that works fine in both. Including the javascript files in the parent page for the jqModal window does not work for either browser. So I had included the javascript in the head of the ajax loaded html page like so: <head>
[jQuery] [OT] RegEx (preg_replace) search in PHP
Hi all, sorry for this OT, can you help me with this? I have this string "Text [ Trash ] Text [ Trash ] Text" I will have this "Text Text Text" What can i do? my stupid try: $news_desc = preg_replace ('![.+?]!is','',$news_desc); -- Viele Grüße, Olaf ------------------------------- olaf.bosch@t-online.de http://olaf-bosch.de www.akitafreund.de -------------------------------
[jQuery] invalid flag after regular expression ??
This is the first time I've posted in this group, hope I'm doing this correctly. I'm making an AJAX call from my page to score some data. It's happening all over the place elsewhere in the navigation... posting and getting, working fine, no problem. This one call though, my FireBug is complaining. I'm getting a "invalid flag after regular expression void(0</div></td>);" error and I'm now officially stymied, hoping another set of eyes and brains might help catch this. It's here when the $("#link_archiveDrafts").click(function()
[jQuery] Re[jQuery] sizing iframe
Hey guys, im looking to dynamically resize an iframe to fit properly into a page without scrolling. The iframe height is different page to page so the iframe needs to be able to get bigger or smaller. Theres a thread over on the http://drupal.org/node/180625 Drupal forums with the following code that claims to resize the iframe but unfortunetly we've not been able to get it to work. Does this code work or is there a better way to do it? We want to resize other websites pages so theres the cross domain
[jQuery] Traversing Speed / Multiple Binds
I have a few questions... I program in a modular enviroment. I develop modules that can be place on a by our users. It's possible for a user to place a module on a page twice, there by causing the jQuery for that particular module to be run twice. This generally causes clicks that toggle things to be run twice really fast (if two modules are on the page), thus it looks like nothing is happening. I fixed this by adding an unbind("click") just before the .click in my jQuery. I'm guessing this is the
[jQuery] Compressing your js files with Ant
Someone just sent me this link and I found the "Minify your JavaScript and CSS files" section enlightening. I've been using Ant more and more to deploy my applications - as well as making use of jQuery and it's related plugins. This seems like a great solution to having editable scripts in your repository but deploying minimized scripts to production. http://www.julienlecomte.net/blog/2007/09/11/building-web-applications-w ith-apache-ant/ Thanks, Jim
[jQuery] Better accordeon for my website.
Hello. I'd like to ask you how I could have an accordeon menu with standart effects (slideUp & slideDown) with the following option : - If I click on a submenu already visible, I don't want it to slide up and down (beautiluf but not useful) For the rest, I use : $(document).ready(function(){ $("#blogextra ul:not(:first)").hide(); $("#blogextra h2").click(function(){ $("#blogextra ul:visible").slideUp("slow"); $(this).next().slideDown("slow"); return false; }); $("#blogextra h2").mouseover(function
[jQuery] Getting PHP_REFERER value from jQuery
Hi, maybe someone can help me on this: I'm using jqModal plugin to open a form from different pages, that will end up sending a mail. Is there a way to know from which page the form was opened? something like the PHP_REFERER variable. Latter, when the mail is being prepared I can access the PHP variable with the right value, but I would like to be able to use that value before, while the form is being openned in order to add the name of the page into it. does it make sense? Thanks in advance!
[jQuery] How to change the focus date, on a inline UI Date Picker with simple links ?
How to change the focus date, on a inline UI Date Picker with simple links ? So, when I press a "next button", the calendar need to be updated to a specif date. I tries all possible situations that I know but no luck. The jQuery.datepicker._adjustDate function is not enoght or good. I know the date and I want to change the calendar focus to that date. Many thanks Cristian
[jQuery] jqmodal and thickbox problem in opera9.5 beta
hi ive tested opera 9.5 beta release on windows vista i think there is a problem with the css tag "position fixed". because if you have a scrolling page the overlay is fixed to top of the page if you scroll down the overlay ends... are there any fixes for this problem or is it an opera problem?
[jQuery] autocomplete - show all
I'm just starting to research autocomplete plugins. We have a case where in certain situations a user may not know enough about what they're looking for to successfully type a few characters and get close to the right result (unpredictable combinations of letters and numbers). In this case, we'd like there to be a way to scroll through the entire (long) list to find the right item. Perhaps they type a wildcard character like * Can this be done with either of the main jquery autocomplete plugins?
[jQuery] Firefox's back button stops working after using Thickbox
Hi, I use Thickbox to load a separated file into iframe. After clicking a few links in that file in the iframe and closing the Thickbox, my Firefox's back button stops working. How to get around this? Thanks, Channa
[jQuery] chainable ajax() - request
hello! I want to use the ajax() - method without losing the actual clicked object. do you have a solution for my problem? To give an example: ------------------------------------ $("a").click(function(){ // now I have the possibility to use load, but I need the ajax - method, because I don't want to add anything into the clicked object, I want to load a script... $(this).load("ajax.php", {var = lala} , function(){...}); // ... with this method I could get "this" /* $.ajax({ type: "POST",
[jQuery] PROBLEM: Adding hover to table rows on large tables
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Arial">The following code works fine on small tables: $("table tbody tr").mouseover(function(){$(this).addClass("over");}).mouseout(function(){$(this).removeClass("over");}); But on tables with 5,000-10,000 rows, it throws the "A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger,
[jQuery] additional events
hey, my problem: with the following code I put a TR in my table. in this TR I have further (".button_plus") - elements. I want that the user is able to click on these further elements. how could I realize that? $(document).ready(function() { $(".button_plus").click(function() { $(this).load( "ajax.php", {template: "testTR"}, function(output){ $(this).parent().parent().after(output); styleTables(); } ) }); }); //ajax.php returns this:
[jQuery] New Plugin jQuery.Rule
Hi, I was needing something to manage css rules and stylesheets.. I looked around and didn't find much. I saw <a href="http://www.mail- archive.com/discuss@jquery.com/msg05598.html" target="_blank">this</a> post of Brandon, which gave me a few tips. In the end, I decided to make my own plugin for this. It's meant to be as similar to jQuery as possible, meaning the rules are managed using jQuery's way to handle nodes. It includes, chaining, iteration using each, selectors, and many other functions
[jQuery] How to get an html page not knowing its address
First of all I want to apologize with all devs out there for my questions. I am sure that solution will be easy but I am just a designer, so I am a moron with Javascript... The problem is that I need to put some html code into a div (#footer- navbar) getting the html code from a page of which I already know its hierarchy (clients/clickadvisor-02/snippets/footer-navbar.html) but of which I don't know its domain (http://www.I_DONT_KNOW_THIS.COM). I tried to create a script with jQuery like this: jQuery('#footer-navbar').html(function
[jQuery] handle trigger return value
Hi folks, I'm developing a plugin (my first evel jQuery plugin), and I want to capture the return value from a user function, bound to event. Basically, what I want is to be able to undo the event - like returning false in a link click will now follow the link. Here is some code: // in the plugin self.click(function () { var return_value = self.trigger('action', [currentProgress])); if (!return_value) undo(); }); // userland $('#item').bind('action', function () { return window.confirm('Sure?');
[jQuery] Major Problem With Dom Traversal
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Arial">Working on a page with a table of about 10,000 rows and 30 div's, the following takes about 5 seconds.... $("div.siteWidth").css("width", modifiedW); What am I doing wrong? How can the table be bypassed? </font> </body> </html>
Next Page