[jQuery] Create array from li text
What would be the correct method to create an array from the text inside items? Is below, the best method, or would it even work? var array_test = $(#test li).text().makeArray();
[jQuery] treeview , default collapsable
Hi , I want to have the tree as default collapsed , what can be the way? Thanks yogesh
[jQuery] Re: listening for any dom change
Thank you Ricardo. I could do a callback but there are a number of different types of things that get inserted so it's spread out across a number of functions. And these will likely grow with time. I think what I'm realizing is that what started as a "what would happen if I..." idea has now turned into a poorly architected (read: not at all) app. I probably need to take what I've learned and just start over. ouch. Will On Apr 5, 2:19 pm, Ricardo wrote: > Firefox has events for node insertion > etc:https://developer.mozilla.org/En/DOM_Events > but they are not available to IE, and can incur in significant > overhead for the page. > > If you're in control of the whole app's code, couldn't you just add a > callback for when a widget is added? > > On Apr 5, 2:08 am, will wrote: > > > Hi, > > > I'm trying to bind a function to the body element of a document that > > will fire any time any part of the page's DOM changes. > > > $("body").change() doesn't seem to do it. It does for some changes but > > not all. In particular, not when HTML or element attributes are added/ > > removed. Sorta key! It does trigger when a jEditable element is > > "saved". > > > What I'm trying to accomplish, in case some one can suggest another > > way: I'm making something sort of like iGoogle. When some one adds or > > edits a widget, I want to let them know the page contains changes and > > they orta think about saving it. Autosave isn't really an option as > > this app will save multiple pages. > > > I'd appreciate any insight. > > > Will > >
[jQuery] Re: Use jquery before the DOM is ready?
Just curious, why would you want to avoid document.write()? -Hector On Sat, Apr 4, 2009 at 9:49 PM, Ricardo wrote: > > If you want to avoid document.write, append should work just as well > (the head element already exists): > > $('head').append('#mainimage > { visibility:hidden }'); > > On Apr 4, 9:27 pm, Derba wrote: > > That works a lot better. Thanks for putting up with my questions > > hector. > > > > On Apr 4, 8:21 pm, Hector Virgen wrote: > > > > > Actually, it might be better to just start off with 0 opacity and not > mess > > > with the visibility property at all: > > > document.write('#mainimage{opacity:0}'); > > > $(window).load(function() { > > > //when everything is finally loaded, fade image in > > > $("#mainimage").animate({opacity: "1"}, 1000); > > > > > }); > > > > > -Hector > > > > > On Sat, Apr 4, 2009 at 4:18 PM, Hector Virgen > wrote: > > > > Try setting the opacity to 0 when you set it to visible. > > > > -Hector > > > > > > On Sat, Apr 4, 2009 at 4:15 PM, Derba > wrote: > > > > > >> the css visible seems to make it visible before it has a chance to > > > >> fade in, but I will tinker with it some to see if I can get it to > work. >
[jQuery] How to tell apart focus event
Hi, Name: Is it possible to tell apart focus event? jQuery("#my_name").focus(function (evt) { if( ??? ){ //execute this if focus was triggered by user clicking on the text field } else { //execute this if focus was triggered by method call like this //document.getElementById("my_name").focus(); } });
[jQuery] Another newbie "how do I"
Hi all. I'm totally new to jQuery, but have been assured this is the place to "do stuff". I'm still trying to work through the most basic basics, but in the meantime, hoping I can find an example of how to do this. On a given web page, the user sees two side-by-side areas of text (i.e. two columns). On the left is a vertical bullet list of lines of text. On the right is a "container" for text. The contents of the container vary according to which item in the bullet list is clicked. In other words, if the user clicks on the 3rd one-line statement, the box on the right has a corresponding body of text. Example: On the left, click on a line that reads "Sight-hounds and other fast dogs". On the right, two or three paragraphs appear, describing greyhounds, whippets, Italian greyhounds, their relative size, average top speed, and so on. Both the left and right "boxes" will be sized the same. Is this doable? If so, does someone have a working example I can look at, please. I'm primarily a photographer, not a developer so need to ask your patience (and maybe use "small words" :)) Thank you very much! Jerry
[jQuery] Re: jQuery.support -- No direct support for IE6 detection
On Apr 5, 2:43 am, Joe wrote: > I'm all for migrating to the jQuery.support() utility method, but > there is not definitive test available to detect IE6 specifically. Do > we have a consensus on this yet? I think conditional comments are the best way to go, there are a number of solutions. Don't try sniffing for IE using the UA string. http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/effb54e09160a364/1e1b04d655cdb3b1#1e1b04d655cdb3b1 > -- Rob
[jQuery] long polling and XMLHttpRequest.responseText size
Hello, I have a HTTP server that answers a CGI request with a never endind ascii stream of data. I would like to make a async ajax call to that CGI and process the data as it arrives without having to wait endlessly for the end of the reply. So far I have got this: $(function(){ var a = $.ajax({ url: "data.cgi", success: function(data){ alert( "Data stream never ends, This is an error"); } }); a.onreadystatechange = function() { if (a.readyState == 3 /*state == LOADING*/) { var len = a.responseText.length; //do something usefull with a.responseText[0] to a.responseText [len]... }; It works for some time, but a.responseText grows indefinitely so eventually it will come out of memory. I can modify a bit how the server sends the data, for example I tried to serve the data in a multipart. I was hoping that the "success" function would be called after each part of the multipart and a.responseText would be reset after that, but this is not the case, the "success" function never get's called (even with a.multipart = true) The server is running on a 8bit 60Mhz microcontroler, so I cannot poll for data every X seconds. Is there a way jQuery can support "long polling" without having the XMLHttpRequest.responseText buffer grow indefinitely? Thanks in advance for your help
[jQuery] Re: Simple way to check for duplicate menu values in jquery?
What do you want to do if you find a duper? - remove the first? - remove the second? - something else? what is the HTML like? your post is way too vague to really provide some help On Apr 5, 5:54 pm, "laredotorn...@zipmail.com" wrote: > Hi, > > I have a number of select menus on my page, each containing the same > list of options (values and text). What is the simplest way to check > that a value in one select menu is unique? My goal is to verify that > all menu values are unique. > > Thanks, - Dave
[jQuery] Re: Combining Selectors
This worked! Thank you! On Apr 5, 4:06 pm, "Michael Geary" wrote: > To help troubleshoot, take jQuery out of the picture and replace your alert > with: > > alert( this + " input[type='submit']" ); > > That will make it clear what the problem is. > > Since concatenating "this" to a string doesn't work, how do you fix it? Use > the second argument to the $ function: > > $( selector, context ) > > Like this: > > alert( $( " input[type='submit']", this ).attr('id') ); > > -Mike > > > From: Nic Hubbard > > > I am confused why the following is returning undefined: > > > alert($(this + " input[type='submit']").attr('id')); > > > This is within the context of a plugin that I built. > > Removing the this makes it correctly find the input, why I > > want to narrow the scope.
[jQuery] Re: Superfish Question
Awesome, glad I could help out. twinskies...@gmail.com wrote: Thank you for your help! I got it working! For future reference, here's the CSS code I ended up using: .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #1a2618; outline:0; } .sf-menu li ul li:hover, .sf-menu li ul li li.sfHover, .sf-menu li ul li a:focus, .sf-menu li ul li a:hover, .sf-menu li ul li a:active { background: #93a28d; outline:0; } The first block is for the TOP LEVEL LI. The second block is for everything else below it (hierarchically speaking). Ian On Apr 5, 7:09 pm, Schalk Neethling wrote: Hi there Ian, Your best bet would be to target your second level li and a's specifically so that you end up with the default as you currently have it but then also: .sf-menu li ul li, .sf-menu li ul li a { background-color:#330; /* different from the top level */ } You can of course also target all the various states such as hover, focus etc. HTH, Schalk Tipem wrote: Hi, Here's my Superfish menu: [code] Your Profile Your Friends (2) eggShout™ [/code] What I am trying to do is have the HOVER background color for the top level li be different than the rest of the li hovers. The default CSS code: .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #93a28d; outline:0; } is what triggers the background color change. But that applies it globally, to all li and a elements within the Superfish menu. How can I change the hover background color for just the TOP LEVEL LI and rest of the li's have the #93a28d hover (above)? Best, Ian volume4_schalk.vcf < 1KViewDownload begin:vcard fn:Schalk Neethling n:Neethling;Schalk org:Overt Strategy Consulting adr:Florauna;;Berg ave 642;Pretoria;Gauteng;0182;South Africa email;internet:sch...@overtstrategyconsulting.com title:President tel;work:+27125468436 x-mozilla-html:FALSE url:http://www.overtstrategyconsulting.com version:2.1 end:vcard
[jQuery] Re: Superfish Question
Thank you for your help! I got it working! For future reference, here's the CSS code I ended up using: .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #1a2618; outline:0; } .sf-menu li ul li:hover, .sf-menu li ul li li.sfHover, .sf-menu li ul li a:focus, .sf-menu li ul li a:hover, .sf-menu li ul li a:active { background: #93a28d; outline:0; } The first block is for the TOP LEVEL LI. The second block is for everything else below it (hierarchically speaking). Ian On Apr 5, 7:09 pm, Schalk Neethling wrote: > Hi there Ian, > > Your best bet would be to target your second level li and a's > specifically so that you end up with the default as you currently have > it but then also: > > .sf-menu li ul li, .sf-menu li ul li a > { > background-color:#330; /* different from the top level */ > > } > > You can of course also target all the various states such as hover, > focus etc. > > HTH, > Schalk > > > > Tipem wrote: > > Hi, > > > Here's my Superfish menu: > > > > > [code] > > > > > > > class="sf-menu-tab-img"> > onmouseout="this.src='/images/tab_cave.gif'" alt="The Cave" title="The > > Cave"> > > > > > > > class="sf-menu-tab-img"> > > > > > > > class="sf-menu-tab-img"> > > > > > > > class="sf-menu-tab-img"> > onmouseout="this.src='/images/tab_cove.gif'" alt="Your Cove" > > title="Your Cove"> > > > > > > > class="sf-menu-tab-img"> > > > > > > > href="#aa">Your Profile > > > > > > > href="#ab">Your Friends (2) > > > > > > > href="#ac">eggShout™ > > > > > > > > > > [/code] > > > > > > What I am trying to do is have the HOVER background color for the top > > level li be different than the rest of the li hovers. The default CSS > > code: > > > .sf-menu li:hover, .sf-menu li.sfHover, > > .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { > > background: #93a28d; > > outline: 0; > > } > > > is what triggers the background color change. But that applies it > > globally, to all li and a elements within the Superfish menu. How can > > I change the hover background color for just the TOP LEVEL LI and rest > > of the li's have the #93a28d hover (above)? > > > Best, > > Ian > > > > volume4_schalk.vcf > < 1KViewDownload
[jQuery] Re: Superfish Question
Hi there Ian, Your best bet would be to target your second level li and a's specifically so that you end up with the default as you currently have it but then also: .sf-menu li ul li, .sf-menu li ul li a { background-color:#330; /* different from the top level */ } You can of course also target all the various states such as hover, focus etc. HTH, Schalk Tipem wrote: Hi, Here's my Superfish menu: [code] Your Profile Your Friends (2) eggShout™ [/code] What I am trying to do is have the HOVER background color for the top level li be different than the rest of the li hovers. The default CSS code: .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #93a28d; outline:0; } is what triggers the background color change. But that applies it globally, to all li and a elements within the Superfish menu. How can I change the hover background color for just the TOP LEVEL LI and rest of the li's have the #93a28d hover (above)? Best, Ian begin:vcard fn:Schalk Neethling n:Neethling;Schalk org:Overt Strategy Consulting adr:Florauna;;Berg ave 642;Pretoria;Gauteng;0182;South Africa email;internet:sch...@overtstrategyconsulting.com title:President tel;work:+27125468436 x-mozilla-html:FALSE url:http://www.overtstrategyconsulting.com version:2.1 end:vcard
[jQuery] Re: Combining Selectors
To help troubleshoot, take jQuery out of the picture and replace your alert with: alert( this + " input[type='submit']" ); That will make it clear what the problem is. Since concatenating "this" to a string doesn't work, how do you fix it? Use the second argument to the $ function: $( selector, context ) Like this: alert( $( " input[type='submit']", this ).attr('id') ); -Mike > From: Nic Hubbard > > I am confused why the following is returning undefined: > > alert($(this + " input[type='submit']").attr('id')); > > This is within the context of a plugin that I built. > Removing the this makes it correctly find the input, why I > want to narrow the scope. >
[jQuery] Superfish Question
Hi, Here's my Superfish menu: [code] Your Profile Your Friends (2) eggShout™ [/code] What I am trying to do is have the HOVER background color for the top level li be different than the rest of the li hovers. The default CSS code: .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #93a28d; outline:0; } is what triggers the background color change. But that applies it globally, to all li and a elements within the Superfish menu. How can I change the hover background color for just the TOP LEVEL LI and rest of the li's have the #93a28d hover (above)? Best, Ian
[jQuery] Re: Combining Selectors
De: "Nic Hubbard" I am confused why the following is returning undefined: alert($(this + " input[type='submit']").attr('id')); Try the following: Get rid of the blank space before input. from: ... " input[type='submit'] ... to: ... "input[type='submit'] ... Regards, Maurício
[jQuery] Re: submit() question
What do you mean by "wrap 'submit()' that is built in 'form object'" ? Sorry I didn't understand ) kcis...@hotmail.com wrote: > > > I guess you'd better wrap 'submit()' that is built in 'form object'. > before the submit() is called, you should set the values. > > > > On 4월5일, 오후1시48분, debussy007 wrote: >> Hi, >> >> In my submit() callback function, I want to set two new values in some >> hidden input fields right before the post data is submitted, based on the >> values the user inputs in some input fields. >> However it seems already too late, the server will never have those >> values >> unfortunately. >> >> So I wonder if there is any way to achieve this. >> >> Thank you for any kind help. >> -- >> View this message in >> context:http://www.nabble.com/submit%28%29-question-tp22896425s27240p22896425... >> Sent from the jQuery General Discussion mailing list archive at >> Nabble.com. > > -- View this message in context: http://www.nabble.com/submit%28%29-question-tp22896425s27240p22899380.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Combining Selectors
I am confused why the following is returning undefined: alert($(this + " input[type='submit']").attr('id')); This is within the context of a plugin that I built. Removing the this makes it correctly find the input, why I want to narrow the scope.
[jQuery] Simple way to check for duplicate menu values in jquery?
Hi, I have a number of select menus on my page, each containing the same list of options (values and text). What is the simplest way to check that a value in one select menu is unique? My goal is to verify that all menu values are unique. Thanks, - Dave
[jQuery] Re: listening for any dom change
Firefox has events for node insertion etc: https://developer.mozilla.org/En/DOM_Events but they are not available to IE, and can incur in significant overhead for the page. If you're in control of the whole app's code, couldn't you just add a callback for when a widget is added? On Apr 5, 2:08 am, will wrote: > Hi, > > I'm trying to bind a function to the body element of a document that > will fire any time any part of the page's DOM changes. > > $("body").change() doesn't seem to do it. It does for some changes but > not all. In particular, not when HTML or element attributes are added/ > removed. Sorta key! It does trigger when a jEditable element is > "saved". > > What I'm trying to accomplish, in case some one can suggest another > way: I'm making something sort of like iGoogle. When some one adds or > edits a widget, I want to let them know the page contains changes and > they orta think about saving it. Autosave isn't really an option as > this app will save multiple pages. > > I'd appreciate any insight. > > Will
[jQuery] Re: jQuery.support -- No direct support for IE6 detection
You're still missing the point. You'll never be able to securely detect a browser version with $.support, it's not meant for that. In your case you still need *browser* detection (unless you figure out a way of testing if transparent PNGs are supported or not): if ($.browser.msie && $.browser.version == 6){ // apply pngfix } Read more about feature detection and you'll understand what I mean: http://docs.jquery.com/Utilities/jQuery.support http://blog.clintecker.com/post/66129101/as-of-5985-jquery-advocates-feature-detection-over cheers, - ricardo On Apr 5, 1:21 pm, Joe McCann wrote: > I've tried multiple combinations of the $.support method's properties > and have had zero success with properly detecting IE6. Does IE6 have > a specific feature that IE7 and IE8 do not have? > > On Apr 5, 6:21 am, akzhan wrote: > > > Also I suppose that jQuery.support can add key handling browser mode. > > > WebKit, Mozilla and IE works different on key events. > > > On Apr 5, 8:45 am, Ricardo wrote: > > > > jQuery.support is for feature detection. The whole point of it is to > > > avoid browser detection - which is still available via jQuery.browser. > > > Instead of sniffing the browser and serving fixes according to > > > previous knowledge about it's flaws, you check for correct > > > implementations of the exact features you need, browser agnostic. > > > > cheers, > > > - ricardo > > > > On Apr 4, 1:43 pm, Joe wrote: > > > > > I'm all for migrating to the jQuery.support() utility method, but > > > > there is not definitive test available to detect IE6 specifically. Do > > > > we have a consensus on this yet?
[jQuery] Re: submit() question
I guess you'd better wrap 'submit()' that is built in 'form object'. before the submit() is called, you should set the values. On 4월5일, 오후1시48분, debussy007 wrote: > Hi, > > In my submit() callback function, I want to set two new values in some > hidden input fields right before the post data is submitted, based on the > values the user inputs in some input fields. > However it seems already too late, the server will never have those values > unfortunately. > > So I wonder if there is any way to achieve this. > > Thank you for any kind help. > -- > View this message in > context:http://www.nabble.com/submit%28%29-question-tp22896425s27240p22896425... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: code review for short snippet
We're drifting off-topic here, but I think you can escape the $ in interpreted strings: "This is some text with a php $var and some text with a dollar sign \ $epc in it" On Apr 5, 4:02 pm, John H wrote: > > Although not jquery related - I would suggest always using php > > variables outsite a string and use single quotes. > > It enables proper syntax highlighting in editors and makes the code > > easier to read for you and any future developers. > > I completely agree about concatenating variables in php strings. > > However this particular issue was php interpreting a javascript > variable beginning with $ included in an inline string.
[jQuery] NEWBIE - IE7 vs FireFox, Safari, etc...
Hi all I'm just getting started with jQuery, and trying to use the slideToggle () function. I have this working on a test page of my site. On Firefox 3.0x, Safari, etc. this works great, looks great. On IE7 (and older), the function works but with a major difference in how the text is laid out in when revealed. As the text initially renders, it momentarily looks exactly like how it should, and matches that of FF and other browsers, the entire body is properly indented. However, after a very brief time, the text repaints, and the first line is always left justified, with the rest content indented (as is should be). This also happens with the other jQuery function Toggle(). It doesn't matter what CSS definitions are for the DD tag's content - IE messes this up. Hoping someone can help! Thanks, Jerry === Here's the code (taken from the jQuery tutorial on this): // For hide/reveal of FAQ styled text that uses and tags $(document).ready(function() { $('#faq').find('dd').hide().end().find('dt').click(function() { $(this).next().slideToggle(); }); });
[jQuery] Re: Is there a way to use this function without clicking the link twice?
Thanks, T.J. That looks like what I'm need to solve the issues. I'll give it a whirl! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of T.J. Crowder Sent: Sunday, April 05, 2009 1:07 PM To: jQuery (English) Subject: [jQuery] Re: Is there a way to use this function without clicking the link twice? Hi Rick, > Question...I've begun to use named functions so that > I can target them from multiple locations. Kind of like > the old subroutines I programmed 29 years ago in BASIC. > > Is there a way to be able to target them besides using > "onClick" and remaining unobtrusive? > ... > Using my typical approach of firing a function based > on $('#myID').click(function(){ requires a section > of code for each id or class or whatever that is clicked. You can use named functions anywhere you can use anonymous functions. So for instance, these two bits of code are nearly identical: * * * * Using anonymous function: $('#myid').click(function() { // ...do stuff here... }); * * * * * * * * Using named function: function someClickHandler() { // ...do stuff here... } $('#myid').click(someClickHandler); * * * * I say "nearly" identical because one of them declares an identifier for the function, and the other doesn't. So if you want to define your handlers, then hook them up at document load time: * * * * function someClickHandler() { // ...do stuff here... } $(document).ready(function() { $('#myid').click(someClickHandler); }); * * * * Naturally, if you want your document ready init code in a named function, you can do that too. FWIW, wrt your comment about writing BASIC subroutines: You can organize your functions in JavaScript to a very significant degree, they don't all have to be globals. JavaScript provides very powerful OOP features in the form of prototypical inheritance. You can also simulate class-based inheritance if you like, although JavaScript is not class-oriented; it's that flexible. :-) HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Apr 5, 3:18 pm, "Rick Faircloth" wrote: > Thanks for the info, Donny! > > Perhaps as my coding technique advances with > jQuery and, especially AJAX, I'll find better ways > to streamline function use. > > Question...I've begun to use named functions so that > I can target them from multiple locations. Kind of like > the old subroutines I programmed 29 years ago in BASIC. > > Is there a way to be able to target them besides using > "onClick" and remaining unobtrusive? > > Using my typical approach of firing a function based > on $('#myID').click(function(){ requires a section > of code for each id or class or whatever that is clicked. > > How can I set up my code so that I can target a named function > without reference to the triggering code, such as with "onClick" > which is embedded within the triggering code, itself? > > Thanks, > > Rick > > > > -Original Message- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Donny Kurnia > Sent: Sunday, April 05, 2009 9:44 AM > To: jquery-en@googlegroups.com > Subject: [jQuery] Re: Is there a way to use this function without clicking the link twice? > > Rick Faircloth wrote: > > Strange question, I know and perhaps stranger coding, but > > Im trying to trigger a function with a text link and it works, but with the > > function coded as is, the link has to be clicked twice. > > > Id like to keep the function coded starting with function > > ajaxCreateStoryTitle() { > > rather than (document).ready(function() { for code organization > > purposes, but using > > function causes the text link to have to be clicked twice to fully > > execute the function. > > > All this has to do with a method Im trying to organize a lot of code > > thats needed to > > create an ajax-driven, single-interface page. > > > Anyway heres the trigger link: > > > onClick=fnCreateStoryTitle();>create title > > Clicking that link fire this function: > > function fnCreateStoryTitle() { ajaxCreateStoryTitle(); } > > The function, ajaxCreateStoryTitle(); starts like this: > > --- > > function ajaxCreateStoryTitle() { > > $(#createStoryTitleLink).click(function() { > > titleValue = > > $(this).parent().parent().find(#createStoryTitleInput)val(); > > etc > > -- > > Because of this coding, I have to click the text link above twice; once > > to trigger the function > > > and the second time to trigger the > > $(#createStoryTitleLink).click(function() { line. > > > I need the titleValue line to obtain the value of the text input > > #createStoryTitleInput. > > > Perhaps theres a different way to get that value other than with the > > click function? > > > There may be a better way to achieve code organization that what Im > > doing, but its just > > my way of evolving my co
[jQuery] Re: code review for short snippet
> Although not jquery related - I would suggest always using php > variables outsite a string and use single quotes. > It enables proper syntax highlighting in editors and makes the code > easier to read for you and any future developers. I completely agree about concatenating variables in php strings. However this particular issue was php interpreting a javascript variable beginning with $ included in an inline string.
[jQuery] Re: jQuery in Firefox extension is broken in v1.3.2
What add-ons do you have installed in Firefox? And do you have a public page we can test with our Firefox clients? On Apr 4, 9:07 am, "bjorn.frant...@gmail.com" wrote: > I've seen this post now, but I can's see my problem mentioned there. > > My extension breaks the toolbar in Firefox if I have remove all other > scripts in the XUL and only leaves jQuery there, no other code at all: > > > http://www.mozilla.org/keymaster/ > gatekeeper/there.is.only.xul"> > type="application/x-javascript"> > > > So this is not caused by any code written bye me, but the inclusion of > jQuery. > > Bjørn > > On Apr 3, 4:38 pm, MorningZ wrote: > > > > > I would suggest to take a look at this great blog post > > >http://www.learningjquery.com/2009/03/3-quick-steps-for-a-painless-up... > > > see if any of those breaking changes applies to your code.. the > > ":visible" change really is a big one... the "@" in the selector is > > more an annoyance but anyways, maybe one of those 3 tips will help > > you fix your issue > > > On Apr 3, 7:59 am, "bjorn.frant...@gmail.com" > > > wrote: > > > I am developing a Firefox extension and after upgrading from jQuery > > > v1.2.6 to v1.3.2 I found that including jQuery in the XUL-file will > > > break other extensions that displays buttons on the toolbar, among > > > those is Adblock Plus. > > > > I have not tried any versions between those mentioned so I do not know > > > in what version this happened. If i revert to v1.2.6 everything is > > > OK.
[jQuery] submit() question
Hi, In my submit() callback function, I want to set two new values in some hidden input fields right before the post data is submitted, based on the values the user inputs in some input fields. However it seems already too late, the server will never have those values unfortunately. So I wonder if there is any way to achieve this. Thank you for any kind help. -- View this message in context: http://www.nabble.com/submit%28%29-question-tp22896425s27240p22896425.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: [autocomplete] showing a 'no results' message
Good idea. That seems related to this: http://groups.google.com/group/jquery-en/browse_frm/thread/b09b3cb98a2638eb/79d223033c3e32b3 On Sun, Apr 5, 2009 at 11:45 AM, Ido Schacham wrote: > > Hi, > > In case there is no matched result when using the autocomplete plugin, > is there a way to show a 'no results' message to the user in the > results div, one that wouldn't be selectable and possibly in a > different style? > > I've read the documentation and searched the forum for this issue but > couldn't find an answer. > > > Thanks, > > Ido >
[jQuery] Re: jquery media bug in IE? (jquery.media)
On Apr 5, 12:49 pm, Bro wrote: > I've got the same problem :( > > On 19 mar, 23:45, Steve wrote: > > > Hi all, > > > I am getting a Javascripterrorwhen using the media plugin (http:// > > plugins.jquery.com/project/media) in IE at the page: > > >http://www.bbhscanners.com/products/ngenuity/ > > > (works fine in FF and other browsers). The scripterrorfrom IE is > > about a missingobject("objectrequired") and occurs on page load and > > when you close the browser. > > > Theerrormessage when the page loads occurs in the function: > > > function __flash__addCallback(instance, name) { > > instance[name] = function () { > > return eval(instance.CallFunction(" > returntype=\"javascript\">" + __flash__argumentsToXML > > (arguments,0) + "")); > > } > > > } > > > Theerrorwhen shutting down the browser comes from this function: > > > function __flash__removeCallback(instance, name) { > > instance[name] = null; > > > } > > > Any ideas how to fix this for IE? > > > thanks, > > Steve > > Please search this google group for a solution. This same problem has come up at least twice recently and it is not a problem with the plugin directly, but the flash player instead. Mike
[jQuery] Re: Newbie--can't get cycle plugin to work with anchor
> There's a lot more to the code (of course), but I selected what I > thought was necessary--if you want, I could put my whole entire > website into a zip file and send it to you. You should give the anchors a 'block' display style: #slideshow a { display: block } If that doesn't work then please post a link to your website. Mike
[jQuery] Re: jquery media bug in IE? (jquery.media)
I've got the same problem :( On 19 mar, 23:45, Steve wrote: > Hi all, > > I am getting a Javascripterrorwhen using the media plugin (http:// > plugins.jquery.com/project/media) in IE at the page: > > http://www.bbhscanners.com/products/ngenuity/ > > (works fine in FF and other browsers). The scripterrorfrom IE is > about a missingobject("objectrequired") and occurs on page load and > when you close the browser. > > Theerrormessage when the page loads occurs in the function: > > function __flash__addCallback(instance, name) { > instance[name] = function () { > return eval(instance.CallFunction(" returntype=\"javascript\">" + __flash__argumentsToXML > (arguments,0) + "")); > } > > } > > Theerrorwhen shutting down the browser comes from this function: > > function __flash__removeCallback(instance, name) { > instance[name] = null; > > } > > Any ideas how to fix this for IE? > > thanks, > Steve
[jQuery] jCarousel as Marqee Test
Hello together, I wanna use jCarousel as you can see it here http://www.dslproviderwechsel.de in the header (the scrolling company logos). Do you know the parameters for jCarousel to display the plugin as in the example. Currently I have the following problems: - the autoscroll function does not scroll smooth, it stops after every list item - can I scroll the list elements without end? Here are my current parameters: scroll: 1, auto: 1, animation: 9000, buttonNextHTML: 0, buttonPrevHTML: 0 Thanks for your support Florian
[jQuery] Re: Cannot call a function within the callback part of $.get in IE7
I've got the same problem What's the extra comma problem ? On 31 mar, 23:16, Jacob wrote: > I replied earlier that I had the same problem. I got my problem > resolved - the issue was in my external function, which had the IE > "extra comma" problem. Maybe there is a similar situation with your > code. > > On Mar 22, 6:40 pm, zephyr wrote: > > > Hi, > > > I make Ajax ($.get) calls and in the calback part I call a function > > defined elsewhere. In FireFox this is no problem. When I checked in IE > > however I kept getting anerror'objectexpected'. It took a while to > > figure out that if I remove the _call_ to the function with the actual > > function body (the code defined in the function handler) the problem > > disappeared and IE does not complain.. So instead of this: > > > $(document).ready(function(){ > > $('#login').click(function(){ > > $.get( > > "/?event=cms.showlogin", > > function(res){ > > removeLoginWindow(); > > addStyleSheet('/cms/css/cms.css') > > $(document.body).append(res); > > > > $('#closeButton').click(function(){removeLoginWindow()}) > > $('#closeButton').css('cursor','pointer') > > $('.loginWindow').draggable() > > $("#loginWindow > > input:text[name='username']")[0].focus() > > }, > > "html" > > ) > > showLoginWindow() > > }); > > > }) > > > I need top switch the calls to removeLoginWindow() and addStyleSheet('/ > > cms/css/cms.css') with the actual code of these functions. > > > Is there no workaround for this or am I doing somehting wrong? > > > jquery-1.3.2.min.js > > IE 7.0 > > FF 3.07 > > Win XP sp2 > > > Thanks, > > > Marc
[jQuery] Re: Dynamically changing the source of SWF call
Thanks Mike, I was in Andy's situation and was able to use jQuery 1.3.1's live click event to reload your Media plugin and get this situation to work. Here's the final outcome: http://www.similarsounds.com/?terms=mgmt The YouTube movie thumbnails all function using code similar to Andy's. I empty() the current video content and then grab the href attribute from the thumbnail and place it in a class="media" anchor. From there I call another instance of media(). If anyone else needs to do something like this the code can be seen in: http://www.similarsounds.com/js/global.js Reference the comment "// Thumbnails Navigation" Thanks again, I love the plugin keep up the good work malsup wrote: > >> Say mc_01.swf is the initial SWF that's loaded. I want to be able to >> click a >> button/text link labeled "two" and have mc_02.swf load in place of >> mc_01.swf. I want to be able to do this for other buttons as well. I >> think >> it should be possible, but I'm just not sure how to proceed. > > Andy, > > For cross-browser reliability you'll probably want to swap out the > whole object/embed tag and regenerate it for the new movie source. > You can get some ideas fom this flash plugin: > > http://malsup.com/jquery/media/ > > It generates the proper HTML (using swfobject.js) and then does an > empty().html(..) on the target. > > Mike > > ___ > jQuery mailing list > disc...@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/Dynamically-changing-the-source-of-SWF-call-tp7835450s27240p22895146.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] [autocomplete] showing a 'no results' message
Hi, In case there is no matched result when using the autocomplete plugin, is there a way to show a 'no results' message to the user in the results div, one that wouldn't be selectable and possibly in a different style? I've read the documentation and searched the forum for this issue but couldn't find an answer. Thanks, Ido
[jQuery] Re: Is there a way to use this function without clicking the link twice?
Hi Rick, > Question...I've begun to use named functions so that > I can target them from multiple locations. Kind of like > the old subroutines I programmed 29 years ago in BASIC. > > Is there a way to be able to target them besides using > "onClick" and remaining unobtrusive? > ... > Using my typical approach of firing a function based > on $('#myID').click(function(){ requires a section > of code for each id or class or whatever that is clicked. You can use named functions anywhere you can use anonymous functions. So for instance, these two bits of code are nearly identical: * * * * Using anonymous function: $('#myid').click(function() { // ...do stuff here... }); * * * * * * * * Using named function: function someClickHandler() { // ...do stuff here... } $('#myid').click(someClickHandler); * * * * I say "nearly" identical because one of them declares an identifier for the function, and the other doesn't. So if you want to define your handlers, then hook them up at document load time: * * * * function someClickHandler() { // ...do stuff here... } $(document).ready(function() { $('#myid').click(someClickHandler); }); * * * * Naturally, if you want your document ready init code in a named function, you can do that too. FWIW, wrt your comment about writing BASIC subroutines: You can organize your functions in JavaScript to a very significant degree, they don't all have to be globals. JavaScript provides very powerful OOP features in the form of prototypical inheritance. You can also simulate class-based inheritance if you like, although JavaScript is not class-oriented; it's that flexible. :-) HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Apr 5, 3:18 pm, "Rick Faircloth" wrote: > Thanks for the info, Donny! > > Perhaps as my coding technique advances with > jQuery and, especially AJAX, I'll find better ways > to streamline function use. > > Question...I've begun to use named functions so that > I can target them from multiple locations. Kind of like > the old subroutines I programmed 29 years ago in BASIC. > > Is there a way to be able to target them besides using > "onClick" and remaining unobtrusive? > > Using my typical approach of firing a function based > on $('#myID').click(function(){ requires a section > of code for each id or class or whatever that is clicked. > > How can I set up my code so that I can target a named function > without reference to the triggering code, such as with "onClick" > which is embedded within the triggering code, itself? > > Thanks, > > Rick > > > > -Original Message- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > Behalf Of Donny Kurnia > Sent: Sunday, April 05, 2009 9:44 AM > To: jquery-en@googlegroups.com > Subject: [jQuery] Re: Is there a way to use this function without clicking > the link twice? > > Rick Faircloth wrote: > > Strange question, I know…and perhaps stranger coding, but… > > I’m trying to trigger a function with a text link and it works, but with the > > function coded as is, the link has to be clicked twice. > > > I’d like to keep the function coded starting with “function > > ajaxCreateStoryTitle() {“ > > rather than “(document).ready(function() {“ for code organization > > purposes, but using > > “function… causes the text link to have to be clicked twice to fully > > execute the function. > > > All this has to do with a method I’m trying to organize a lot of code > > that’s needed to > > create an ajax-driven, single-interface page. > > > Anyway…here’s the trigger link: > > > onClick=”fnCreateStoryTitle();”>create title > > Clicking that link fire this function: > > function fnCreateStoryTitle() { ajaxCreateStoryTitle(); } > > The function, “ajaxCreateStoryTitle();” starts like this: > > --- > > function ajaxCreateStoryTitle() { > > $(‘#createStoryTitleLink’).click(function() { > > titleValue = > > $(this).parent().parent().find(‘#createStoryTitleInput)val(); > > etc… > > -- > > Because of this coding, I have to click the text link above twice; once > > to trigger the function > > > and the second time to trigger the > > $(‘#createStoryTitleLink’).click(function() { line. > > > I need the “titleValue” line to obtain the value of the text input > > “#createStoryTitleInput”. > > > Perhaps there’s a different way to get that value other than with the > > “click” function? > > > There may be a better way to achieve code organization that what I’m > > doing, but it’s just > > my way of evolving my coding style using jQuery and AJAX. > > > Suggestions? Another way to code the function “ajaxCreateStoryTitle()” > > and still > > be able to reference the titleValue in the input > > “#createStoryTitleInput” ??? > > > Thanks for taking time to read through this… > > > Rick > > If you insist to use onClick, then you don't need > $(‘#createStoryTitleLink’).click
[jQuery] Re: Newbie--can't get cycle plugin to work with anchor
Um, anyone . . . ? I kinda need help asap. On Apr 1, 8:41 pm, yulucyhan2008 wrote: > Hi! I'm really new to web building in general, so I'm guessing that > this is a really newbie question, but I can't get thecycleplugin to > work withanchor. I followed the example given > fromhttp://www.malsup.com/jquery/cycle/anchor.html, but the anchors just > won't work--the images stop cycling right after I put the code in, > actually. I've googled everywhere to try to solve my problem, and I > searched through this discussion site, too, but nothing helped me. > So, I decided to join this group and post this . . . > > This is my code: > > HTML: > > > > > http://www.google.com";> src="images/content/pic01.jpg" > border="0" /> > /> > /> > /> > > > > > CSS: > > #slideshow { > margin: 0; > padding: 0; > width: 543px; > height: 377px; > overflow: hidden; > z-index: -1; > } > > Javascript/JQuery: > > > > > > $(document).ready(function(){ > > $('div#main div#content div#slideshow').cycle({ > fx: 'fade', > after: onAfter > }); > > }); > > > > There's a lot more to the code (of course), but I selected what I > thought was necessary--if you want, I could put my whole entire > website into a zip file and send it to you. > > So . . . yeah. Help, please!
[jQuery] [treeview] location persistance + ajax load problem
[SORRY!, this is a proper message, the first one i forgot to add a topic] hey all, having a problem with treeview by Jörn Zaefferer. I load the content from json, but i lose persistance of location. i get the tree folded and i don't know what branch i'm on to. i managed to fix this by pasting the location code in .async.js, var sm = current.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); }); if ( sm.length ) { sm.addClass("selected").parents ("ul, li").add( sm.next() ).show (); } but now the branch is marked as selected, however the tree is not open (all folded) any ideas?
[jQuery] Re: jQuery.support -- No direct support for IE6 detection
I've tried multiple combinations of the $.support method's properties and have had zero success with properly detecting IE6. Does IE6 have a specific feature that IE7 and IE8 do not have? On Apr 5, 6:21 am, akzhan wrote: > Also I suppose that jQuery.support can add key handling browser mode. > > WebKit, Mozilla and IE works different on key events. > > On Apr 5, 8:45 am, Ricardo wrote: > > > jQuery.support is for feature detection. The whole point of it is to > > avoid browser detection - which is still available via jQuery.browser. > > Instead of sniffing the browser and serving fixes according to > > previous knowledge about it's flaws, you check for correct > > implementations of the exact features you need, browser agnostic. > > > cheers, > > - ricardo > > > On Apr 4, 1:43 pm, Joe wrote: > > > > I'm all for migrating to the jQuery.support() utility method, but > > > there is not definitive test available to detect IE6 specifically. Do > > > we have a consensus on this yet?
[jQuery] Re: jQuery.support -- No direct support for IE6 detection
Ricardo, Good point, but it still doesn't answer the question for how to handle applying say a png fix to IE6. I can't simply say: if (!$.support.leadingWhitespace) { // apply pngfix } Because this is for ALL IE versions. This is unacceptable. We still need to know the version of IE and the support method doesn't appear to have that option. Unless I am missing something... Joe On Apr 4, 11:45 pm, Ricardo wrote: > jQuery.support is for feature detection. The whole point of it is to > avoid browser detection - which is still available via jQuery.browser. > Instead of sniffing the browser and serving fixes according to > previous knowledge about it's flaws, you check for correct > implementations of the exact features you need, browser agnostic. > > cheers, > - ricardo > > On Apr 4, 1:43 pm, Joe wrote: > > > I'm all for migrating to the jQuery.support() utility method, but > > there is not definitive test available to detect IE6 specifically. Do > > we have a consensus on this yet?
[jQuery] sendmail with attachment using jquery ajax
Hello to everybody, following the instruction here http://nettuts.com/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ http://nettuts.com/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ i was able to send form contents through ajax. But how can you make this possible if there are attached files (input type="file") to the form? Bye! Alex -- View this message in context: http://www.nabble.com/sendmail-with-attachment-using-jquery-ajax-tp22894868s27240p22894868.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] tabs effect in teh new UI??
Hello there! I am trying to add an effect to the tabs from jquery UI. Like in the 'old' version: http://stilbuero.de/jquery/tabs/ In the section I have: In a scrips.js I have: // Tabs $('#tabs').tabs({ fx: { opacity: 'toggle' } }); How do I add an effect like 'blind' to my tabs? Thanks in advance, kind regards, Arnold
[jQuery] Re: Is there a way to use this function without clicking the link twice?
Thanks for the info, Donny! Perhaps as my coding technique advances with jQuery and, especially AJAX, I'll find better ways to streamline function use. Question...I've begun to use named functions so that I can target them from multiple locations. Kind of like the old subroutines I programmed 29 years ago in BASIC. Is there a way to be able to target them besides using "onClick" and remaining unobtrusive? Using my typical approach of firing a function based on $('#myID').click(function(){ requires a section of code for each id or class or whatever that is clicked. How can I set up my code so that I can target a named function without reference to the triggering code, such as with "onClick" which is embedded within the triggering code, itself? Thanks, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Donny Kurnia Sent: Sunday, April 05, 2009 9:44 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Is there a way to use this function without clicking the link twice? Rick Faircloth wrote: > Strange question, I know…and perhaps stranger coding, but… > I’m trying to trigger a function with a text link and it works, but with the > function coded as is, the link has to be clicked twice. > > I’d like to keep the function coded starting with “function > ajaxCreateStoryTitle() {“ > rather than “(document).ready(function() {“ for code organization > purposes, but using > “function… causes the text link to have to be clicked twice to fully > execute the function. > > All this has to do with a method I’m trying to organize a lot of code > that’s needed to > create an ajax-driven, single-interface page. > > Anyway…here’s the trigger link: > onClick=”fnCreateStoryTitle();”>create title > Clicking that link fire this function: > function fnCreateStoryTitle() { ajaxCreateStoryTitle(); } > The function, “ajaxCreateStoryTitle();” starts like this: > --- > function ajaxCreateStoryTitle() { > $(‘#createStoryTitleLink’).click(function() { > titleValue = > $(this).parent().parent().find(‘#createStoryTitleInput)val(); > etc… > -- > Because of this coding, I have to click the text link above twice; once > to trigger the function > > and the second time to trigger the > $(‘#createStoryTitleLink’).click(function() { line. > > I need the “titleValue” line to obtain the value of the text input > “#createStoryTitleInput”. > > Perhaps there’s a different way to get that value other than with the > “click” function? > > There may be a better way to achieve code organization that what I’m > doing, but it’s just > my way of evolving my coding style using jQuery and AJAX. > > Suggestions? Another way to code the function “ajaxCreateStoryTitle()” > and still > be able to reference the titleValue in the input > “#createStoryTitleInput” ??? > > Thanks for taking time to read through this… > > Rick If you insist to use onClick, then you don't need $(‘#createStoryTitleLink’).click(function() { } it will become like this: function ajaxCreateStoryTitle() { titleValue = $(this).parent().parent().find(‘#createStoryTitleInput)val(); etc… Anyway, personally I'm not like to use onclick. I like the unobtrusive way of jQuery, using either (document).ready(function() { or it short notation: jQuery(function($){ //DOM ready code here. }); The above lines can appear multiple time. I like to write it near the element that need the code, so it keeps the readability and keep the code tidy. -- Donny Kurnia http://hantulab.blogspot.com http://www.plurk.com/user/donnykurnia
[jQuery] Re: Common Problem :: Access Restricted for URI
Shouvik-S-Mazumdar wrote: > > hi , > > well i have searched a lot for this , perhaps i am just unlucky enough not > to hit the bulls eye , so i ask again in this forum ... > > > Well i am using jquery for calling a remote function . I am also using the > CODEIGNITER MVC . i write something like this : > > > $.post("index.php/login/ajaxlogin" , {email : username , pass : password } , > function(data) > { > > > // CODE HERE > > > > > > } > > > > > Now lets say my url is : www.XYZ.com/index.php/welcome > > > if i directly type thus URL in the adress bar and press enter .. my ajax > call doesnt work :( . however if i reach at the same url following a > hyperlink somewhere in my website the ajax routine works perfectly ! > > The error in the first case : > > Access to restricted URI denied" code: "1012 > > > > I have tried every possible way to sort this matter out. i am not on my > development pc but on a web server . > > please do help me out ... > > > I'm also using codeigniter, and I like to write the ajax call with the CodeIgniter's URL helper: $.post("" ,{email : username , pass : password } ,function(reply) { //CODE HERE }); This only work if the page also served by CodeIgniter's controller. If it from external page, you must put the complete url: http://domain.com//index.php/login/ajaxlogin I'm never had problems with CodeIgniter and AJAX call using jQuery. -- Donny Kurnia http://hantulab.blogspot.com http://www.plurk.com/user/donnykurnia
[jQuery] Re: Nested sortable unordered list - parent li moves along with nested list
One more thing I forgot to add. I am not trying to add the ability to move list items from one list to another, just reorder the items within their own list.
[jQuery] Re: Is there a way to use this function without clicking the link twice?
Rick Faircloth wrote: > Strange question, I know…and perhaps stranger coding, but… > I’m trying to trigger a function with a text link and it works, but with the > function coded as is, the link has to be clicked twice. > > I’d like to keep the function coded starting with “function > ajaxCreateStoryTitle() {“ > rather than “(document).ready(function() {“ for code organization > purposes, but using > “function… causes the text link to have to be clicked twice to fully > execute the function. > > All this has to do with a method I’m trying to organize a lot of code > that’s needed to > create an ajax-driven, single-interface page. > > Anyway…here’s the trigger link: > onClick=”fnCreateStoryTitle();”>create title > Clicking that link fire this function: > function fnCreateStoryTitle() { ajaxCreateStoryTitle(); } > The function, “ajaxCreateStoryTitle();” starts like this: > --- > function ajaxCreateStoryTitle() { > $(‘#createStoryTitleLink’).click(function() { > titleValue = > $(this).parent().parent().find(‘#createStoryTitleInput)val(); > etc… > -- > Because of this coding, I have to click the text link above twice; once > to trigger the function > > and the second time to trigger the > $(‘#createStoryTitleLink’).click(function() { line. > > I need the “titleValue” line to obtain the value of the text input > “#createStoryTitleInput”. > > Perhaps there’s a different way to get that value other than with the > “click” function? > > There may be a better way to achieve code organization that what I’m > doing, but it’s just > my way of evolving my coding style using jQuery and AJAX. > > Suggestions? Another way to code the function “ajaxCreateStoryTitle()” > and still > be able to reference the titleValue in the input > “#createStoryTitleInput” ??? > > Thanks for taking time to read through this… > > Rick If you insist to use onClick, then you don't need $(‘#createStoryTitleLink’).click(function() { } it will become like this: function ajaxCreateStoryTitle() { titleValue = $(this).parent().parent().find(‘#createStoryTitleInput)val(); etc… Anyway, personally I'm not like to use onclick. I like the unobtrusive way of jQuery, using either (document).ready(function() { or it short notation: jQuery(function($){ //DOM ready code here. }); The above lines can appear multiple time. I like to write it near the element that need the code, so it keeps the readability and keep the code tidy. -- Donny Kurnia http://hantulab.blogspot.com http://www.plurk.com/user/donnykurnia
[jQuery] Re: code review for short snippet
Excellent use of trigger to fire the function once on page load > Yes, yes, you are correct. I am outputting the javascript from php, > which was interpreting $epc because the inline string was wrapped in > double quotes. I reversed everything (using double quotes internally) > and now the variable isn't getting improperly stripped out. Although not jquery related - I would suggest always using php variables outsite a string and use single quotes. It enables proper syntax highlighting in editors and makes the code easier to read for you and any future developers. 'This is a ' . $value . ' with php ' . $variables " . in it' is far easier to spot in a 1000 line php file than "This is a $value with php $variables in it" and the processing speed difference is negligable
[jQuery] Common Problem :: Access Restricted for URI
hi , well i have searched a lot for this , perhaps i am just unlucky enough not to hit the bulls eye , so i ask again in this forum ... Well i am using jquery for calling a remote function . I am also using the CODEIGNITER MVC . i write something like this : $.post("index.php/login/ajaxlogin" , {email : username , pass : password } , function(data) { // CODE HERE } Now lets say my url is : www.XYZ.com/index.php/welcome if i directly type thus URL in the adress bar and press enter .. my ajax call doesnt work :( . however if i reach at the same url following a hyperlink somewhere in my website the ajax routine works perfectly ! The error in the first case : Access to restricted URI denied" code: "1012 I have tried every possible way to sort this matter out. i am not on my development pc but on a web server . please do help me out ... -- View this message in context: http://www.nabble.com/Common-Problem-%3A%3A-Access-Restricted-for-URI-tp22891980s27240p22891980.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] [treeview]
hey all, having a problem with treeview by Jörn Zaefferer. I load the content from json, but i lose persistance of location. i get the tree folded and i don't know what branch i'm on to. i managed to fix this by pasting the location code in .async.js, var sm = current.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); }); if ( sm.length ) { sm.addClass("selected").parents("ul, li").add( sm.next() ).show (); } but now the branch is marked as selected, however the tree is not open (all folded) any ideas?
[jQuery] Re: jQuery.support -- No direct support for IE6 detection
Also I suppose that jQuery.support can add key handling browser mode. WebKit, Mozilla and IE works different on key events. On Apr 5, 8:45 am, Ricardo wrote: > jQuery.support is for feature detection. The whole point of it is to > avoid browser detection - which is still available via jQuery.browser. > Instead of sniffing the browser and serving fixes according to > previous knowledge about it's flaws, you check for correct > implementations of the exact features you need, browser agnostic. > > cheers, > - ricardo > > On Apr 4, 1:43 pm, Joe wrote: > > > I'm all for migrating to the jQuery.support() utility method, but > > there is not definitive test available to detect IE6 specifically. Do > > we have a consensus on this yet?
[jQuery] Is there a way to use this function without clicking the link twice?
Strange question, I know.and perhaps stranger coding, but. I'm trying to trigger a function with a text link and it works, but with the function coded as is, the link has to be clicked twice. I'd like to keep the function coded starting with "function ajaxCreateStoryTitle() {" rather than "(document).ready(function() {" for code organization purposes, but using "function. causes the text link to have to be clicked twice to fully execute the function. All this has to do with a method I'm trying to organize a lot of code that's needed to create an ajax-driven, single-interface page. Anyway.here's the trigger link: create title Clicking that link fire this function: function fnCreateStoryTitle() { ajaxCreateStoryTitle(); } The function, "ajaxCreateStoryTitle();" starts like this: --- function ajaxCreateStoryTitle() { $('#createStoryTitleLink').click(function() { titleValue = $(this).parent().parent().find('#createStoryTitleInput)val(); etc. -- Because of this coding, I have to click the text link above twice; once to trigger the function and the second time to trigger the $('#createStoryTitleLink').click(function() { line. I need the "titleValue" line to obtain the value of the text input "#createStoryTitleInput". Perhaps there's a different way to get that value other than with the "click" function? There may be a better way to achieve code organization that what I'm doing, but it's just my way of evolving my coding style using jQuery and AJAX. Suggestions? Another way to code the function "ajaxCreateStoryTitle()" and still be able to reference the titleValue in the input "#createStoryTitleInput" ??? Thanks for taking time to read through this. Rick --- "It has been my experience that most bad government is the result of too much government." - Thomas Jefferson
[jQuery] Re: code review for short snippet
> Note that, clicking "More options", you can delete your posts. Thanks Steve. I have removed the repeated posts.
[jQuery] Re: code review for short snippet
> > I had to remove the dollar sign from $epc otherwise Firefox > > reported "missing variable name". > > That doesn't sound right - there must have been something else causing that. Yes, yes, you are correct. I am outputting the javascript from php, which was interpreting $epc because the inline string was wrapped in double quotes. I reversed everything (using double quotes internally) and now the variable isn't getting improperly stripped out. Thanks again for all the great information. I'm having a blast with jquery!