[jQuery] Filter list, not table
I have found many nice filter plugins, that let you filter a table, and hide the rest of the items, and only show the item that matches what was entered into an input dialog. What I would like to do, is use an unordered list instead. Is there any plugins that support this? I have not been able to find any..
[jQuery] Re: $.css() class setting in Internet Explorer
Just a note - that page is a bit misleading. There's a section labeled "Other JavaScript Keywords" that lists all sorts of DOM object properties. But none of these are actually reserved words in the way that, say, "class" is. IOW, you wouldn't need to quote them if you used them as object literal property names. -Mike > From: Karl Rudd > > JavaScript has quite a few "unused" (well many are used in > the upcoming versions) keywords. You can't use these words as > keys without putting quotes around them. List of keywords here: > > http://www.quackit.com/javascript/javascript_reserved_words.cfm
[jQuery] Re: completely resetForm
I already am, which doesn't reset it completely. Thank you though. Hopefully Jörn will know what I'll need to do :D
[jQuery] Re: Cross domain problems
I have determined that the error was from a different script. Sorry about the confusion. After working on the document.domain I could not get it to work/help. The load statement would just not return any result. The solution that Jeffery offered above worked like a champ. Thanks for all your help. On Jul 9, 11:56 am, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote: > I had this same problem, which I solved by parsing the window.location.href > prior to making the ajax call, based on the current host used to access the > site. > > var url = /(https?:\/\/[^\/]+)/.exec(window.location.href)[1] + > '/pathtomyresource'; > > JK > > -Original Message- > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of Erik Beeson > Sent: Wednesday, July 09, 2008 9:33 AM > To: jquery-en@googlegroups.com > Subject: [jQuery] Re: Cross domain problems > > The protocol *must* be the same (if the page ishttps://.../then the > ajax request must also be tohttps://.../). > > The port *must* be the same. > > The host name *must* have the same SLD [1], and if the subdomains are > different, document.domain *must* be set to the SLD. > > I'm certain that this can work as I do it all the time. If you're > still having trouble, could you create a page that demonstrates the > problem? > > --Erik > > [1]http://en.wikipedia.org/wiki/Second-level_domain > > On 7/9/08,flycast<[EMAIL PROTECTED]> wrote: > > > I tried setting document.domain = 'site.com'; > > It works with a domain of site.com but notwww.site.com. I now get the > > following message: > > > [Exception... "'Permission denied to call method XMLHttpRequest.open' > > when calling method: [nsIDOMEventListener::handleEvent]" nsresult: > > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" > > data: no] > > > This seems to be a different problem. > > > BTW...here is a Mozilla link to the issue of cross domain and the use > > of > > document.domain:http://www.mozilla.org/projects/security/components/same-origin.html > > > On Jul 9, 1:30 am, Alexsandro_xpt <[EMAIL PROTECTED]> wrote: > > > Well, I thought this is security browser issue. > > > > I always solve this problem this way: > > > Eg.: > > > > To ajax this:http://feedproxy.feedburner.com/undergoogle > > > > I create > this:http://blog.alexsandro.com.br/application/load/feedproxy.feedburner.c.. > . > > > > -- > > > Alexsandrowww.alexsandro.com.br > > > > On 9 jul, 00:18, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > > > > > Add this somewhere in your javascript: > > > > > document.domain = 'site.com'; > > > > > Google document domain > > > > > --Erik > > > > > On 7/8/08,flycast<[EMAIL PROTECTED]> wrote: > > > > > > Simple problem (I think)... > > > > > > I am new to JS and ajax. > > > > > > I am building an ajax capability on a clients site. I am running > into > > > > > cross domain problems. If I get the page using the url > formhttp://www.site.com > > > > > but I do a load using the url form "http://site.com"; (www vs. no > www > > > > > in the url) I get nothing but a js error. > > > > > > What is the best way to handle making sure that if the person is > at > > > > > the site with OR without the "www" in the url that the .load will > > > > > still work?
[jQuery] Problem on Creating Two Instances of FlexiGrid
Hi All, I'm using two instances of FlexiGrid in a page and I'm encountering the below error on the pagination stat: Page of [object Object] What do you think causes the error? By the way this error appears only on FF. It is not displaying on IE but still there is an error (records doesn't appear). Thanks, Nimrod
[jQuery] Re: Problem with Cycle plugin using random and previous
> Here's a link to an example: > > http://www.udmercy.edu/apply/ > > You'll see that the div blocks cycle in randomized order (and it looks > very nice), but if you use the next/previous links, they will advance > to the next div as ordered in the HTML, not as they appeared in the > random order. > > (The divs are ordered by alphabetical school then by alphabetical > name.) > > Using jquery 1.2.2, and cycle 2.22. > > Thanks! > Jon > > (And again, sorry for the reposts!) > > On Jul 7, 11:43 am, Jon Whitener <[EMAIL PROTECTED]> wrote: > > > I've come across aproblemwith Mike Alsup's very goodCycleplug-in. > > This occurs when using both therandomfeature and a "previous" link. > > "Previous" will go to thepreviousitem as it is ordered in the HTML, > > regardless of what appeared previously to the user in therandomorder. > > > For example, if I have elements to be cycled which appear in the page > > code in this order: > > > A, B, C > > > But when randomized appear to the user in this order: > > > A, C, B > > > Then, if the user clicks the "Previous" link with B showing, thecycle > > will go to A, not C as the user would expect. > > > Is there any way to achieve the expected behavior? > > > Many thanks, > > Jon So are you saying you want the 'next' image to be random, but the 'prev' image to be that actual previous image (for any number of clicks on the prev link)? Do I have that right?
[jQuery] jQuery and IE8 beta
I've tested a site I'm working on in IE6, IE7, and IE8beta, and it works good in IE6 and 7, but doesn't work at all in IE8beta. Any ideas why? I'm using fade effects primarily.
[jQuery] Re: BlockUI and FF3
On Jul 9, 8:06 pm, Marcus Eby <[EMAIL PROTECTED]> wrote: > I can't unfortunately, its a private app. But I'll post some of the > surrounding HTML code. Not sure if you posted enough code to show the problem, but it seems to work fine for me: http://www.malsup.com/jquery/block/test/marcus.html Maybe you could create a very small demo page that shows the problem?
[jQuery] Re: BlockUI and FF3
I can't unfortunately, its a private app. But I'll post some of the surrounding HTML code. Loud Party lock delete close Member Since: Mar 16, 2005 Posts: 18 Last On: Dec 22, 2007Suite: 203 Posted: Sat, Sep 22nd, 2007 3:38am Name: Wayne Smith & Liz MillerPhone: 604.605.3101 <-- This is the DIV that is chosen, but the first DIV is blocked reply edit email lock The residents of suite 1601 had a party in the lounge on Friday night, Sept. 21 and the level of the music became unacceptable between 8:30 and 9 PM. Wayne Smith and Liz Miller Member Since: Mar 20, 2006 Posts: 24 Last On: Jun 24, 2008Suite: Property Mgr. Posted: Mon, Sep 24th, 2007 10:18am Name: Brian CarletonPhone: 604-683-8399 (x223) reply edit email lock delete Thank you for your detailed report. We will follow up with the owners on this issue. Marcus
[jQuery] Re: IE6, cycle all plugin, and object doesn't support this property or method
Did you fix this error? It is happening to me because of other jquery plugins on the page which sucks. On May 14, 11:11 am, hubbs <[EMAIL PROTECTED]> wrote: > I am using thecycleallplugin, and I am wanting to make the site > work in IE6. Of course it works in every other browser. But IE6 it > does not work at all, and I get the "object doesn't support this > property or method"error, for the following code: > > $(function() { > // run the code in the markup! > $('#s4').before('').cycle({ > fx: 'fade', > speed: '2000', > timeout: 7000, > pager: '#nav', > pause: 1 > }); > > }); > > Why would IE6 be throwing anerror? And what would be causingcycle > all to not work at all?
[jQuery] Re: $.css() class setting in Internet Explorer
JavaScript has quite a few "unused" (well many are used in the upcoming versions) keywords. You can't use these words as keys without putting quotes around them. List of keywords here: http://www.quackit.com/javascript/javascript_reserved_words.cfm Karl Rudd On Thu, Jul 10, 2008 at 6:45 AM, cj5 <[EMAIL PROTECTED]> wrote: > > Don't know if this is been addressed here, yet, but I discovered a > really tedious syntax issue with IE and the css() method in JQuery. > Basically, this error never comes up in Firefox or any Mozilla-based > browser for that matter, but in IE JavaScripts will fail when you do: > > $('div').css({class: 'my-class-name'}); > > You simply need to make sure that class is enclosed in quotes > > $('div').css({'class': 'my-class-name'}); > > I would guess that IE reserves "class" in javascript, so it just bombs > out when included in an object. >
[jQuery] Re: Combining Animation Methods: fadeOut and slideUp
On Jul 9, 2008, at 5:19 PM, Joe wrote: Karl's tuts are priceless. Definitely read up on those. Helped me many a time. Wow. Thanks, Joe. You just made my day. :-) --Karl Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: BlockUI and FF3
> I've got a small problem with BlockUI > In FF3 it seems to be always choosing the parent DIV to block and not > the one I give it. > And SURPRISE something is actually working properly in IE. ACK!!! > > So for now, its just a FF bug. > > The code is: > var fan1 = $(bObj).parents(".post:first"); > alert(fan1.length); > $(fan1).block({message:null,overlayCSS: { > backgroundColor: > '#fff' } }); > The alert tells me that the length is 1, and when I ask for the ID its > the correct child DIV. > > However the BLOCK happens in this divs PARENT. > > The parent DIV in FF is blocked. > > Anyone else experienced similar? > > Thanks > > Marcus Can you post a link, Marcus?
[jQuery] Re: Star Rating Plugin
Hi Diego and thanks for this plugin, I've used your script in a plugin for a cms called SPIP (spip.net). Everythings work nice but i've got only one little bug when the rating form is submitted by ajax. In this case the hover class of the star isn't disapplied whith the mouseout event (line 162 of the star rating script). Have you eard about this kind of problem ? Do you know how i could fix it ? Thanks again for this great script Diego A. a écrit : > Announcement to anyone using this plugin: > > - MAJOR BUG FIXES: > - - split stars did not work in hidden layers > - - now works without dimensions plugin > > - New documentation > - Documentation can be downloaded (works off-line just as it does > online)
[jQuery] Re: 'nodeName' is null or not an object
In the end, I decided to use the ajax method, to give me the access to html to play about with. I got what I wanted with 1 ajax call: $('.ajaxdropdown').change(function(){ $.ajax({ type: "GET", url: "myscript.php", data: "c_name="+escape($(this).val()), success: function(html){ $("#charges-gsm").html(html); $("#charges-gsm-faq").html(html); $("#charges-gsm-prices").html(html); } }); }); On Jul 9, 5:20 pm, Carl Von Stetten <[EMAIL PROTECTED]> wrote: > You might try adding the .each() function before your .load() call. > > Carl > > Pickledegg wrote: > > its 'c_name'. > > > I've discovered something now, if I just use 1 div as the selector to > > update only 1 div, > > > $('#charges-gsm) > > > it works fine. But when I add multiple ones: > > > $('#charges-gsm,#charges-gsm-faq,#charges-gsm-prices') > > > thats when I get the error...I know that the divs exist and it works > > in FF, but why not IE? > > > On Jul 9, 4:31 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > >>> I have the following code that loads on $(document).ready: > > >>> - > >>> $('.ajaxdropdown').change(function(){ > >>> $('#charges-gsm, #charges-gsm-faq, > >>> #charges-gsm-prices').load('/ > >>> mobell/includes/html/gsm-tariff.php?c_name='+escape($(this).val())); > >>> - > > >>> Its pretty self explanatory, but to summarise I have three divs on my > >>> page - (#charges-gsm, #charges-gsm-faq & #charges-gsm-prices) which > >>> update with the content of the ajax load. > >>> The trigger for this event is from dropdowns on the page, which have > >>> the class '.dropdown'. > > >>> All works well in Firefox & Safari, but in IE (6&7) I get no content > >>> in my divs and the following error: > > >>> 'nodeName' is null or not an object > > >>> I've narrowed it down to the line that mentions .ajaxdropdown, so I > >>> think its because IE is having trouble finding the element, but I've > >>> tried putting other selectors in instead of .ajaxdropdown, and its the > >>> same error. > > >>> Can anyone see why it may be happening? Thank you. > > >> What is the "name" attribute of the .ajaxdropdown element?
[jQuery] BlockUI and FF3
I've got a small problem with BlockUI In FF3 it seems to be always choosing the parent DIV to block and not the one I give it. And SURPRISE something is actually working properly in IE. ACK!!! So for now, its just a FF bug. The code is: var fan1 = $(bObj).parents(".post:first"); alert(fan1.length); $(fan1).block({message:null,overlayCSS: { backgroundColor: '#fff' } }); The alert tells me that the length is 1, and when I ask for the ID its the correct child DIV. However the BLOCK happens in this divs PARENT. The parent DIV in FF is blocked. Anyone else experienced similar? Thanks Marcus
[jQuery] BlockUI and FF3
I've got a small problem with BlockUI In FF3 it seems to be always choosing the parent DIV to block and not the one I give it. And SURPRISE something is actually working properly in IE. ACK!!! So for now, its just a FF bug. The code is: var fan1 = $(bObj).parents(".post:first"); alert(fan1.length); $(fan1).block({message:null,overlayCSS: { backgroundColor: '#fff' } }); The alert tells me that the length is 1, and when I ask for the ID its the correct child DIV. However the BLOCK happens in this divs PARENT. The parent DIV in FF is blocked. Anyone else experienced similar? Thanks Marcus
[jQuery] Re: UI Tabs and Mootools.js conflict, Advice Needed
Try: ... jQuery.noConflict(); jQuery(function() { jQuery('#container-1 > ul, '#container-2 > ul, '#container-3 > ul').tabs({ fx: { opacity: 'toggle' } }); }); ... Note that I've condensed the three similiar tabs initializations into one - this is not related to your problem but just a hint how to shorten your code and avoid redundancy. --Klaus Mike wrote: > Hello Everyone, > > Thank you for taking the time to read this message. I am attempting to > use mootools with UI Tabs and I am having a conflict. Basically, only > the last one to load (closest to the tag) is working. I have > tried to use the tutorial here > http://docs.jquery.com/Using_jQuery_with_Other_Libraries > but I am afraid I am all thumbs when it comes to interpreting > javascript. Here is my current script (I have removed all my attempts > to fix using the aforementioned tutorial). > > > > media="print, projection, screen"> > > > > $(function() { > $('#container-1 > ul').tabs({ fx: { opacity: > 'toggle' } }); > $('#container-2 > ul').tabs({ fx: { opacity: > 'toggle' } }); > $('#container-3 > ul').tabs({ fx: { opacity: > 'toggle' } }); > > }); > > > > > > > > How do I need to alter this in order for these to work properly? > Thanks very much, any advice is extremely appreciated. > > Sincerely, > Mike
[jQuery] Re: JSONP - not using PHP - having problems
Ok nevermind I figured it out. So the html file should just contain "myfunction({"json":"object"})" and the html page catching should have $.getJSON("http://www.simplifieddesign.biz/jsonTest.html? myfunction=?"); function myfunction(data){ alert(data.json); // displays "object" } Make sure you have "?yourFunctionName=? where yourFunctionName is the name of the sending html files javascript function name. That was my problem. Thanks On Jul 9, 3:48 pm, Wes Duff <[EMAIL PROTECTED]> wrote: > Hello, > I have read over almost every post in this group and still cannot > figure this out. I am sure it has to do with the way I am creating my > JSON object. > > Here is the file I am broadcasting the file > from.http://www.simplifieddesign.biz/jsonTest.html > > The source does not include any or > just the json > > I did have var jsonObject = {"object1" : "test", "object2" : "test2"} > > and > > var jsonObject = ({"object1" : "test", "object2" : "test2"}) > > Onhttp://example.com/develop/wduff/cols/default.html > I have this script in the header > > $.ajax({url: "http://www.simplifieddesign.biz/jsonTest.html";, > dataType: "jsonp", > success: function(data, > textStatus) { > alert(data.object1); > }, > error: function(xhr, ts, err){ > alert('error' + err); > } > }); > > > /*$.getJSON("http://www.simplifieddesign.biz/jsonTest.html? > callback=?",function(json){ > alert("JSON DATA"); > }); > */ > > As you can see I am trying both ways. Really I guess they are the > same. > I tried to put the same alert on both tries and it didnt work then I > tried just calling an alert and the basic string alert does not even > pull up. > > Any help would be appreciated. Thanks
[jQuery] Thickbox; New close button and remove close when click off window
Hi all, Two part question: We are using thickbox for an 'Add to shopping basket' modal window. There are two buttons in the thickbox window; one for adding the product to the basket and the second button ('Return to shopping') which closes the thickbox window. I am removing the "Close"/Esc bar at the top per my company's wish. I am new with javascript and need to be able to have that 'Return to shopping' button close the thickbox window. Any easy way to accomplish this? Also, when clicking outside of the thickbox window currently and by default the thickbox window closes. I need to disable that so the only way to close the window is using the "Return to Shopping" button. Thank you for any help, David
[jQuery] $.css() class setting in Internet Explorer
Don't know if this is been addressed here, yet, but I discovered a really tedious syntax issue with IE and the css() method in JQuery. Basically, this error never comes up in Firefox or any Mozilla-based browser for that matter, but in IE JavaScripts will fail when you do: $('div').css({class: 'my-class-name'}); You simply need to make sure that class is enclosed in quotes $('div').css({'class': 'my-class-name'}); I would guess that IE reserves "class" in javascript, so it just bombs out when included in an object.
[jQuery] Re: Ho to remove or add a new table row?
Yavuz, That's because view source only shows the HTML as it was originally loaded. It does not show any DOM changes that may have been made after the page was initially loaded. If you have Firefox, and install the Developer Toolbar, the View Source pulldown on the toolbar offers "View Generated Source", which will show you exactly what your source looks like with any DOM changes included. Even better, the FireBug plugin for Firefox allows you to look at the source, and even watch it change in real time as your javascript manipulates the DOM. Carl Yavuz Bogazci wrote: > I seems to work, but when i show the page-source i cant see the new > rows. But they are visible in the browser. Its very strange. > > On Jul 9, 5:31 pm, "..:: sheshnjak ::.." <[EMAIL PROTECTED]> wrote: > >> You can easily remove any row that you selected, only question is if >> you can select apropriate rows. >> >> $("table tr").remove(".remove"); // removes any table rows that >> have class="remove" >> >> or like this >> >> $("table tr").filter(":contains(unwantedText)").remove();// >> removes any row containing string "unwantedText" >> >> Only thing you have to watch is that your query is TR element (that >> was your problem, right?). >> If you filter by some other condition, for example children elements, >> then do this: >> >> $("table tr a.remove").parent().remove();// query is A tag with >> class="remove", so you escape it with .parent() >> >> Same thing goes with adding rows, just use .after("Insert this >> row") or .before("Insert this row") methods. >> > > >
[jQuery] Filter select options values as you type
I´m looking for a plugin that filters the mached values of a select element. It´s something like Live Search plugin that´s John´s posted in his blog, but instead of filtering a list, it filters the options from a select element. There´s anything like this? If there´s not, what should I aim for and what should I do to develop something like this? Thank you very much :)
[jQuery] Re: Combining Animation Methods: fadeOut and slideUp
Karl's tuts are priceless. Definitely read up on those. Helped me many a time. I would say if you wanted to do one after the other, you could do it as a callback function after the current function had completed, but that seems counterintuitive as you don't want to slide something up after it's been faded out: $('#someElement').fadeOut('slow',function(){ $(this).slideUp('fast'); }); On Jul 9, 4:05 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi there, > > I wrote a tutorial on Learning jQuery about how to create a slide-fade > toggle animation plugin: > > http://www.learningjquery.com/2008/02/simple-effects-plugins > > If you don't want to create a plugin, you can just use the .animate() > method: > > $('something').animate({opacity: 'hide', height: 'hide'}, 'fast'); > > Hope that helps. > > --Karl > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Jul 9, 2008, at 4:29 PM, JipThePeople wrote: > > > > > Is it possible to execute both a fadeOut() as well as a slideUp() > > methods on an object? If so, what is the syntax? Any feedback will be > > greatly appreciated. > >
[jQuery] Re: newbie jquery / jfeed question
I would start by trying to get something going, and see what you learn/achieve (you may even just advance straight to accomplishment) jQuery.getFeed({ url: 'http://blog.novaconnection.com/syndication.axd', success: function(feed) { alert(feed.title); } }); the information here is quite clear http://www.hovinne.com/blog/index.php/2007/07/15/132-jfeed-jquery-rss-atom-feed-parser-plugin 2008/7/9 desmo <[EMAIL PROTECTED]>: > > I've been advised that jquery and jfeed is the best way of putting an > rss link on my web page (novaconnection.com) > > The feed is to come from my new and currently under-populated blogsite > (blog.novaconnection.com). The feed file is > http://blog.novaconnection.com/syndication.axd. > > I am not knowingly guilty of having done much in java but have done a > little html - I did my website from a template which I modified quite > a bit. > > I would really appreciate a step by step muppet's guide on how to > insert the rss feed on my webpage. > > Can anyone help or point me to something mono-syllabic which I might > understand? > > Thanks in advance > > Desmo >
[jQuery] Re: Combining Animation Methods: fadeOut and slideUp
Hi there, I wrote a tutorial on Learning jQuery about how to create a slide-fade toggle animation plugin: http://www.learningjquery.com/2008/02/simple-effects-plugins If you don't want to create a plugin, you can just use the .animate() method: $('something').animate({opacity: 'hide', height: 'hide'}, 'fast'); Hope that helps. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 9, 2008, at 4:29 PM, JipThePeople wrote: Is it possible to execute both a fadeOut() as well as a slideUp() methods on an object? If so, what is the syntax? Any feedback will be greatly appreciated.
[jQuery] Re: autocomplete - new matchContains option
Bah... I put [autocomplete] at the beginning of the title, but it must have been parsed out thanks to the brackets or something. Sorry for the confusing title that resulted. They need a preview button :) On Jul 9, 2:56 pm, Aaron Barker <[EMAIL PROTECTED]> wrote: > I just wanted to toss out a new feature we added to our local copy. > > A little history... We are using the autocomplete for a country list > (205 items). We got a lot of feedback from users that it was > confusing to type "U" when looking for united states and have 50+ > results show up because we had matchContains:true. My first thought > was to tell them to remove matchContains, but the response was that > it's good to have for when searching for countries like "Democratic > Republic of Congo" which is the official name, but you'd probably > search for "Congo" to find it (there is a "Republic of Congo" as well > so, we can't just chop off the words at the start). > > The resolution we came up with was to limit the match to the start of > each word. It's rare you would actually want to match in the middle > of a word so we figured this was the happy medium between > matchContains being on or off. > > So we added a matchContains:"word" option > > function matchSubset(s, sub) { > if (!options.matchCase) > s = s.toLowerCase(); > var i = s.indexOf(sub); > // begin addition > if(options.matchContains == "word"){ > var regex = "\\b"+sub.toLowerCase(); > var i = s.toLowerCase().search(regex); > } > // end addition > if (i == -1) return false; > return i == 0 || options.matchContains; > }; > > I'm sure someone will easily point out a way to do it better or has a > better regex, and I'd love to see what it is. I'd also love to see > this in the main script so I don't have to maintain a separate one, > but can naturally understand if it isn't in the scope of the plugin. > > Again, I'm definitely open to better ways to do this... so bring it > on! > > Aaron Barker
[jQuery] Re: Yahoo Mail-like "Select All" check box (???)
This should clear out the "Select All" whenever one of the checkboxes is clicked/changed $(':checkbox').change(function() { document.getElementById('selectAll').checked = false; });
[jQuery] [autocomplete] new matchContains option
I just wanted to toss out a new feature we added to our local copy. A little history... We are using the autocomplete for a country list (205 items). We got a lot of feedback from users that it was confusing to type "U" when looking for united states and have 50+ results show up because we had matchContains:true. My first thought was to tell them to remove matchContains, but the response was that it's good to have for when searching for countries like "Democratic Republic of Congo" which is the official name, but you'd probably search for "Congo" to find it (there is a "Republic of Congo" as well so, we can't just chop off the words at the start). The resolution we came up with was to limit the match to the start of each word. It's rare you would actually want to match in the middle of a word so we figured this was the happy medium between matchContains being on or off. So we added a matchContains:"word" option function matchSubset(s, sub) { if (!options.matchCase) s = s.toLowerCase(); var i = s.indexOf(sub); // begin addition if(options.matchContains == "word"){ var regex = "\\b"+sub.toLowerCase(); var i = s.toLowerCase().search(regex); } // end addition if (i == -1) return false; return i == 0 || options.matchContains; }; I'm sure someone will easily point out a way to do it better or has a better regex, and I'd love to see what it is. I'd also love to see this in the main script so I don't have to maintain a separate one, but can naturally understand if it isn't in the scope of the plugin. Again, I'm definitely open to better ways to do this... so bring it on! Aaron Barker
[jQuery] JSONP - not using PHP - having problems
Hello, I have read over almost every post in this group and still cannot figure this out. I am sure it has to do with the way I am creating my JSON object. Here is the file I am broadcasting the file from. http://www.simplifieddesign.biz/jsonTest.html The source does not include any or just the json I did have var jsonObject = {"object1" : "test", "object2" : "test2"} and var jsonObject = ({"object1" : "test", "object2" : "test2"}) On http://example.com/develop/wduff/cols/default.html I have this script in the header $.ajax({url: "http://www.simplifieddesign.biz/jsonTest.html";, dataType: "jsonp", success: function(data, textStatus) { alert(data.object1); }, error: function(xhr, ts, err){ alert('error' + err); } }); /*$.getJSON("http://www.simplifieddesign.biz/jsonTest.html? callback=?",function(json){ alert("JSON DATA"); }); */ As you can see I am trying both ways. Really I guess they are the same. I tried to put the same alert on both tries and it didnt work then I tried just calling an alert and the basic string alert does not even pull up. Any help would be appreciated. Thanks
[jQuery] Yahoo Mail-like "Select All" check box (???)
I'm on my first week of learning jquery and I'm totally hooked. I'm converting/condensing a lot of my JavaScript to use jquery in my project I'm working on. But now I have an issue, albeit, not an urgent one. I read a blog post a while ago on some blog I can't remember, where the person explained how to make a better "Select-All" check box, like the one in Yahoo Mail. I figured out how to get the select-all to work with the code below. $(function () { $('#selectAll').bind('click', selectAll); }); function selectAll(e) { $(':checkbox').each(function() { this.checked = e.target.checked; }); } When I click the "Select-All" check box, all the child check boxes are checked. Now what I'd like is if one of the child check boxes are un- checked then the "Select-All" check box is unchecked. Basically, the same behavior you see in Yahoo Mail. If anyone has any idea on how to accomplish this, or have a reference to an article describing how to do this, I'd really appreciate if you'd pass it on.
[jQuery] newbie jquery / jfeed question
I've been advised that jquery and jfeed is the best way of putting an rss link on my web page (novaconnection.com) The feed is to come from my new and currently under-populated blogsite (blog.novaconnection.com). The feed file is http://blog.novaconnection.com/syndication.axd. I am not knowingly guilty of having done much in java but have done a little html - I did my website from a template which I modified quite a bit. I would really appreciate a step by step muppet's guide on how to insert the rss feed on my webpage. Can anyone help or point me to something mono-syllabic which I might understand? Thanks in advance Desmo
[jQuery] validation without a form
Hey I need a validation plugin which I can use without a form tag. I have a CMS that removes form tags from my html on rendering because it have a build in form builder. Therefore I need to catch a div element instead of a form tag. Any ideas?
[jQuery] Re: Problem with Cycle plugin using random and previous
Here's a link to an example: http://www.udmercy.edu/apply/ You'll see that the div blocks cycle in randomized order (and it looks very nice), but if you use the next/previous links, they will advance to the next div as ordered in the HTML, not as they appeared in the random order. (The divs are ordered by alphabetical school then by alphabetical name.) Using jquery 1.2.2, and cycle 2.22. Thanks! Jon (And again, sorry for the reposts!) On Jul 7, 11:43 am, Jon Whitener <[EMAIL PROTECTED]> wrote: > I've come across aproblemwith Mike Alsup's very goodCycleplug-in. > This occurs when using both therandomfeature and a "previous" link. > "Previous" will go to thepreviousitem as it is ordered in the HTML, > regardless of what appeared previously to the user in therandomorder. > > For example, if I have elements to be cycled which appear in the page > code in this order: > > A, B, C > > But when randomized appear to the user in this order: > > A, C, B > > Then, if the user clicks the "Previous" link with B showing, thecycle > will go to A, not C as the user would expect. > > Is there any way to achieve the expected behavior? > > Many thanks, > Jon
[jQuery] Re: Ho to remove or add a new table row?
Thank you very much! I will try it now and give you feedback! Thanks Yavuz On Jul 9, 5:31 pm, "..:: sheshnjak ::.." <[EMAIL PROTECTED]> wrote: > You can easily remove any row that you selected, only question is if > you can select apropriate rows. > > $("table tr").remove(".remove"); // removes any table rows that > have class="remove" > > or like this > > $("table tr").filter(":contains(unwantedText)").remove();// > removes any row containing string "unwantedText" > > Only thing you have to watch is that your query is TR element (that > was your problem, right?). > If you filter by some other condition, for example children elements, > then do this: > > $("table tr a.remove").parent().remove();// query is A tag with > class="remove", so you escape it with .parent() > > Same thing goes with adding rows, just use .after("Insert this > row") or .before("Insert this row") methods.
[jQuery] Re: Ho to remove or add a new table row?
I seems to work, but when i show the page-source i cant see the new rows. But they are visible in the browser. Its very strange. On Jul 9, 5:31 pm, "..:: sheshnjak ::.." <[EMAIL PROTECTED]> wrote: > You can easily remove any row that you selected, only question is if > you can select apropriate rows. > > $("table tr").remove(".remove"); // removes any table rows that > have class="remove" > > or like this > > $("table tr").filter(":contains(unwantedText)").remove();// > removes any row containing string "unwantedText" > > Only thing you have to watch is that your query is TR element (that > was your problem, right?). > If you filter by some other condition, for example children elements, > then do this: > > $("table tr a.remove").parent().remove();// query is A tag with > class="remove", so you escape it with .parent() > > Same thing goes with adding rows, just use .after("Insert this > row") or .before("Insert this row") methods.
[jQuery] Combining Animation Methods: fadeOut and slideUp
Is it possible to execute both a fadeOut() as well as a slideUp() methods on an object? If so, what is the syntax? Any feedback will be greatly appreciated.
[jQuery] AutoComplete > How to define values?
Hello, I am using JQuery AutoComplete. Can I use some words that are in my HTML code? I am putting the words there using inline server side code. Or should I use JSon? Thanks, Miguel
[jQuery] Re: 1.2.4 to 1.2.6 question
It was that other post that jogged my memory as well. Yes, I have an older version of prototype and scriptaculous on that site, but there is really no point for me to upgrade that with any potential problems with it. The plan is to eventually convert that autocomplete anyway. I'm debating on how long to wait. I've used Jörn's script, but now they're converting it to use with UI. They've made some pretty significant changes to the code and until the documentation catches up, I'm not sure what I'd have to change in my stuff. So do I convert now to the version of Jörn's script that I have or wait until it's fully complete for the next UI version? For now, I'm just pointing to jQuery 1.2.4 which isn't having the conflict with prototype. On Jul 8, 8:40 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi Shelane, > > I just had major issues today adding some jQuery (1.2.6) to an old > site that has legacy Prototype code. This has come up a few times > before on the list, but I totally forgot about that while I was in the > midst of my agony. If I recall correctly, the conflict only occurs > with certain versions of Prototype. > > I got around my particular issue by calling the same function > separately on two IDs instead of calling it just once with both IDs in > a single selector. Maybe Prototype is doing something funky to the > arrays that jQuery selectors build? I don't know. > > I wonder if Ariel's suggestion from a previous post on the dev list -- > "If you upgrade Scriptaculous to 1.8.1, it should work well" -- would > apply here as well. > > > > Aha! Michael Geary explains it here: [1] > > > > > Your page is loading script.aculo.us effects.js v1.7.1_beta3. This > > file > > defines Array.prototype.call as a function. > > > That causes massive confusion inside jQuery 1.2.6, but not in 1.2.3. > > The > > reason is the change that was made to jQuery's makeArray() function > > in 1.2.6 > > - if the code is passed an array that has a call method, it mistakenly > > thinks it is not an array and does the wrong thing - line 1135 of > > jquery-1.2.6.js is the pertinent code here. (The correct fix isn't > > immediately obvious, but I'll file a ticket on this.) > > > As it happens, the current version of script.aculo.us effects.js, > > v1.8.1, no > > longer defines Array.prototype.call. > > [1]http://groups.google.com/group/jquery-en/browse_thread/thread/5a83b3b... > > Anyway, thanks for jogging my memory with your post. Maybe I'll > revisit my code in the morning and see if I can upgrade prototype and > get a less hacky solution going. > > --Karl > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Jul 8, 2008, at 5:27 PM, Shelane wrote: > > > > > It looks like the problem has to do with me still having prototype on > > the page. It's the first jQuery site I ever did and the autocomplete > > plugin wasn't far enough along for me to use at that point. I've > > pointed to an older version of jQuery until I get around to rewriting > > that page to use the jQuery autocomplete. > > > On Jul 8, 1:39 pm, Shelane Enos <[EMAIL PROTECTED]> wrote: > >> I just found out that this function that worked (doubled checked to > >> confirm) > >> worked under 1.2.4 but isn't working under 1.2.6. I'm not sure > >> what. Can > >> anyone see anything obvious? > > >> bindDeleteLinks = function(who){ > >>$("a.rembtn", '#' + who).unbind('click'); > >>$("a.rembtn", '#' + who).click(function(){ > >>console.log('bound and clicked ' + who); > >>$(('#' + this.id + 'row')).css({display:'none'}); > >>$.get('includes/tools/runtime.lasso?task=meetings&who=' > >> + who + > >> '&method=remove&pageID=' + pageID + '&rel=' + this.id); > >>return false; > >>}); > >>} > > >> Under 1.2.6, the console message doesn't even show.
[jQuery] Re: Star rating plugin + rails
I figured this out, just in case anyone else has the same problem. The issue revolves around brackets [ ] not being allowed in css class names. The plugin takes the name of the field and uses it to generate a class name of the form "star_group_yourfieldnamehere" so with a rails form field, you'd end up with a class name like: star_group_mymodel[myfield] which is an illegal css class name. I fixed this by changing the following code: var n = this.name; to this: var n = this.name.replace(/^(.*?)\[(.*?)\]$/, "$1_$2"); var real_n = this.name; this removes the brackets and makes rails form names appear like mymodel_myfield instead of mymodel[myfield]. I defined real_n so that it can still be used for the hidden field. Works like a charm now! On Jul 9, 9:58 am, JB <[EMAIL PROTECTED]> wrote: > Hi - > > I'm trying to use the excellent star rating plugin from fyneworks > (http://www.fyneworks.com/jquery/star-rating) with a rails project I'm > working on. I'm running into a bit of an issue that I wonder if > anyone else has seen. > > Typical names of form fields in a rails app look something like this: > > mymodel[myfield] > > which I suspect is causing an issue with this plugin. If I leave the > form as generated by rails, with names like above, then the mouseout > and click events don't behave properly. mouseout doesn't remove the > stars the way it should, and clicking on a star only highlights the > star you clicked on, instead of all the stars before it also. > > If I manually hack the form names to be regular names, like "myfield" > instead of "mymodel[myfield]" then it works perfectly, but of course > then rails won't process my form correctly because the names aren't > right. > > Has anyone else run into this kind of problem? Any solutions anyone > can think of? I tried going through the plugin code, but I'm afraid > my jQuery-fu isn't where it needs to be to spot the problem. > > Any help is greatly appreciated.thanks!
[jQuery] Re: Display (or not display) content based on url hash
first of all .. use document "document.location.hash" instead of "document.location.toString().split('#')[1]". secondly, you might want to take a look to a plugin I made awhile ago to handle anchors: http://haineault.com/blog/37/ cheers On Jul 8, 8:54 am, mitchel <[EMAIL PROTECTED]> wrote: > Hello. > > Admittedly, I know very little about jQuery or javascript in general > but it seems like it should be able to do what I need it to do fairly > easily. > > I am trying to create a div on a page which would display different > content based on the hash in the url. Is there a way to create several > hidden divs on a page with the content I want and have a class that > makes one visible based on the current hash in the URL? Any ideas on > how would I do this? > > Thanks.
[jQuery] How to check if the browser supports iframes?
I am wondering if it's possible to check if the browser supports iframes. I just want to check if iframe works (true/false) and if so stat some function. Can anyone help?
[jQuery] Re: Redefine validation rules dynamically
Calling the validate method more than once doesn't work. Consider using the rules method instead: http://docs.jquery.com/Plugins/Validation/rules Jörn On Wed, Jul 9, 2008 at 6:36 PM, Ivan Sanchez <[EMAIL PROTECTED]> wrote: > > Hi guys, > > Is there any way to redefine validation rules for a form in runtime? > I'm trying to redefine my validation based on a radio button using > something like: > > jQuery("#myRadioButton").change(function(){ >var selectedOption = jQuery("#myRadioButton:checked").val(); >switch(selectedOption){ >case '1': >var validator =jQuery("#myForm").validate({ >rules: { >'fieldOne': {required: true, > maxLength: 6} >}, >messages: { >'fieldOne': {required: 'fieldOne > invalid'} >} >}) >validator.resetForm(); >break; >case '2': >var validator =jQuery("#myForm").validate({ >rules: { >'fieldTwo': {required: true, > maxLength: 6} >}, >messages: { >'fieldTwo': {required: 'fieldOne > invalid'} >} >}) >validator.resetForm(); >break; >} > }); > > It doesn't work. Each time I select an option in my radio button I'd > like to use only the rules defined for that specific option. What > happens in fact is that after the first selection the rules aren't > modified at all. > > Any ideas? > > Ivan >
[jQuery] Re: Running script onLoad instead of ready
Just to note on: "I was trying to get an alert to fire after some of the page loads, (but before ().ready)" 'load' is always going to fire *after* 'ready'
[jQuery] Re: completely resetForm
try using the validation plugins resetForm method? I don't know for sure if it will work but looking at the source Jorn linked it seems likely. On Jul 9, 6:33 am, caseyw <[EMAIL PROTECTED]> wrote: > Hi Jörn, thank you for responding. > > I've tried adding the validator.submitted = {}; and it doesn't work. > > I also took lines 264-272 and adjusted the 'this' to my validator and > still isn't working. > > Anything else I can do? > > Thanks! > > caseyw
[jQuery] Re: HTML Parsing issue
I notice your request has a closing tag after a self-closing tag. ... shouldn't close itself and also have a closing tag. That would and should invalidate your soap request if I am correct without jquery interfering. try making the original request valid xml and check it again. IE.. ... notice that the first open tag is not self-closed allowing the tag to be the closing entity. Also for future reference, always try and validate the xml involved in your SOAP requests. I find it helps a great deal in debugging them. On Jul 8, 6:19 am, shruthi <[EMAIL PROTECTED]> wrote: > Hi, > > I noticed JQuery does some clean up while appending html to an > element. This is a problem for me, > because I'm trying to use a text area which gets loaded with a soap > request. > > My soap request looks like this. > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; > xmlns:ns1="http://ws.apache.org/axis2";> ns1:echoInteger> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; > xsi:type="soapenc:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/ > encoding/">1 > > JQuery is closing the tag as . This makes my soap > request invalid. > > Is there a way to turn off this feature? Even a workaround would be > great!
[jQuery] Star rating plugin + rails
Hi - I'm trying to use the excellent star rating plugin from fyneworks (http://www.fyneworks.com/jquery/star-rating) with a rails project I'm working on. I'm running into a bit of an issue that I wonder if anyone else has seen. Typical names of form fields in a rails app look something like this: mymodel[myfield] which I suspect is causing an issue with this plugin. If I leave the form as generated by rails, with names like above, then the mouseout and click events don't behave properly. mouseout doesn't remove the stars the way it should, and clicking on a star only highlights the star you clicked on, instead of all the stars before it also. If I manually hack the form names to be regular names, like "myfield" instead of "mymodel[myfield]" then it works perfectly, but of course then rails won't process my form correctly because the names aren't right. Has anyone else run into this kind of problem? Any solutions anyone can think of? I tried going through the plugin code, but I'm afraid my jQuery-fu isn't where it needs to be to spot the problem. Any help is greatly appreciated.thanks!
[jQuery] Redefine validation rules dynamically
Hi guys, Is there any way to redefine validation rules for a form in runtime? I'm trying to redefine my validation based on a radio button using something like: jQuery("#myRadioButton").change(function(){ var selectedOption = jQuery("#myRadioButton:checked").val(); switch(selectedOption){ case '1': var validator =jQuery("#myForm").validate({ rules: { 'fieldOne': {required: true, maxLength: 6} }, messages: { 'fieldOne': {required: 'fieldOne invalid'} } }) validator.resetForm(); break; case '2': var validator =jQuery("#myForm").validate({ rules: { 'fieldTwo': {required: true, maxLength: 6} }, messages: { 'fieldTwo': {required: 'fieldOne invalid'} } }) validator.resetForm(); break; } }); It doesn't work. Each time I select an option in my radio button I'd like to use only the rules defined for that specific option. What happens in fact is that after the first selection the rules aren't modified at all. Any ideas? Ivan
[jQuery] Re: Cycle plugin doesn't handle time properly?
Thanx a lot Mike! Maybe I should have worn glasses when I read the documentation... /kim On Jul 9, 5:01 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > I have a problem with the otherwise nice cycle plugin (http:// > > malsup.com/jquery/cycle/) where the initial slide is shown for a > > little bit longer than desired (2-3 seconds too long - 17-18 seconds > > instead of 15) while the other slides are shown a lot less than > > desired (app. 4 seconds instead of 15)... > > > demo:http://kimblim.dk/stuff/cycle/ > > > I hope someone out there can help me, as I am sure that it is me who > > have messed up and neither jQuery nor the plugin. > > > /kim > > Kim, use the 'timeout' property to set the interval between > transitions. The default is 4 seconds. The 'delay' option applies to > the first slide only. So if you want slides to change every 15 sec > simply do this: > > $('#imgs').cycle({ > timeout: 15000 > > }); > > Mike
[jQuery] Re: fckeditor and jquery validation
Hi, I've added the name propertie but nothing changes. Here is the link where you can test it: http://www.promocionesferrumar.com/temp/prueba2.php On 7 jul, 20:56, "Alexandre Plennevaux" <[EMAIL PROTECTED]> wrote: > On Mon, Jul 7, 2008 at 7:32 PM,oscarml<[EMAIL PROTECTED]> wrote: > > > Hi to everybody, > > > I have a problem validating a textarea generated by fckeditor with > > PHP. > > > I have placed the fckeditor inside a form, and the problem is that if > > a put a char in the textarea and then press submit the validation says > > that is empty, and if I press again, it says is ok and sends the form. > > > this is my code: > > > > include_once("fckeditor/fckeditor.php"); > > ?> > > > > > > > > > $(document).ready(function() { > > $("#FCKeditor1").addClass("required"); > > $("#mi_form").validate(); > > > }); > > > > > > > > $oFCKeditor = new FCKeditor('FCKeditor1') ; > > $oFCKeditor->BasePath = 'fckeditor/' ; > > $oFCKeditor->Value = '' ; > > $oFCKeditor->ToolbarSet = 'Barra_listas'; > > $oFCKeditor->Create() ; > > ?> > > > > > > > > > Any suggestion? > > what is this: > > > > ?? no name attribute? Maybe your validation script chokes on this, and > not on FCK ? > > could you post your page online somewhere so we can see it for ourselves ? > > -- > Alex
[jQuery] Re: Cross domain problems
I had this same problem, which I solved by parsing the window.location.href prior to making the ajax call, based on the current host used to access the site. var url = /(https?:\/\/[^\/]+)/.exec(window.location.href)[1] + '/pathtomyresource'; JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Erik Beeson Sent: Wednesday, July 09, 2008 9:33 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Cross domain problems The protocol *must* be the same (if the page is https://.../ then the ajax request must also be to https://.../). The port *must* be the same. The host name *must* have the same SLD [1], and if the subdomains are different, document.domain *must* be set to the SLD. I'm certain that this can work as I do it all the time. If you're still having trouble, could you create a page that demonstrates the problem? --Erik [1] http://en.wikipedia.org/wiki/Second-level_domain On 7/9/08, flycast <[EMAIL PROTECTED]> wrote: > > I tried setting document.domain = 'site.com'; > It works with a domain of site.com but not www.site.com. I now get the > following message: > > [Exception... "'Permission denied to call method XMLHttpRequest.open' > when calling method: [nsIDOMEventListener::handleEvent]" nsresult: > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" > data: no] > > This seems to be a different problem. > > BTW...here is a Mozilla link to the issue of cross domain and the use > of document.domain: http://www.mozilla.org/projects/security/components/same-origin.html > > > > > On Jul 9, 1:30 am, Alexsandro_xpt <[EMAIL PROTECTED]> wrote: > > Well, I thought this is security browser issue. > > > > I always solve this problem this way: > > Eg.: > > > > To ajax this:http://feedproxy.feedburner.com/undergoogle > > > > > I create this:http://blog.alexsandro.com.br/application/load/feedproxy.feedburner.c.. . > > > > -- > > Alexsandrowww.alexsandro.com.br > > > > > On 9 jul, 00:18, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > > > > > Add this somewhere in your javascript: > > > > > document.domain = 'site.com'; > > > > > Google document domain > > > > > --Erik > > > > > On 7/8/08, flycast <[EMAIL PROTECTED]> wrote: > > > > > > Simple problem (I think)... > > > > > > I am new to JS and ajax. > > > > > > I am building an ajax capability on a clients site. I am running into > > > > cross domain problems. If I get the page using the url formhttp://www.site.com > > > > but I do a load using the url form "http://site.com"; (www vs. no www > > > > in the url) I get nothing but a js error. > > > > > > What is the best way to handle making sure that if the person is at > > > > the site with OR without the "www" in the url that the .load will > > > > still work? >
[jQuery] Re: Question about accordion.
You could combine the accordionchange event with the scrollTo plugin. That event is documented here, though currently down, it seems: http://docs.jquery.com/UI/Accordion/accordion Jörn On Wed, Jul 9, 2008 at 5:51 PM, Frank <[EMAIL PROTECTED]> wrote: > > Hi, > > I've a question about accordion. I have checked the Doc and some Demo > but I don't see how I can do this. > > Some of my section of my accordion have a realy big content and > sometimes when a user click on a section with this amount of content, > he loses the beginning of the text because the section header will > join the other sections in the move. > > Example (Made with tutorial by Steve Krueger) : > > http://www.francoismartel.net/test/AccordionJQ/test.htm > > Is there a way to automatically move the navigation bar (of the > Browser) so that the user is always positioned at the beginning of the > text when he open a section with big content? > > Thanks. >
[jQuery] Re: Cross domain problems
The protocol *must* be the same (if the page is https://.../ then the ajax request must also be to https://.../). The port *must* be the same. The host name *must* have the same SLD [1], and if the subdomains are different, document.domain *must* be set to the SLD. I'm certain that this can work as I do it all the time. If you're still having trouble, could you create a page that demonstrates the problem? --Erik [1] http://en.wikipedia.org/wiki/Second-level_domain On 7/9/08, flycast <[EMAIL PROTECTED]> wrote: > > I tried setting document.domain = 'site.com'; > It works with a domain of site.com but not www.site.com. I now get the > following message: > > [Exception... "'Permission denied to call method XMLHttpRequest.open' > when calling method: [nsIDOMEventListener::handleEvent]" nsresult: > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" > data: no] > > This seems to be a different problem. > > BTW...here is a Mozilla link to the issue of cross domain and the use > of document.domain: > http://www.mozilla.org/projects/security/components/same-origin.html > > > > > On Jul 9, 1:30 am, Alexsandro_xpt <[EMAIL PROTECTED]> wrote: > > Well, I thought this is security browser issue. > > > > I always solve this problem this way: > > Eg.: > > > > To ajax this:http://feedproxy.feedburner.com/undergoogle > > > > > I create > > this:http://blog.alexsandro.com.br/application/load/feedproxy.feedburner.c... > > > > -- > > Alexsandrowww.alexsandro.com.br > > > > > On 9 jul, 00:18, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > > > > > Add this somewhere in your javascript: > > > > > document.domain = 'site.com'; > > > > > Google document domain > > > > > --Erik > > > > > On 7/8/08, flycast <[EMAIL PROTECTED]> wrote: > > > > > > Simple problem (I think)... > > > > > > I am new to JS and ajax. > > > > > > I am building an ajax capability on a clients site. I am running into > > > > cross domain problems. If I get the page using the url > formhttp://www.site.com > > > > but I do a load using the url form "http://site.com"; (www vs. no www > > > > in the url) I get nothing but a js error. > > > > > > What is the best way to handle making sure that if the person is at > > > > the site with OR without the "www" in the url that the .load will > > > > still work? >
[jQuery] Jquery media plugin
Hello, I am using jquery http://www.malsup.com/jquery/media/ media plugin on my site. I am using jquery 1.2.2. My page renders and the media player script runs. However I get javascript error: Node cannot be inserted at the specified point in the hierarchy" code: "3 Regards Ismail -- View this message in context: http://www.nabble.com/Jquery-media-plugin-tp18364728s27240p18364728.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: 'nodeName' is null or not an object
You might try adding the .each() function before your .load() call. Carl Pickledegg wrote: > its 'c_name'. > > I've discovered something now, if I just use 1 div as the selector to > update only 1 div, > > $('#charges-gsm) > > it works fine. But when I add multiple ones: > > $('#charges-gsm,#charges-gsm-faq,#charges-gsm-prices') > > thats when I get the error...I know that the divs exist and it works > in FF, but why not IE? > > On Jul 9, 4:31 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > >>> I have the following code that loads on $(document).ready: >>> >>> - >>> $('.ajaxdropdown').change(function(){ >>> $('#charges-gsm, #charges-gsm-faq, >>> #charges-gsm-prices').load('/ >>> mobell/includes/html/gsm-tariff.php?c_name='+escape($(this).val())); >>> - >>> >>> Its pretty self explanatory, but to summarise I have three divs on my >>> page - (#charges-gsm, #charges-gsm-faq & #charges-gsm-prices) which >>> update with the content of the ajax load. >>> The trigger for this event is from dropdowns on the page, which have >>> the class '.dropdown'. >>> >>> All works well in Firefox & Safari, but in IE (6&7) I get no content >>> in my divs and the following error: >>> >>> 'nodeName' is null or not an object >>> >>> I've narrowed it down to the line that mentions .ajaxdropdown, so I >>> think its because IE is having trouble finding the element, but I've >>> tried putting other selectors in instead of .ajaxdropdown, and its the >>> same error. >>> >>> Can anyone see why it may be happening? Thank you. >>> >> What is the "name" attribute of the .ajaxdropdown element? >> > > >
[jQuery] Question about accordion.
Hi, I’ve a question about accordion. I have checked the Doc and some Demo but I don’t see how I can do this. Some of my section of my accordion have a realy big content and sometimes when a user click on a section with this amount of content, he loses the beginning of the text because the section header will join the other sections in the move. Example (Made with tutorial by Steve Krueger) : http://www.francoismartel.net/test/AccordionJQ/test.htm Is there a way to automatically move the navigation bar (of the Browser) so that the user is always positioned at the beginning of the text when he open a section with big content? Thanks.
[jQuery] Re: 'nodeName' is null or not an object
its 'c_name'. I've discovered something now, if I just use 1 div as the selector to update only 1 div, $('#charges-gsm) it works fine. But when I add multiple ones: $('#charges-gsm,#charges-gsm-faq,#charges-gsm-prices') thats when I get the error...I know that the divs exist and it works in FF, but why not IE? On Jul 9, 4:31 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > I have the following code that loads on $(document).ready: > > > - > > $('.ajaxdropdown').change(function(){ > > $('#charges-gsm, #charges-gsm-faq, > > #charges-gsm-prices').load('/ > > mobell/includes/html/gsm-tariff.php?c_name='+escape($(this).val())); > > - > > > Its pretty self explanatory, but to summarise I have three divs on my > > page - (#charges-gsm, #charges-gsm-faq & #charges-gsm-prices) which > > update with the content of the ajax load. > > The trigger for this event is from dropdowns on the page, which have > > the class '.dropdown'. > > > All works well in Firefox & Safari, but in IE (6&7) I get no content > > in my divs and the following error: > > > 'nodeName' is null or not an object > > > I've narrowed it down to the line that mentions .ajaxdropdown, so I > > think its because IE is having trouble finding the element, but I've > > tried putting other selectors in instead of .ajaxdropdown, and its the > > same error. > > > Can anyone see why it may be happening? Thank you. > > What is the "name" attribute of the .ajaxdropdown element?
[jQuery] numeric textbox with min and max values
Hi, I am trying to implement the functionality of a numeric textbox that allows only values between min and max values. This text box will be contained in a large html table. so instead of attaching the events to each textbox, I attached the events to the containing table. As the user types the values, it checks to see if the value is between min and max values. if so, it will allow the user to type the number. it is working fine as long as the user is in the same textbox. once the user moves off of that textbox and comes back to it to edit the value, it is not allowing the user to edit the value unless the user deletes the value already entered. The textbox will only allow values between 0 and 24. so when the user types a number, if there is any text already in the textbox, then I am multiplying that value by 10 and add the current entered number. if the result is between min and max, then the number will be allowed. This is creating problem when the user comes back and try to edit the value. I am not sure what I am doing is right. so I am posting so that some one can review my code and give some suggestions. $(function(){ $('table').bind('keypress', allowNumericOnly) }); function allowNumericOnly(event) { var cell = event.target; var cancelEvent = true; var key = event.keyCode; var input = '#' + cell.id; var elem = $(input); if(key < 48 || key > 57) { /* '-' only allowed at start */ if(key == 45 && cell.value.length == 0) { cancelEvent = false; } else if(key == 46 && cell.value.indexOf('.') == -1) { /* allow only one decimal point */ cancelEvent = false; } } else { if(cell.value.indexOf('.') != -1){ if((cell.value.length - (cell.value.indexOf('.') + 1)) >= 2) cancelEvent = true; else cancelEvent = false; } else { //first get the value in the textbox var cellValue; if($.trim(cell.value).length > 0) cellValue = parseInt($.trim(cell.value)) * 10; else cellValue = 0; //then add to it the number entered cellValue = cellValue + (key - 48); //check if the value is between min and max if(cellValue < minHours || cellValue > maxHours) cancelEvent = true; else cancelEvent = false; } } if(cancelEvent == true) event.preventDefault(); } event.stopPropagation(); }
[jQuery] Re: Ho to remove or add a new table row?
You can easily remove any row that you selected, only question is if you can select apropriate rows. $("table tr").remove(".remove"); // removes any table rows that have class="remove" or like this $("table tr").filter(":contains(unwantedText)").remove();// removes any row containing string "unwantedText" Only thing you have to watch is that your query is TR element (that was your problem, right?). If you filter by some other condition, for example children elements, then do this: $("table tr a.remove").parent().remove();// query is A tag with class="remove", so you escape it with .parent() Same thing goes with adding rows, just use .after("Insert this row") or .before("Insert this row") methods.
[jQuery] Re: 'nodeName' is null or not an object
> I have the following code that loads on $(document).ready: > > - > $('.ajaxdropdown').change(function(){ > $('#charges-gsm, #charges-gsm-faq, > #charges-gsm-prices').load('/ > mobell/includes/html/gsm-tariff.php?c_name='+escape($(this).val())); > - > > Its pretty self explanatory, but to summarise I have three divs on my > page - (#charges-gsm, #charges-gsm-faq & #charges-gsm-prices) which > update with the content of the ajax load. > The trigger for this event is from dropdowns on the page, which have > the class '.dropdown'. > > All works well in Firefox & Safari, but in IE (6&7) I get no content > in my divs and the following error: > > 'nodeName' is null or not an object > > I've narrowed it down to the line that mentions .ajaxdropdown, so I > think its because IE is having trouble finding the element, but I've > tried putting other selectors in instead of .ajaxdropdown, and its the > same error. > > Can anyone see why it may be happening? Thank you. What is the "name" attribute of the .ajaxdropdown element?
[jQuery] Re: UL drag drop
Thanks Richard, couldn't see the wood for the trees! 2008/7/4 Richard D. Worth <[EMAIL PROTECTED]>: > Take a look at jQuery UI. It has a sortable component that makes it as > simple as: > > $("ul").sortable() > > Here's a demo: > > http://ui.jquery.com/functional_demos/#ui.sortable > > If you have any questions on it, there's a dedicated jQuery UI mailing > list: > > http://groups.google.com/group/jquery-ui/ > > - Richard > > Richard D. Worth > http://rdworth.org/ > > > On Fri, Jul 4, 2008 at 5:01 AM, DannyT <[EMAIL PROTECTED]> wrote: > >> Can someone point me to an example of drag-n-drop within an unordered >> list? I need to replace a scriptaculous library and am giving jQuery a go >> because of it's massive praise of late. I've found plugins and examples of >> pretty much everything I'd need except for a simple drag and drop in a UL. >> >> Cheers, >> >> Dan >> >> -- >> http://danny-t.co.uk > > > -- http://danny-t.co.uk
[jQuery] 'nodeName' is null or not an object
I have the following code that loads on $(document).ready: - $('.ajaxdropdown').change(function(){ $('#charges-gsm, #charges-gsm-faq, #charges-gsm-prices').load('/ mobell/includes/html/gsm-tariff.php?c_name='+escape($(this).val())); - Its pretty self explanatory, but to summarise I have three divs on my page - (#charges-gsm, #charges-gsm-faq & #charges-gsm-prices) which update with the content of the ajax load. The trigger for this event is from dropdowns on the page, which have the class '.dropdown'. All works well in Firefox & Safari, but in IE (6&7) I get no content in my divs and the following error: 'nodeName' is null or not an object I've narrowed it down to the line that mentions .ajaxdropdown, so I think its because IE is having trouble finding the element, but I've tried putting other selectors in instead of .ajaxdropdown, and its the same error. Can anyone see why it may be happening? Thank you.
[jQuery] Re: Cycle plugin doesn't handle time properly?
> I have a problem with the otherwise nice cycle plugin (http:// > malsup.com/jquery/cycle/) where the initial slide is shown for a > little bit longer than desired (2-3 seconds too long - 17-18 seconds > instead of 15) while the other slides are shown a lot less than > desired (app. 4 seconds instead of 15)... > > demo:http://kimblim.dk/stuff/cycle/ > > I hope someone out there can help me, as I am sure that it is me who > have messed up and neither jQuery nor the plugin. > > /kim Kim, use the 'timeout' property to set the interval between transitions. The default is 4 seconds. The 'delay' option applies to the first slide only. So if you want slides to change every 15 sec simply do this: $('#imgs').cycle({ timeout: 15000 }); Mike
[jQuery] Re: How to use it?
Hi, Can you share how you figured out ?? I am also working on same problem... Thanks, Cimran On Jul 6, 12:27 am, Raghu <[EMAIL PROTECTED]> wrote: > Hi, I have figured out. It is working perfectly fine for me. > > Thanks > Raghu > > > > On Sat, Jul 5, 2008 at 6:28 PM, Raghu <[EMAIL PROTECTED]> wrote: > > Hi, I am trying to use Jquery pagination plugin. > > I have read documentation but things are still not clear to me. Can > > someone please help me? > > What exactly we need to do in callback function? Will this pagination > > plugin work with Ajax call? > > > $("#News-Pagination").pagination(122, { > > items_per_page:20, > > callback:loadContents > > }); > > > callback > > A callback function that is called when a user clicks on the link. the > > The > > > function receives two parameters: the new page id and the pagination > > container (a DOM element). If the callback returns false, the event > > > propagation is stopped. Default value: ``function(){return false;}`` > > > Thanks > > Raghu- Hide quoted text - > > - Show quoted text -
[jQuery] Re: Running script onLoad instead of ready
$(window).load On Jul 9, 10:16 pm, benjam <[EMAIL PROTECTED]> wrote: > Maybe I'm missing something totally obvious, but I was trying to get > an alert to fire after some of the page loads, (but before ().ready). > > I tried the following: > $('body').load( function( ) { alert('Hello World'); } ); > > with no effect. > > I also tried it with some of the other elements on the page. Also > with no effect. > > But the following works perfectly, albeit a little later than I'd > like: > $(document).ready( function( ) { alert('Hello World'); } ); > > Basically, what I'm trying to do, is to get the alert to fire a tad > sooner for pages that might take a while to load completely, but not > quite as soon as it would if I just put the naked alert in some script > tags. > > Am I missing something?
[jQuery] Re: Cross domain problems
What JS error were you getting before? On Jul 9, 8:01 am, flycast <[EMAIL PROTECTED]> wrote: > I tried setting document.domain = 'site.com'; > It works with a domain of site.com but notwww.site.com. I now get the > following message: > > [Exception... "'Permission denied to call method XMLHttpRequest.open' > when calling method: [nsIDOMEventListener::handleEvent]" nsresult: > "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" > data: no] > > This seems to be a different problem. > > BTW...here is a Mozilla link to the issue of cross domain and the use > of > document.domain:http://www.mozilla.org/projects/security/components/same-origin.html > > On Jul 9, 1:30 am, Alexsandro_xpt <[EMAIL PROTECTED]> wrote: > > > Well, I thought this is security browser issue. > > > I always solve this problem this way: > > Eg.: > > > To ajax this:http://feedproxy.feedburner.com/undergoogle > > > I create > > this:http://blog.alexsandro.com.br/application/load/feedproxy.feedburner.c... > > > -- > > Alexsandrowww.alexsandro.com.br > > > On 9 jul, 00:18, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > > > > Add this somewhere in your javascript: > > > > document.domain = 'site.com'; > > > > Google document domain > > > > --Erik > > > > On 7/8/08, flycast <[EMAIL PROTECTED]> wrote: > > > > > Simple problem (I think)... > > > > > I am new to JS and ajax. > > > > > I am building an ajax capability on a clients site. I am running into > > > > cross domain problems. If I get the page using the url > > > > formhttp://www.site.com > > > > but I do a load using the url form "http://site.com"; (www vs. no www > > > > in the url) I get nothing but a js error. > > > > > What is the best way to handle making sure that if the person is at > > > > the site with OR without the "www" in the url that the .load will > > > > still work?
[jQuery] Re: [validate] completely resetForm
Hi Jörn, thank you for responding. I've tried adding the validator.submitted = {}; and it doesn't work. I also took lines 264-272 and adjusted the 'this' to my validator and still isn't working. Anything else I can do? Thanks! caseyw
[jQuery] Running script onLoad instead of ready
Maybe I'm missing something totally obvious, but I was trying to get an alert to fire after some of the page loads, (but before ().ready). I tried the following: $('body').load( function( ) { alert('Hello World'); } ); with no effect. I also tried it with some of the other elements on the page. Also with no effect. But the following works perfectly, albeit a little later than I'd like: $(document).ready( function( ) { alert('Hello World'); } ); Basically, what I'm trying to do, is to get the alert to fire a tad sooner for pages that might take a while to load completely, but not quite as soon as it would if I just put the naked alert in some script tags. Am I missing something?
[jQuery] Cycle plugin doesn't handle time properly?
I have a problem with the otherwise nice cycle plugin (http:// malsup.com/jquery/cycle/) where the initial slide is shown for a little bit longer than desired (2-3 seconds too long - 17-18 seconds instead of 15) while the other slides are shown a lot less than desired (app. 4 seconds instead of 15)... demo: http://kimblim.dk/stuff/cycle/ I hope someone out there can help me, as I am sure that it is me who have messed up and neither jQuery nor the plugin. /kim
[jQuery] Updated jQuery Talk by Remy Sharp
Remy Sharp has updated his jQuery Talk slides and they're available for viewing here: http://remysharp.com/2008/07/09/updated-jquery-talk/ Rey
[jQuery] Re: Finding whether a tag is present in between two specified tags or not
Arun Kumar wrote: Suppose I have two tags and as below: 2008-07-07 TestTag Text Node 20:15:45 How can I find whether TestTag is present in between the and tags or not? The may present any where in the document. But I want to know whether it is present between and tags or not? TestTag is not the only tag that exists between Date and Time tags. If Date, Time, and TestTag are all siblings, this might do it: $(document).ready(function() { $("Date").each(function() { var $time = $(this).nextAll("Time:first"); var $date = $time.prevAll("Date:first"); if ($date[0] != this) return; $date.nextAll("TestTag").each(function() { if ($(this).nextAll("Time:first")[0] == $time[0]) { process(this); } }); }); function process(tag) { // Tag is a TestTag between a Date and Time... } }); If they are not, it might get tricky. There is a little added complexity here to cover the possiblity of in which the TestTag would be processed twice if you used the simpler $(document).ready(function() { $("Date").each(function() { var $time = $(this).nextAll("Time:first"); $(this).nextAll("TestTag").each(function() { if ($(this).nextAll("Time:first")[0] == $time[0]) { process(this); } }); }); function process(tag) { // Tag is a TestTag between a Date and Time... } }); But if you can guarantee that Dates and Times always come in matched pairs, the latter would probably be better. Cheers, -- Scott
[jQuery] Re: help needed with simplemodal
Hello, What exactly are you trying to do, and what have you tried? Do you have a page I can see? -Eric On Jul 8, 11:01 am, sree <[EMAIL PROTECTED]> wrote: > I want to slide-in and slide-out the simplemodal. Anyone familiar with > jquery simple modal please reply. Very urgent > Thanks
[jQuery] Re: Parsing XML using jQuery
It seems that the DOM parsed 'on the fly' isn't ready for querying. When doing something weird like: var xml = $('Hello World!Bye World!'); $(xml).appendTo("body"); then the alert($("p").text()); // without context works !
[jQuery] Re: click() on submit button doesn't trigger form's jquery submit handler
> I expected that calling click() on a submit button would trigger a > form's submit handler, but this doesn't seem to be the case. > > Example: register a jQuery submit handler: > $('form').submit(function() { alert('jquery submit handler'); }); > > Then click the corresponding submit button: > $('input[type=submit]').click(); Use 'submit' with no args to submit the form and invoke its handlers: $('form').submit();
[jQuery] Re: How would I substitute the term jquery('class') for $('class')
Colin, Thank you. That is exactly what I was looking for and wasn't using the right terms for a good search. Goodbye to coding in an onclick for each of the dt elements. Once again, thanks, Michael On Jul 9, 4:15 am, Colin Guthrie <[EMAIL PROTECTED]> wrote: > mickbw wrote: > > I am working on a page that works correctly when I call it directly in > > any browser. > > > If I include the page in my RIA app and run the script in firebug, the > > jquery script works correctly. > > > If I include it in my RIA app with the script part of an > > external .js script, the script functions do not work AND do not cause > > an error. Other jQuery scripts in the app work without problem. > > > My assumption is that the script must be conflicting with other > > frameworks that use the $() keyword and I know that $() is just a > > shortcut for jquery(). Do I have to replace the $ code in both the > > external script AND the jquery.js file? > > > BTW, the offending page is athttp://67.199.57.74/jobsearchlog/faq.cfm. > > Clicking a question will toggle the display of the answer. > > > To access the page through the App, go tohttp://67.199.57.74/jobsearchlog/ > > and click FAQ from the top menu. > > > Any assistance would be greatly appreciated. > > This page shows you how to use $ in your .js files when using it with > other frameworks that also hijack the $() > > http://docs.jquery.com/Plugins/Authoring > > See the Custom Alias section. > > Make sure you activate the noconflict mode in jQuery. I generally do: > > 1. Include Prototype et al. > 2. Include jquery > 3. Immediately active jQuery.noConflict(); > > Whenever I use *any* jQuery code, I typically hide it via the technique > in the above link. > > Col
[jQuery] Re: click() on submit button doesn't trigger form's jquery submit handler
Will, When I clicked on the button I saw two alert boxes. I did this in IE and Firefox. Was the the result you wanted? On Jul 9, 4:46 am, Will Moffat <[EMAIL PROTECTED]> wrote: > I expected that calling click() on a submit button would trigger a > form's submit handler, but this doesn't seem to be the case. > > Example: register a jQuery submit handler: > $('form').submit(function() { alert('jquery submit handler'); }); > > Then click the corresponding submit button: > $('input[type=submit]').click(); > > The submit handler isn't fired. > > Live > example:http://mqlx.com/~willmoffat/learn_feature/jquery/click_submit.html > > Is this a bug or a feature? > regards, > --Will
[jQuery] Re: click() on submit button doesn't trigger form's jquery submit handler
On Wed, Jul 9, 2008 at 10:46 AM, Will Moffat <[EMAIL PROTECTED]> wrote: > > I expected that calling click() on a submit button would trigger a > form's submit handler, but this doesn't seem to be the case. > > Example: register a jQuery submit handler: > $('form').submit(function() { alert('jquery submit handler'); }); > > Then click the corresponding submit button: > $('input[type=submit]').click(); > > The submit handler isn't fired. > > Live example: > http://mqlx.com/~willmoffat/learn_feature/jquery/click_submit.html > > Is this a bug or a feature? > regards, > --Will > try using the submit event instead: $('input[type=submit]').bind('submit', function(){alert("submitted !");}); -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: Parsing XML using jQuery
On Wed, Jul 9, 2008 at 12:38 PM, Wallonman <[EMAIL PROTECTED]> wrote: > > Hi, > > Some hours that I don't understand why this basic Xml parsing with > JQuery doesn't work: > >$(document).ready(function() { > >var xml = '>Hello World!'; > >alert($("p", xml).text()); > >}); > > I get an empty string, instead of the expected Hello World! > > I had a look to a similar previous post > http://groups.google.com/group/jquery-en/browse_thread/thread/fc60b77f884e6866/85cbd666774c6780) > , but this didn't help me to get the revelation. > > try alert($("p", xml).eq(0).text()); -- Alexandre Plennevaux LAb[au] http://www.lab-au.com
[jQuery] Re: Display (or not display) content based on url hash
You're going to have to read up more on javascript. Mozilla has great online documentation at http://developer.mozilla.org/en/docs/JavaScript , particularly the core guide for you. Also there are some great books out there, O'Reilly's definitive guide can be a little dry at times but does more than explain things. As another hint, I wouldn't recommend reloading the page so that your if or switch statements pick up the hash. I would use a class selector since every link/thumbnail on the left is of class .cross- link. But since class selectors are inefficient I would contain the class selector to the containing ul, #portfolioThumbs. From there I assume you want the image box on the right to slide to the correct photo. You have packed so i couldn't guess the method or function to make it slide, but i'm sure they have it documented. Regardless, you'll need another type of hook to figure out which thumbnail was clicked. Whether it be easily identifiable thumbnail image names (eg, thumb-mayTheCats.gif), the href, another class name, an id, a rel attribute, etc. This example is much more sensible for your current situation Example: (not tested, but should work or close to working) // jQuery's document on ready $(function() { // handle a hash on load var hash_id = document.location.toString().split('#')[1]; // if there wasn't a hash in the url i think hash_id will be null // or false if (hash_id) { // call our custom function with hash_id as first parameter handlePanelSlide(hash_id); } // handle a click event $('#portfolioThumbs .cross-link').click(function() { // call our custom function with the $(this) jQuery object // as a parameter which is the item that was clicked // leave first parameter false as its for hash_id handlePanelSlide(false, $(this)); } }); // end jQuery's document on ready // custom sliding function function handlePanelSlide(id, elem) { // id is false if its a click event // // if click event: // assume these links' ID's were numbered 0 through n // this could also be the href, would have to use // the substring function to remove the hash id = id || $(elem).attr('id'); // this is how many pixels the slider will move var offset = (Number(id) * -600).toString() + 'px'; // move the slider // of course you would want to use the easing or // coda method for a smooth transition, but this // is ultimately what it does $('#slider1 .panelContainer').css('left', offset); } On Jul 8, 7:30 pm, mitchel <[EMAIL PROTECTED]> wrote: > Thank you again. That certainly helped. But I still don't quite > understand what to do with the event handler. I gave the links ids of > "cross-link1", "cross-link2", etc. and tried this: > > $('#cross-link1').click(function() { > location.reload(true) > > }); > > but it doesn't really do anything. > > Thanks again, you've been a giant help thus far. > > On Jul 8, 12:23 pm, noon <[EMAIL PROTECTED]> wrote: > > > > I the if/else statement doesn't seem to be working. > > > You're if statement is using the equals sign as an assignment operator > > (=) instead of comparison which is double equals (==). > > > > Also, it only > > > reads the current hash on a manual refresh of the page. Here is the > > > link if helps any:http://www.mitchmckenzie.com/index.php > > > That piece of javascript is only evaluated when the page loads. If > > you want you're changes to occur "onclick" you'll have to assign event > > handlers to each clickable item -OR- an event handler generically to > > every click and check its target. > > > Event handler (assuming you've added ID's to each link with the class > > cross-link): > > $('#cross-link1').click(function() { > > // do some javascript > > > }); > > > Generic handler: > > $('a').click(function() { > > // you arent sure what was clicked, so lets determine before doing > > something > > var the_links_rel_property = $(this).attr('rel'); // $(this) refers > > to what was clicked > > switch (the_links_rel_property) { > > case 'img1': > > // do something > > break; > > case 'img4': > > // do something > > break; > > } > > > }); > > > Hope that helps > > > On Jul 8, 2:51 pm, mitchel <[EMAIL PROTECTED]> wrote: > > > > Thanks! I think that gets me started in the right direction. However, > > > I am still having some issues. Here is what I have so far: > > > > var current = > > > (document.location.toString().split('#')[1]) > > > > if (current = "1") {document.write( "Title > > > 1Body text." ); } > > > else if (current = "2") > > > {document.write( "Title 2Body text." ); } > > > else if (current = "3") > > > {document.write
[jQuery] Re: Cross domain problems
I tried setting document.domain = 'site.com'; It works with a domain of site.com but not www.site.com. I now get the following message: [Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no] This seems to be a different problem. BTW...here is a Mozilla link to the issue of cross domain and the use of document.domain: http://www.mozilla.org/projects/security/components/same-origin.html On Jul 9, 1:30 am, Alexsandro_xpt <[EMAIL PROTECTED]> wrote: > Well, I thought this is security browser issue. > > I always solve this problem this way: > Eg.: > > To ajax this:http://feedproxy.feedburner.com/undergoogle > > I create > this:http://blog.alexsandro.com.br/application/load/feedproxy.feedburner.c... > > -- > Alexsandrowww.alexsandro.com.br > > On 9 jul, 00:18, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > > > Add this somewhere in your javascript: > > > document.domain = 'site.com'; > > > Google document domain > > > --Erik > > > On 7/8/08, flycast <[EMAIL PROTECTED]> wrote: > > > > Simple problem (I think)... > > > > I am new to JS and ajax. > > > > I am building an ajax capability on a clients site. I am running into > > > cross domain problems. If I get the page using the url > > > formhttp://www.site.com > > > but I do a load using the url form "http://site.com"; (www vs. no www > > > in the url) I get nothing but a js error. > > > > What is the best way to handle making sure that if the person is at > > > the site with OR without the "www" in the url that the .load will > > > still work?
[jQuery] Re: How would I substitute the term jquery('class') for $('class')
mickbw wrote: > I am working on a page that works correctly when I call it directly in > any browser. > > If I include the page in my RIA app and run the script in firebug, the > jquery script works correctly. > > If I include it in my RIA app with the script part of an > external .js script, the script functions do not work AND do not cause > an error. Other jQuery scripts in the app work without problem. > > My assumption is that the script must be conflicting with other > frameworks that use the $() keyword and I know that $() is just a > shortcut for jquery(). Do I have to replace the $ code in both the > external script AND the jquery.js file? > > BTW, the offending page is at http://67.199.57.74/jobsearchlog/faq.cfm. > Clicking a question will toggle the display of the answer. > > To access the page through the App, go to http://67.199.57.74/jobsearchlog/ > and click FAQ from the top menu. > > Any assistance would be greatly appreciated. This page shows you how to use $ in your .js files when using it with other frameworks that also hijack the $() http://docs.jquery.com/Plugins/Authoring See the Custom Alias section. Make sure you activate the noconflict mode in jQuery. I generally do: 1. Include Prototype et al. 2. Include jquery 3. Immediately active jQuery.noConflict(); Whenever I use *any* jQuery code, I typically hide it via the technique in the above link. Col
[jQuery] Strange issue with crossSlider
I'm working on a website which utilizes crossSlide, a jQuery plugin. It works in IE6/7 on the website itself but not on mine, while I use the same code. What's wrong? I tried using 1.2.3 instead of 1.2.6 but that didn't work either. URL: Site: http://84.86.134.134/swart/?p=home Plugin site: http://www.gruppo4.com/~tobia/cross-slide.shtml Code: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> // Loading...
[jQuery] Re: Running a loop for array numbers
Thanks guys much appreciated. I tried the last one : $('.equipment a.i-right1').filter(function(i) { return ( i > 0 && i < 9 ); }).hide(); And it worked. For say $('.equipment a.i-right1') $('.equipment a.i-right2') $('.equipment a.i-right5') $('.equipment a.i-rightx') How would i put that into a loop? Thanks. On Jul 8, 10:16 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > Hi Johnee, > > Another approach would be: > > $('.equipment a.i-right1').each(function(i) { > if ( i > 0 && i < 9 ) { > $(this).hide(); > } > > }); > > or this would work too: > > $('.equipment a.i-right1').filter(function(i) { > return ( i > 0 && i < 9 ); > > }).hide(); > > Cheers, > -Jonathan > > On Tue, Jul 8, 2008 at 12:00 PM, JohneeM <[EMAIL PROTECTED]> wrote: > > > Hi guys how can i run this in a single statement without manually > > putting in the numbers? > > > $('.equipment a.i-right1:eq(1)').hide(); > > $('.equipment a.i-right1:eq(2)').hide(); > > $('.equipment a.i-right1:eq(3)').hide(); > > $('.equipment a.i-right1:eq(4)').hide(); > > $('.equipment a.i-right1:eq(5)').hide(); > > $('.equipment a.i-right1:eq(6)').hide(); > > $('.equipment a.i-right1:eq(7)').hide(); > > $('.equipment a.i-right1:eq(8)').hide(); > > > Note that im skipping the first array [0] due to wanting it to show. > > > Also this one : > > > $('.performance-parts #content-container > > a.lightbox:eq(8)').lightBox(); > > $('.performance-parts #content-container > > a.lightbox:eq(9)').lightBox(); > > > They need to be in their own array as i want to run a seperate > > lightbox for each image, is this possible? > > > Thanks.
[jQuery] click() on submit button doesn't trigger form's jquery submit handler
I expected that calling click() on a submit button would trigger a form's submit handler, but this doesn't seem to be the case. Example: register a jQuery submit handler: $('form').submit(function() { alert('jquery submit handler'); }); Then click the corresponding submit button: $('input[type=submit]').click(); The submit handler isn't fired. Live example: http://mqlx.com/~willmoffat/learn_feature/jquery/click_submit.html Is this a bug or a feature? regards, --Will
[jQuery] Ho to remove or add a new table row?
Hi, i have a table with data from my mysql database. Now i want to add and delete the records via jQuery. Is this possible? I need to remove the selected row or add a new row and update selected row. Is there any sample or idea how to solve this problem. I searched with Google and couldnt find an answer. thanks yavuz
[jQuery] getJSON in IE6
Hi all! I have a bug with getJSON method in IE6. If I try to get data from another domain with this method by onready method everything is fine and it's returns me a normal json response, but if I try to reexecute function with getJSON method by clicking link I have no response from the server. All request links and server data was tested and meghod getJSON works, but no response and no callback execution. Do you know something about this trouble? Marat.
[jQuery] Parsing XML using jQuery
Hi, Some hours that I don't understand why this basic Xml parsing with JQuery doesn't work: $(document).ready(function() { var xml = 'Hello World!'; alert($("p", xml).text()); }); I get an empty string, instead of the expected Hello World! I had a look to a similar previous post http://groups.google.com/group/jquery-en/browse_thread/thread/fc60b77f884e6866/85cbd666774c6780) , but this didn't help me to get the revelation.
[jQuery] Re: Running a loop for array numbers
JohneeM wrote: Hi guys how can i run this in a single statement without manually putting in the numbers? $('.equipment a.i-right1:eq(1)').hide(); $('.equipment a.i-right1:eq(2)').hide(); $('.equipment a.i-right1:eq(3)').hide(); $('.equipment a.i-right1:eq(4)').hide(); $('.equipment a.i-right1:eq(5)').hide(); $('.equipment a.i-right1:eq(6)').hide(); $('.equipment a.i-right1:eq(7)').hide(); $('.equipment a.i-right1:eq(8)').hide(); How about $('.equipment a.i-right1:gt(0):lt(10)').hide(); or $('.equipment a.i-right1:not(:first)').hide(); -- Scott