[jQuery] Re: Filter (attribute, value)
Ok, seems like I misunderstood the way Firebug works. It said the variable was undefined, but when I set the breakpoint on the line under, I got something :) Sorry about that, and thanks for the help!
[jQuery] [treeview] Problem with reloading ajax tree
Hi, I've faced with the problem with reloading ajax tree. I'm reloading it calling treeview() method with all initializaating params, but after that all expandable nodes does not expand. You can reproduce this case with firebug on async tree demo page http://jquery.bassistance.de/treeview/demo/async.html run the following code in console: $(#black).empty().treeview({ url: source.php }) when the tree is loaded 3. After Lunch (120+ min) node does not expand. Is it bug or i just didn't understood how to reload the tree? thanks, George
[jQuery] horizontal image slideshow effect
hi i need a slieshow effec that i want to create for my personal website. following is what i need i want to display an image and below that will be text and this text should be clickable and open in a new window and this way i want to show few images and text with a certain duration for each. there should be no left arrow and right arrow, instead each picture along with the text should move from the right to left or from left to right and stay for few seconds and the next one should appear and the text should be clickable and open in a new window. can anyone refer me to a website from where i can get this effect. please advice. thanks.
[jQuery] Re: .load() and executing JavaScript from loaded content
Hi Wolf, On Aug 14, 6:54 pm, Wolf ventas.w...@gmail.com wrote: I think you should try this, send the script or function. Thanks, but I'm not really interested in a workaround, since I already got one that doesn't involve hacky tricks (send only a bare-bones version of the HTML form if the request is done via AJAX). I'm more interested into why the JavaScript is only executed when loaded with .load(/some/url/), but not with .load(/some/url/ .some- filter). It strikes me as a pretty random behaviour. Regards, Benjamin
[jQuery] jquery and radio buttons
hi, i have this form: form action=action.php name=form_name method=post / input type=text name=text_line / input type=radio name=radio_name value=value1 / input type=radio name=radio_name value=value2 / input type=submit name=submit value=submit disabled=disabled/ input type=reset / and i'm trying to do something like this: when one of the two radio buttons is selected the submit button to become clickable(removing the disabled attribute). i tried this code but with no effect $(input:[...@name='radio_name']).change(function(){ $(input:[...@name='submit']).removeAttr(disabled); }); any help will be appreciated , thanks
[jQuery] imagefit plugin - rescaling images - help needed
Hey guys, http://code.google.com/p/jquery-imagefit-plugin/ This plugin is fantastic and it works well in all A-grade browsers but ideally I would like to get it to work in IE7. As you can see from this test case: http://82.3.177.222/testcase/forums2.php.htm Unfortunately my knowledge of Javascript is at the novice stage so I'm lost as to how I can fix it. Can anyone have an attempt at solving this or suggest an alternative plugin I may have missed? Regards, Will
[jQuery] Re: jquery and radio buttons
SOLVED my selector was wrong, this works fine: $(input:radio).change(function(){ bla bla bla }); On Aug 15, 3:00 pm, kknaru isai...@gmail.com wrote: hi, i have this form: form action=action.php name=form_name method=post / input type=text name=text_line / input type=radio name=radio_name value=value1 / input type=radio name=radio_name value=value2 / input type=submit name=submit value=submit disabled=disabled/ input type=reset / and i'm trying to do something like this: when one of the two radio buttons is selected the submit button to become clickable(removing the disabled attribute). i tried this code but with no effect $(input:[...@name='radio_name']).change(function(){ $(input:[...@name='submit']).removeAttr(disabled); }); any help will be appreciated , thanks
[jQuery] Re: Dealing with errors when .find() on .ajax()
Thanks, but its actually a full webpage im returning. Is there a way of only returning the section of html I want, similar to load('http:// www.examplepage.com #one')? On Aug 15, 12:07 am, comslash.com comsl...@gmail.com wrote: I don't think you can ignore this error ... It looks like you are returning a JSON response, try turning data type to json and then insert responseHTML.One into your find command ... as One is your object ... see below. $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $(responseHTML.One).find('#myDiv').html(); // you may need $('#'+responseHTML.One) ... if you are looking for say an id ... or . + ... if its a class }, dataType: 'json' }); On Aug 14, 9:20 pm, nick nboutel...@gmail.com wrote: $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $(responseHTML).find('#myDiv').html(); // This part returns a script error and aborts anything else from here }, dataType: 'html' }); The problem is that examplepage.com has a script error (Syntax error, unrecognized expression: {One:1) that is messing up anything that searches responseHTML. How can I ignore this error because all I need is a section of html that is not affected by the errant script.
[jQuery] [attribute=value]
This is from http://docs.jquery.com/Selectors/attributeEquals#attributevalue: Variables can be used using the following syntax: [name=' +MyVar + '] Is it right? I can't seem to get it work properly..
[jQuery] blockUI transparent borders
Hello; how can I have transparent borders for modal divs that I bring to frond have transparent borders? specifying: border: 10 px transparent yellow; in the settings.css will not work. I tried few things, and I am beginning to think it is not doable. any ideas, recomendations, help greatly appreciated. Best.
[jQuery] Good Ajax Approach For Name List
I wish to implement a clean solution for a page with Ajax requirements. Given that the user provides a Sample List of Names and a Count reflecting how many actual names there really are for something... Here are some needs of a page: - Let user add a name and store name added immediately - Show sample list given so far - Hides the ability to Add Names if Sample List equals Count - All of this and more using Ajax Some options are available here to meet these requirements. - For showing the list and hiding Add Names when list size = Count, should one: Store the Sample List into something globally accessible in the page OR request the list each time something about the list is needed (size, content) OR What is the simplest and cleanest approach? BTW, the list is requested each time an item is added or removed right now. It seems easier to debug that way. Thanks.
[jQuery] Re: Dealing with errors when .find() on .ajax()
Not sure ... I have never tired that ... but you could try, to parse it in the same way i would parse an xml document, with something like this. $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $('#One', responseHTML).html(); }, dataType: 'html' }); On Aug 15, 9:45 am, nick nboutel...@gmail.com wrote: Thanks, but its actually a full webpage im returning. Is there a way of only returning the section of html I want, similar to load('http://www.examplepage.com#one')? On Aug 15, 12:07 am, comslash.com comsl...@gmail.com wrote: I don't think you can ignore this error ... It looks like you are returning a JSON response, try turning data type to json and then insert responseHTML.One into your find command ... as One is your object ... see below. $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $(responseHTML.One).find('#myDiv').html(); // you may need $('#'+responseHTML.One) ... if you are looking for say an id ... or . + ... if its a class }, dataType: 'json' }); On Aug 14, 9:20 pm, nick nboutel...@gmail.com wrote: $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $(responseHTML).find('#myDiv').html(); // This part returns a script error and aborts anything else from here }, dataType: 'html' }); The problem is that examplepage.com has a script error (Syntax error, unrecognized expression: {One:1) that is messing up anything that searches responseHTML. How can I ignore this error because all I need is a section of html that is not affected by the errant script.
[jQuery] Re: [attribute=value]
Why not show what code doesn't work properly? That would be of help to show the correct way to do it On Aug 15, 10:19 am, Geir gso...@frisurf.no wrote: This is fromhttp://docs.jquery.com/Selectors/attributeEquals#attributevalue: Variables can be used using the following syntax: [name=' +MyVar + '] Is it right? I can't seem to get it work properly..
[jQuery] Re: Good Ajax Approach For Name List
On Aug 15, 5:42 pm, finneycanhelp lovefin...@gmail.com wrote: Some options are available here to meet these requirements. - For showing the list and hiding Add Names when list size = Count, should one: Store the Sample List into something globally accessible in the page OR request the list each time something about the list is needed (size, content) OR What is the simplest and cleanest approach? BTW, the list is requested each time an item is added or removed right now. It seems easier to debug that way. i think that conceptually you're trying to do something like i recently did for an app. It wasn't a list of names, but a list of cybertanks for a wargame i like to play. In that app (http:// wanderinghorse.net/gaming/ogre/byoo/ajax/) i did the following (that's not to imply that this is simplest or cleanest): At startup, i load all of the app data (a bit over 100kb) into the client. It is transfered as JSON and then transformed to higher-level app objects. However, i keep the original JSON db around, partly so that i can figure out if a user has modified an object (i.e. if it needs saving) and partly to implement a revert changes option without having to request the data again. When the user uses save, we convert the high-level app object to JSON, update the local internal copy of the JSON data, and send it off to the server. For really large data sets i wouldn't keep the whole thing in memory, but this particular app is intended to be a rich client, and not just page dressing, so i wasn't too concerned about memory usage. However, i am considering re-modeling it to request data only as needed. i think the determining factory here is how much traffic (and request count) i save using one approach or the other. i haven't analyzed that yet, so i can't yet make an informed decision. Maybe poking around the above app with firebug would prove informative. Feel free to use the editing features (they're open to all w/o any sort of login) - you can then watch the json transactions using firebug.
[jQuery] Re: [attribute=value]
On Aug 15, 4:19 pm, Geir gso...@frisurf.no wrote: This is fromhttp://docs.jquery.com/Selectors/attributeEquals#attributevalue: Variables can be used using the following syntax: [name=' +MyVar + '] Is it right? I can't seem to get it work properly.. Does MyVar contain any quotes or other strangness? Can you post the code?
[jQuery] Re: horizontal image slideshow effect
Answered here: http://groups.google.com/group/jquery-en/browse_thread/thread/dedaa28c91e963c7 - Richard On Sat, Aug 15, 2009 at 7:30 AM, Sudhakar sudhakarar...@gmail.com wrote: hi i need a slieshow effec that i want to create for my personal website. following is what i need i want to display an image and below that will be text and this text should be clickable and open in a new window and this way i want to show few images and text with a certain duration for each. there should be no left arrow and right arrow, instead each picture along with the text should move from the right to left or from left to right and stay for few seconds and the next one should appear and the text should be clickable and open in a new window. can anyone refer me to a website from where i can get this effect. please advice. thanks.
[jQuery] Re: [attribute=value]
Thanks! Finally.. I got it working :) It was getting the quotes right.. My code: $('#Navigation li a[href='+relPath+']')
[jQuery] Re: Filter (attribute, value)
Finally.. I got it working :) It was getting the quotes right.. Solution: $('#Navigation li a[href='+relPath+']') Thanks!
[jQuery] Re: Scrolling problem
I guess I should mention that I'm using jcarousel and thst you need to click on one of the index pictures to start things up. Thanks! On Aug 14, 10:34 pm, Kevin diskhand...@gmail.com wrote: I managed to get the scrolling to kinda work – if I set it up with static LI then I can get the scrolling to work the way I want it to, sans being able to pass the number of the image I want to be shown (unless I put it in the text field of the anchor tag, which shows with the image) but I have no way of passing the other variables to call my updating button. Also, using the static it takes much longer to load the page. I’m looking to be able to set a variable – like NewStrt – to be the first image in the carousel by calling a simple function such as ScrollTo(NewStrt) or mycarousel.ScrollTo(NewStrt). Using the “function mycarousel_initCallback(carousel)” scrolling function doesn’t work with dynamic loading, and I can’t pass my variables with static loading. Please help. If you would like to see what I'm doing to get a better idea, you can see it here (along with my current code): http://ssbbs.dyndns.org/panic/rpicts.asp Thanks in advance for any assistance with this. Kevin
[jQuery] Re: Dealing with errors when .find() on .ajax()
Bummer, still not working. Thanks for the help though. On Aug 15, 11:32 am, comslash.com comsl...@gmail.com wrote: Not sure ... I have never tired that ... but you could try, to parse it in the same way i would parse an xml document, with something like this. $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $('#One', responseHTML).html(); }, dataType: 'html' }); On Aug 15, 9:45 am, nick nboutel...@gmail.com wrote: Thanks, but its actually a full webpage im returning. Is there a way of only returning the section of html I want, similar to load('http://www.examplepage.com#one')? On Aug 15, 12:07 am, comslash.com comsl...@gmail.com wrote: I don't think you can ignore this error ... It looks like you are returning a JSON response, try turning data type to json and then insert responseHTML.One into your find command ... as One is your object ... see below. $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $(responseHTML.One).find('#myDiv').html(); // you may need $('#'+responseHTML.One) ... if you are looking for say an id ... or . + ... if its a class }, dataType: 'json' }); On Aug 14, 9:20 pm, nick nboutel...@gmail.com wrote: $.ajax({ url: 'http://www.examplepage.com', success: function(responseHTML) { var someText = $(responseHTML).find('#myDiv').html(); // This part returns a script error and aborts anything else from here }, dataType: 'html' }); The problem is that examplepage.com has a script error (Syntax error, unrecognized expression: {One:1) that is messing up anything that searches responseHTML. How can I ignore this error because all I need is a section of html that is not affected by the errant script.
[jQuery] Re: Good Ajax Approach For Name List
Thanks for your reply. Yes, they are conceptually quite similar. I appreciate the example you shared. I've been thinking about this some more. Here are thoughts of mine: When dealing with data and communication between machines, it has been my experience that keeping business state (domain data) on the server is best. Where possible, one should code the solution so that data on the client (browser or app) is merely a reflection of the business domain data which is on the server. This can involve getting the whole set of objects from the server instead of just adding/deleting the items in the GUI (browser). This helps with many issues such as someone losing their internet connection and then getting it back. It's also easier to maintain / debug. When the user does the unexpected such as open multiple windows, things work better as well (more robust). This approach has saved a former software developer team of mine before. Example of NOT keeping state on the server and keeping state in the page would be the following: 1) user client contains 4 items; A B C D 2) user successfully removes item B. List shows A C D. 3) user loses internet connection 4) user tries to remove C and D, fails due to lost connection; however, user interface shows C and D as gone. 5) user closes window, opens a new window, sees C and D are there. (other scenarios with multiple windows / tabs apply as well) Granted: someone can use the failure/success responses from a $.ajax call to code more intelligence into the client. However, if you maintain state in both the client and the server, you are signing up for additional synchronization work between the client and server which may not be necessary when dealing with a small set of items. Having said all that, I am going to read current best practices some more on this. We'll see if I still feel this way after reading more on the topic as time goes on. Thanks again for sharing your thoughts and application. :) On Aug 15, 11:15 am, Stephan Beal sgb...@googlemail.com wrote: On Aug 15, 5:42 pm, finneycanhelp lovefin...@gmail.com wrote: Some options are available here to meet these requirements. - For showing the list and hiding Add Names when list size = Count, should one: Store the Sample List into something globally accessible in the page OR request the list each time something about the list is needed (size, content) OR What is the simplest and cleanest approach? BTW, the list is requested each time an item is added or removed right now. It seems easier to debug that way. i think that conceptually you're trying to do something like i recently did for an app. It wasn't a list of names, but a list of cybertanks for a wargame i like to play. In that app (http:// wanderinghorse.net/gaming/ogre/byoo/ajax/) i did the following (that's not to imply that this is simplest or cleanest): At startup, i load all of the app data (a bit over 100kb) into the client. It is transfered as JSON and then transformed to higher-level app objects. However, i keep the original JSON db around, partly so that i can figure out if a user has modified an object (i.e. if it needs saving) and partly to implement a revert changes option without having to request the data again. When the user uses save, we convert the high-level app object to JSON, update the local internal copy of the JSON data, and send it off to the server. For really large data sets i wouldn't keep the whole thing in memory, but this particular app is intended to be a rich client, and not just page dressing, so i wasn't too concerned about memory usage. However, i am considering re-modeling it to request data only as needed. i think the determining factory here is how much traffic (and request count) i save using one approach or the other. i haven't analyzed that yet, so i can't yet make an informed decision. Maybe poking around the above app with firebug would prove informative. Feel free to use the editing features (they're open to all w/o any sort of login) - you can then watch the json transactions using firebug.
[jQuery] Timeout
Hi Guys How do I set a timeout in jquery ? E.g. if a page is inactive for 20 seconds a message pops up asking the user to refresh the page.
[jQuery] Re: .load() and executing JavaScript from loaded content
ok, but .some-filter is a variable or element or what contain? contain a apge exmaple radmonpage.asp ? -- Atte. Carlos Becar.
[jQuery] Re: Timeout
jQuery is JavaScript! Use the regular JavaScript sintax Maurício -Mensagem Original- De: shaf Para: jQuery (English) Enviada em: sábado, 15 de agosto de 2009 17:36 Assunto: [jQuery] Timeout Hi Guys How do I set a timeout in jquery ? E.g. if a page is inactive for 20 seconds a message pops up asking the user to refresh the page.
[jQuery] Re: Filter (attribute, value)
2009/8/15 Geir gso...@frisurf.no Finally.. I got it working :) It was getting the quotes right.. Solution: $('#Navigation li a[href='+relPath+']') Thanks! you welcome, but look between quotes and simple quotes because if are the same you got a error you have to use toggle including -- Atte. Carlos Becar.
[jQuery] FF processes this line fine; IE doesn't...why?
Does IE have a problem with the .load function? FF processes this line without problem.IE just seems to reload the same content that was on the screen before this line is run. $('#hiddenresult').load('../components/propertiesDisplay.cfm', null, initPagination); I've verified that the content of propertiesDisplay.cfm is, indeed, changing with each search that is run (running a search is what produces the results that are output to propertiesDisplay.cfm as HTML). I thought perhaps IE (7 8) might have a problem with .load. Thoughts anyone? -- Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger
[jQuery] How to Clean Up Asynch Code
// what's a clean way to populate a list asynchronously and then compare the number of items in the list to a count? $(function() { populateList(); // this is an asynch call using $get - so the next line will not work. hideDivWhenListCountMatchAccountCount(); }); Should I change populateList to take a function and then pass in hideDivWhenListCountMatchAccountCount() as my callback which populateList will call when done? I do not want to change the populateList to act as a synchronous call. Thanks.
[jQuery] new at jquery; can't get settimout or callback to work
hi guys. help would be very much appreciated. i downloaded a slideshow script called galleria. problem is when it loads, my header image, which i have sliding in, gets really choppy. so, i want the galleria script to execute after the header animation is done. i haven't been able to get anything to work, including attempting callback, hacks, and settimeout. here's my current code, which does not delay the beginning of the galleria script. what am i doing wrong, very curious? also, if this can be done more efficiently, please do tell. script type=text/javascript $(document).ready(function(){ $('#headerimg').show(slide, {direction: left}, 3000) }); /script script type=text/javascript $(document).ready( setTimeout(function () { $('ul.gallery').galleria( { history : false, // activates the history object for bookmarking, back-button etc. clickNext : true, // helper for making the image clickable insert: '#main_image', // the containing selector for our main image onImage : function(image, thumb) { // let's add some image effects for demonstration purposes //image.css('display','none').fadeIn(3000); //caption.css('display','none').fadeIn(3000); // fetch the thumbnail container var _li = thumb.parents('li'); // fade out inactive thumbnail _li.siblings().children('img.selected').fadeTo(500,0.3); // fade in active thumbnail thumb.fadeTo('fast',1).addClass('selected'); // add a title for the clickable image image.attr('title','Next image '); }, onThumb : function(thumb) { // thumbnail effects goes here // fetch the thumbnail container var _li = thumb.parents('li'); // if thumbnail is active, fade all the way. var _fadeTo = _li.is('.active') ? '1' : '0.3'; // fade in the thumbnail when finnished loading //thumb.css({display:'none',opacity:_fadeTo}).fadeIn(300); // hover effects thumb.hover( function() { thumb.fadeTo('fast',1); }, function() { _li.not('.active').children('img').fadeTo('fast', 0.3); } // don't fade out if the parent is active ) } }) }, 4000 ); ); /script
[jQuery] [treeview] I really hope this isn't a dumb syntax error
Ok, I'm trying to use the treeview plugin. lets start with the index.html script includes: code script type=text/javascript src=jqueryUI/js/jquery-1.3.2.min.js/script script type=text/javascript src=jqueryUI/js/jquery-ui-1.7.2.custom.min.js/script script src=http://jqueryui.com/latest/ui/effects.core.js;/script script src=http://jqueryui.com/latest/ui/effects.transfer.js;/script script type=text/javascript src=jqueryUI/js/jquery-nav.js/script !-- my crap -- script language=JavaScript type=text/javascript src=jqueryUI/js/jquery.treeview.js/script /code my menu calls ajax and loads a php page that reads: code ?php include directoryFuncts.php; ? link type=text/css rel=stylesheet href=jquery.treeview.css / script language=JavaScript type=text/javascript src=jquery-1.3.2.min.js/script script language=JavaScript type=text/javascript src=jquery.treeview.js/script script language=JavaScript type=text/javascript $(document).ready(function(){ $(#minutesTree).treeview(); --- problem shows up here everytime and I don't know why }); /script h3Minutes/h3 ul id=minutesTree class=filetree ?php getDir( minutes ); ? /ul /code I understand that this repeats a lot of junk but it's the only way I can get it to even work by going to just the individual page and bypassing the menu. The list functions in php work perfectly and I get the correct html ul's and li's out of it but all i get is: Webpage error details Message: Object doesn't support this property or method Line: 257713399 *not sure why the line is so insanely high but whatever* Char: 2 Code: 0 URI: http://localhost/greekware8/ like the subject says I hope this isn't some really stupid mess up in my part but this should've worked in a day's time of work.
[jQuery] cycle plugin questions
I have a cycle working here: http://www.violinatta.com/node/19 Two questions: (1) initially more than one image shows, one under the other, eventually consolidating to 1. The container and images are both dimensioned. Suggestions how to correct this so just the one image appears initially? (2) In the demo here http://malsup.com/jquery/cycle/ the image seems never to go to white -- a fadein seems to start before the fadeout is complete. The malsup demo uses the default settings, though. Suggestions? Thanks in advance. Clark
[jQuery] Animate menu effect on mouseout
I am new to this. I want to animate the menu 'height' on mouseout (it works fine on mouseover) - basically a slide up/slide-down effect. How would I go upon that?
[jQuery] Superfish - animate menu on mouseout
Is it possible to animate the Superfish menu on mouseout (like a slidedown/slideup animation)? I only manage to get the animation on hover/mouseover to run (using 'height').