Re: [jQuery] .png transparency in IE 6 and jQuery
FranktheTank wrote: I have been able to successfully apply transparency fixes to transparent .png images using some jQuery plugins (as well as other methods). However, I have a problem in that my design requires that I have rollover images on those .png files. The problem is that every method that I have encountered changes the src attribute in the code so that it becomes blank.gif or pixel.gif - something like that. This is causing problems with other parts of my code where I need the src attribute to be set to the original value. Is there any method for achieving .png transparency in IE6 browsers _without_ changing the image name in the source? Thanks, Frank The css rollover method should work fine with most transparency hacks. Or just feed IE6 8-bit png's instead. If you're still using IE6 nowadays you deserve to only get 1-bit transparency. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Calling an iframe's javascript function
Well first you can find elements using their id : $('#frameid') Then access the content of an iframe : $('#frameid').contents() Then maybe access functions they own : $('#frameid').contents().myFunc(); Though I don't know much about your myFunc() and how you attached it to the iframe, this should do the trick like your previous code. Plus there's this nifty new web app that may help you with questions like this : http://lmgtfy.com/?q=jquery+iframe Check the first result... Michel Belleville 2009/11/3 Mike carr2...@gmail.com Is there a way to implement this JavaScript commmand through JQuery? document.getElementById('iframeid').contentWindow.myFunc(); Thanks!
[jQuery] Fill key va value from response of Json { 1: Quan 1, 2: Quan 2, 3: Quan 3, 4: Quan 4 } in listbox.
Hi, all. I have two listbox: a listbox country select id=edit-field-country-value class=form-select name=country [value] option selected=selected value= - None -/option option value=1Malaysia/option option value=2Thailan/option /select a listbox city select id=edit-field-city-value class=form-select name=field_city [value] option selected=selected value= - None -/option /select When i select country then i use ajax response data { 1: Quan 1, 2: Quan 2, 3: Quan 3, 4: Quan 4 } 1, 2, 3,4 is key of array I want when select country then add key and values of Json in listbox city Please help me
[jQuery] taconite strange problem
HI All, I am using the taconite plugin and am running into a strange issue. I use taconite to call several processes after each other (php) and update messages in the page, as such it is running fine. I have one big issue, if I open one database table too many in one of the calls, taconite receives the xml but does not update the page. With taconite debugging turned on I can see the following: WITHOUT the database I get to my last step in the database: [taconite] time to process response: 28ms [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: undefined [taconite] responseXML: [object XMLDocument] [taconite] XML document root: taconite log: [taconite] taconite command document detected [taconite] invoking command: $('#append').append(...) [taconite] invoking command: $('#replace').replaceContent(...) log: [taconite] time to process response: 9ms WITH opening the table the result is as follows: [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: undefined [taconite] responseXML: [object XMLDocument] So it does not see it as 'taconite command document' Strange thing is in other steps in the process database tables are also opened, and it does not matter which table is being opened. I am using kohana php framework, it opens a table with $dTable=ORM::factory('table', $Id); the command itself creates an object. anybody any ideas on how to get to the bottom of this (or maybe knows another method to call a url, update the page and call the next step? One thing I would like to avoid is reloading the whole page. Regards, Gerrit kuilder
Re: [jQuery] Re: Slider
On Tue, Nov 3, 2009 at 12:50 PM, Luh Hooo Zer anthonynori...@gmail.comwrote: Well i guess the word value was not the right word. i have a graphic under the slider1 slider2 and slider3 that says: Low-Medium-High with 30 steps in the slider. if a visitor drags slider1 handle to Medium, and slider2 handle to Low then slider 3 moves to High for instance. Why? You've yet to state your algorithm or mathematical formula for determining the position of slider3 based on the positions of slider1 and slider2. but the way i have it programmed, slider 3 just jumps to value 30 or high when those slider1 and slider2 fit those values. here is the code: if (parseInt(slider1Value) = 11 parseInt(slider1Value) =20 parseInt(slider2Value) = 1 parseInt(slider2Value) =10) { $(#slider3).slider('option', 'value', 30); $('#infoMedPrem').hide(); $('#infoLowPrem').hide(); $('#infoHighPrem').show(); } so as you can see once the sliders fit into those two ranges, the slider3 jumps to that position... and i just cant logically think of how to make it slide, as the other two sliders are moving i think that made sense?!? I'm afraid I still don't understand the relationship you're trying to set up between these three sliders, but I'll give you an example that may help. I've created two sliders, A and B, whose values are added to determine the value of C: http://jsbin.com/avagu3 source: http://jsbin.com/avagu3/edit - Richard On Nov 2, 1:28 pm, Richard D. Worth rdwo...@gmail.com wrote: Are you adding slider1 and slider2 to get the value of slider3? In that case, why does it step at 10, 20, 30? Or perhaps you're multiplying them. Not sure since you say the value combination. Are you wanting to animate smoothly between each step even though it can't sit at any value between them? - Richard On Mon, Nov 2, 2009 at 1:24 PM, Luh Hooo Zer anthonynori...@gmail.com wrote: I have 3 sliders on one page. the value combination of slider1 and slider2 dictates the position of slider3 handle. but its not smooth... for instance, slider 1 and slider2 have 30 steps, so is pretty smooth to slide, but slider 3 i can only site to position at values 10, 20, 30 it doesnt slide like slider1 and slider2 do is there a way to say, as the sliders are sliding, to move slider3 just as smooth ast the other two?- Hide quoted text - - Show quoted text -
[jQuery] setTimeout with variables (in a jQuery statement)
Hi, I'm trying to use a jQuery statement inside a setTimeout function, but I don't get it to work. I tried a lot of variants, like this one (I'm using 'this' because the setTimeout is inside an each function, and the selector is cached/stored in an object, thus the $selector): setTimeout( + this.$selector + .val(' + this.savVal + '), 1); How do I have to write this? Thanks!
[jQuery] Re: jquery superfish performance question
I did some further performance testing on the menus - will soon blog about it on http://blog.dynatrace.com I ran tests with 50, 100 and 500 menu items. It seems like 50 elements take roughly 300ms to process. Performance in that case scales up linear meaning that 100 take 600ms and 500 take 3s. the page that I was testing actually had 500 menu items - thats why this whole thing caught my attention as the page spent 3s in the superfish method cheers On Nov 3, 9:49 pm, Joel Birch joeldbi...@gmail.com wrote: Thanks so much for doing that! It does look like an improvement. Probably not an urgent one, but definitely worth doing for the next version. It seems unintuitive that creating a new jQuery object would be less costly than selecting from an existing collection, but there you go. Can't argue with solid evidence! Great feedback, cheers. Joel.
Re: [jQuery] Fill key va value from response of Json { 1: Quan 1, 2: Quan 2, 3: Quan 3, 4: Quan 4 } in listbox.
Can you try this (never try it by myself) $('#edit-field-city-value option:not(first-child)').remove(); for (var key in your_json_object) { $('#edit-field-city-value').append('option value=' + key + '' + your_json_object[key] + '/option'); } On Wed, Nov 4, 2009 at 4:06 AM, Tan it_qn2...@yahoo.com wrote: Hi, all. I have two listbox: a listbox country select id=edit-field-country-value class=form-select name=country [value] option selected=selected value= - None -/option option value=1Malaysia/option option value=2Thailan/option /select a listbox city select id=edit-field-city-value class=form-select name=field_city [value] option selected=selected value= - None -/option /select When i select country then i use ajax response data { 1: Quan 1, 2: Quan 2, 3: Quan 3, 4: Quan 4 } 1, 2, 3,4 is key of array I want when select country then add key and values of Json in listbox city Please help me
Re: [jQuery] setTimeout with variables (in a jQuery statement)
I'd use an anonymous function and pass it to setTimeout like this : var selector = '#whatever .selector'; var savVal = 'whatever value'; setTimeout(function() { $(selector).val(savVal); }, 1000); Notes for the careful reader : - There no this in the anonymous function, why is that ? - Because in setTimeout this would refers to window which is the owner of setTimeout. - Why are the selector and savVal variables declared using var just before we setTimeout ? - Because I don't want to risk crossing whatever variables may hold the same name in another context thus risking them being overwritten by some other script, but I want them to be part of the anonymous function's context when it is called. Hope it helps. Michel Belleville 2009/11/4 north ollo...@web.de Hi, I'm trying to use a jQuery statement inside a setTimeout function, but I don't get it to work. I tried a lot of variants, like this one (I'm using 'this' because the setTimeout is inside an each function, and the selector is cached/stored in an object, thus the $selector): setTimeout( + this.$selector + .val(' + this.savVal + '), 1); How do I have to write this? Thanks!
[jQuery] jquery validation is broken that was working before
Hi, I have used jquery.validation before without any issues. I have included the jquery validation javascript in the header and this test link does not work for some reason - http://dev.ntroduction.com/?page=step3 The validation code is called before the form as I have done else where. But this page is just making me look dumb. I get the following errors on Firebug: $() is undefined [Break on this error] $().ready(function() {\ndev.ntro...ction.com (line 397) syntax error [Break on this error] }//if\nindex.ph...0track=1 (line 7) detailed error: $(#comments_container) is null [Break on this error] script type=text/javascript $(functi...true, fxSpeed: 'fast' }); }); /script\n Any help is greatly appreciated. Thanks in advance-Taza -- View this message in context: http://old.nabble.com/jquery-validation-is-broken-that-was-working-before-tp26196157s27240p26196157.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] jQuery Validation request
The following instructions are paraphrased from: http://groups.google.com/support/bin/answer.py?hl=enanswer=46608 You can unsubscribe from a group through the web interface or via email. To unsubscribe through the web interface, just click the Edit my membership link on the right-hand side of the group's homepage at http://groups.google.com/group/jquery-en/ . Then click the Unsubscribe button on the page that appears. To unsubscribe via email, send an email to jquery-en+unsubscr...@googlegroups.com --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 4, 2009, at 12:07 AM, NathanHuang wrote: Hi all Who can tell me how to unsubscribe this mailling list? I'm gonna use another account for this mailing list. thanks -- View this message in context: http://old.nabble.com/jQuery-Validation-request-tp25995270s27240p26160052.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Jquery Form Plugin not sending name of button in Safari
I have a form with 2 button elements in it. Button elements are used because they are much easier to style as needed. form id=testform method=post name=testform input type=text value= name=firstname id=firstname/ button class=button ci_btn_shdw value=Save As New name=_event [aed_save] type=submitspanSave/span/button button class=button ci_btn_shdw value=Save As Copy name=_event [aed_copy] type=submitspanSave As Copy/span/button /form I am using the jquery form plugin (http://jquery.malsup.com/form/) to submit the form by ajax. Everything works great in all browsers except for Safari and Chrome. The problem in Safari and Chrome is that the name of the button that was pressed does not get sent back. My guess is that the form plugin is getting confused by the span inside the button and not grabbing the name from the button element. Is there a way to fix this?
[jQuery] Re: setTimeout with variables (in a jQuery statement)
Thanks a lot for you answer, Michel. I have already switched to using a function within setTimeout, but I found my problem lies elsewhere. I might open a new thread with a better fitting title for this. On 4 Nov., 14:06, Michel Belleville michel.bellevi...@gmail.com wrote: I'd use an anonymous function and pass it to setTimeout like this : var selector = '#whatever .selector'; var savVal = 'whatever value'; setTimeout(function() { $(selector).val(savVal); }, 1000); Notes for the careful reader : - There no this in the anonymous function, why is that ? - Because in setTimeout this would refers to window which is the owner of setTimeout. - Why are the selector and savVal variables declared using var just before we setTimeout ? - Because I don't want to risk crossing whatever variables may hold the same name in another context thus risking them being overwritten by some other script, but I want them to be part of the anonymous function's context when it is called. Hope it helps. Michel Belleville 2009/11/4 north ollo...@web.de Hi, I'm trying to use a jQuery statement inside a setTimeout function, but I don't get it to work. I tried a lot of variants, like this one (I'm using 'this' because the setTimeout is inside an each function, and the selector is cached/stored in an object, thus the $selector): setTimeout( + this.$selector + .val(' + this.savVal + '), 1); How do I have to write this? Thanks!
[jQuery] Jquery Accordion and History
Hey Trying to implement JQuery on a website I am working on, basically, the whole front page is one big accordion and clicking on the various bars opens and closes the sections. Like this example. This all works perfectly, but like all javascript, if the user clicks the back button, it does not keep a history of the changes. I understand there are plugins like Jquery History and Jquery-BBQ that I can use, but I cannot work out how to implement them! The code I wrote for my accordion is as follows: Code: $(document).ready(function(){ $(.bodyText).hide(); $(a h3).click(function(){ if($(this).is('.active')) { $(this).toggleClass(active); $(this).parent().parent().next(.bodyText).slideToggle(); return false; } else { $(.bodyText:visible).slideUp(slow); $(h3.active).removeClass(active); $(this).toggleClass(active); $(this).parent().parent().next(.bodyText).slideToggle(); return false; } }); }); Pretty simple code really, and does what I want. Just want to get some kind of history, so if the user uses the back button, they nav back through the site. Any ideas?
[jQuery] Using stop() Outside Of Animation
I know that stop() works well when using animation, such as when one passes their mouse over a series of animations to prevent the animation from continuing. However, I in my code I am using hide() and fadeIn() to do the work: $('li').hover( function() { $(this).find('div.SectionTitle').hide(); $(this).find('div.Explanation').fadeIn(150); }, function() { $(this).find('div.Explanation').hide(); $(this).find('div.SectionTitle').fadeIn(150); } ) I have not been able to get stop() to work with these methods. Does stop() only work with animation? If so then is there an equivalent function that would work for me? It's not too big of a deal since the chances are that one will not be moving too quickly over my list items, but it would be nice if there was a way to cope with this. Cheers - george
[jQuery] Re: Fill key va value from response of Json { 1: Quan 1, 2: Quan 2, 3: Quan 3, 4: Quan 4 } in listbox.
var drp = document.getElementById(edit-field-city-value); drp.options.length == 1; // Clear all existing values except first $.each(AjaxData, function(v, k) { drp.options[drp.options.length] = new Option(k, v); });
Re: Re: [jQuery] Block UI question
I am also trying to achieve the same thing. Since you got it to work, can you please post a step-by-step process of how to get this workingwill be even helpful if you can post the code with some comments too. Thanks in Advance. -- View this message in context: http://old.nabble.com/Block-UI-question-tp26174291s27240p26197217.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Demo Error for Accordion
There is a bug in the demo/docs here: http://docs.jquery.com/UI/Accordion In this block, the H3's don't properly close tags. Causes issues with IE, and might reduce some of the noise on the lists from bogus problems. div id=accordion h3a href=#First header/ah3 divFirst content/div h3a href=#Second header/ah3 divSecond content/div /div Matt
[jQuery] Re: (validate) validation (plugin) remote message option problem.
Hi, I don't know if it can help but i had a quite similar problem. The function associated to my remote test was triggered whatever the server response because of a bad json encoding for the true/false response. I used json_encode() and it works now.
[jQuery] Re: Jquery Form Plugin not sending name of button in Safari
Here is a patched version of the ajaxForm function that fixes the problem. $.fn.ajaxForm = function(options) { return this.ajaxFormUnbind().bind('submit.form-plugin', function() { $(this).ajaxSubmit(options); return false; }).bind('click.form-plugin', function(e) { var $el = $(e.target); var target = e.target; if (!($el.is(:submit,input:image))) { var $parent = $el.closest(:submit); if ($parent.length) target = $parent[0]; else return; } var form = this; form.clk = target; if (target.type == 'image') { if (e.offsetX != undefined) { form.clk_x = e.offsetX; form.clk_y = e.offsetY; } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin var offset = $el.offset(); form.clk_x = e.pageX - offset.left; form.clk_y = e.pageY - offset.top; } else { form.clk_x = e.pageX - target.offsetLeft; form.clk_y = e.pageY - target.offsetTop; } } // clear form vars setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 10); }); }; On Nov 4, 8:44 am, petersendidit petersendi...@gmail.com wrote: I have a form with 2 button elements in it. Button elements are used because they are much easier to style as needed. form id=testform method=post name=testform input type=text value= name=firstname id=firstname/ button class=button ci_btn_shdw value=Save As New name=_event [aed_save] type=submitspanSave/span/button button class=button ci_btn_shdw value=Save As Copy name=_event [aed_copy] type=submitspanSave As Copy/span/button /form I am using the jquery form plugin (http://jquery.malsup.com/form/) to submit the form by ajax. Everything works great in all browsers except for Safari and Chrome. The problem in Safari and Chrome is that the name of the button that was pressed does not get sent back. My guess is that the form plugin is getting confused by the span inside the button and not grabbing the name from the button element. Is there a way to fix this?
[jQuery] Attempting to hide a div using jquery but div displays for a split second and then disappears
I am working on an accordian side navigation jquery piece and I am unable to get it to operate exactly how I want. The menu was originally designed by Roshan Bhattarai and can be viewed at http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html The original design does not degrade well since the div containing the drop down menu information is set to display:none using CSS- but another forum poster suggested that the css selector be removed and the hiding function be set in the jquery. This is the code that was added to perform this function: $(div.menu_body).hide(); The code works to some extent, however the div does appear on the page for a split second on refresh or on page load and then diseappears. I am thinking I either did something wrong, am missing something, or could put that bit of code somewhere else in the script for the div to truly be hidden until the visible header is clicked. The whole point of adding this code is so the accordian menu degrades gracefully- if there is another way for the entire menu to be viewable with javascript turned off, please detail the steps. I have downloaded the newest version of jquery. Here is the entire script for the menu. script type=text/javascript language=javascript src=/javascript/ jquery.js/script script type=text/javascript !--//-+ // Developed by Roshan Bhattarai // Visit http://roshanbh.com.np for this script and more. // This notice MUST stay intact for legal use // - $(document).ready(function() {$(div.menu_body).hide(); //slides the element with class menu_body when paragraph with class menu_head is clicked $(#firstpane p.menu_head).click(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideToggle(300).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); //slides the element with class menu_body when mouse is over the paragraph $(#secondpane p.menu_head).mouseover(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideDown(500).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); }); /script The site is on a private server behind a firewall so I cannot share the site but I can provide as much information as possible to solve this issue. An example of that preload or flashing upon refresh of the page with this type of code is viewable on this website: http://docs.jquery.com/Effects/hide - If you view the demo where it stated Click to hide me too and continue to watch that line will refreshing the page, you will see the hidden information for a split second and then it will hide. I am wondering and trying to find a way to prevent that flash of hidden information to be viewable at all.
[jQuery] Re: Binding Google Maps V3 InfoWindow links
Hi, no response yet! please can someone try to help me out on this. have spent a week trying to get it working - cheers would the offer of a nice bottle of wiskey help :-) cheers B On 1 Nov, 17:39, benji bco...@gmail.com wrote: Hi - Hope someone can help me out. Have spent days now trying to get this running! I am tying tobinda function to a link that is created dynamically in the DOM when a GoogleMapsInfoWindowis fired. Specifically, getting a JQueryCodaSlider 1.1.1 to work. You can see the test site here - [click apply within aninfowindow]http://tinyurl.com/coda-mapsv3-infowindow-test I believe I have 2 options, neither of which i can figure out: 1. GoogleMapsJSV3API fires the event DomReady when aninfowindow is opened:http://code.google.com/apis/maps/documentation/v3/reference.html#Info Use JQuery Live to listen for the DomReady event (maybe a better, lighter weight??) solution? or Add tb_init('a.cross-link'); within the google.maps.event.addListener function - I have tried adding this (after the infowindowOption variable) this but cant seem to get it tobind? Here is the listener function (MapsV3) google.maps.event.addListener(marker, click, function() { var infowindowOptions = { content: html }; varinfowindow= new google.maps.InfoWindow(infowindowOptions); cm_setInfowindow(infowindow); infowindow.open(map, marker); marker.setIcon(markerImageOut); }); google.maps.event.addListener(marker, mouseover, function() { marker.setIcon(markerImageOver); }); google.maps.event.addListener(marker, mouseout, function() { marker.setIcon(markerImageOut); }); return marker; } Can anyone help. Please! Many thanks Benji
Re: [jQuery] Re: Binding Google Maps V3 InfoWindow links
I fail to see where you encounter a problem. I'd use $('#any_other_container a.whatever_link').live('click', function() { // here be your code }); Thanks for the bottle but I don't drink much (and I don't think it helps a lot while coding anyway). Michel Belleville 2009/11/4 benji bco...@gmail.com Hi, no response yet! please can someone try to help me out on this. have spent a week trying to get it working - cheers would the offer of a nice bottle of wiskey help :-) cheers B On 1 Nov, 17:39, benji bco...@gmail.com wrote: Hi - Hope someone can help me out. Have spent days now trying to get this running! I am tying tobinda function to a link that is created dynamically in the DOM when a GoogleMapsInfoWindowis fired. Specifically, getting a JQueryCodaSlider 1.1.1 to work. You can see the test site here - [click apply within aninfowindow] http://tinyurl.com/coda-mapsv3-infowindow-test I believe I have 2 options, neither of which i can figure out: 1. GoogleMapsJSV3API fires the event DomReady when aninfowindow is opened: http://code.google.com/apis/maps/documentation/v3/reference.html#Info Use JQuery Live to listen for the DomReady event (maybe a better, lighter weight??) solution? or Add tb_init('a.cross-link'); within the google.maps.event.addListener function - I have tried adding this (after the infowindowOption variable) this but cant seem to get it tobind? Here is the listener function (MapsV3) google.maps.event.addListener(marker, click, function() { var infowindowOptions = { content: html }; varinfowindow= new google.maps.InfoWindow(infowindowOptions); cm_setInfowindow(infowindow); infowindow.open(map, marker); marker.setIcon(markerImageOut); }); google.maps.event.addListener(marker, mouseover, function() { marker.setIcon(markerImageOver); }); google.maps.event.addListener(marker, mouseout, function() { marker.setIcon(markerImageOut); }); return marker; } Can anyone help. Please! Many thanks Benji
Re: [jQuery] Attempting to hide a div using jquery but div displays for a split second and then disappears
The only way I see to do so and degrade well would be to delegate hiding the hidden elements when your JavaScript loads, though before the load event is triggered all the content will show. Michel Belleville 2009/11/4 Newbie hjohn...@geolearning.com I am working on an accordian side navigation jquery piece and I am unable to get it to operate exactly how I want. The menu was originally designed by Roshan Bhattarai and can be viewed at http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html The original design does not degrade well since the div containing the drop down menu information is set to display:none using CSS- but another forum poster suggested that the css selector be removed and the hiding function be set in the jquery. This is the code that was added to perform this function: $(div.menu_body).hide(); The code works to some extent, however the div does appear on the page for a split second on refresh or on page load and then diseappears. I am thinking I either did something wrong, am missing something, or could put that bit of code somewhere else in the script for the div to truly be hidden until the visible header is clicked. The whole point of adding this code is so the accordian menu degrades gracefully- if there is another way for the entire menu to be viewable with javascript turned off, please detail the steps. I have downloaded the newest version of jquery. Here is the entire script for the menu. script type=text/javascript language=javascript src=/javascript/ jquery.js/script script type=text/javascript !--//-+ // Developed by Roshan Bhattarai // Visit http://roshanbh.com.np for this script and more. // This notice MUST stay intact for legal use // - $(document).ready(function() {$(div.menu_body).hide(); //slides the element with class menu_body when paragraph with class menu_head is clicked $(#firstpane p.menu_head).click(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideToggle(300).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); //slides the element with class menu_body when mouse is over the paragraph $(#secondpane p.menu_head).mouseover(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideDown(500).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); }); /script The site is on a private server behind a firewall so I cannot share the site but I can provide as much information as possible to solve this issue. An example of that preload or flashing upon refresh of the page with this type of code is viewable on this website: http://docs.jquery.com/Effects/hide - If you view the demo where it stated Click to hide me too and continue to watch that line will refreshing the page, you will see the hidden information for a split second and then it will hide. I am wondering and trying to find a way to prevent that flash of hidden information to be viewable at all.
[jQuery] Append Help
I am uploading images and once uploaded they appear in my sortable list. I have success response: $('li/li').appendTo('#sortable').fadeIn('slow').html(response); page code: ul id=sortable class=files liimage1/li - are there when the page loads liimage2/li - are there when the page loads liimage3/li - are there when the page loads liimage4/li - newly added image appears here but I would like it to appear above image1 /ul But I would like to have it appear at the top. What I have adds it to the very bottom of the list. How can I have it appear at the top of the list? Thanks Dave
Re: [jQuery] Append Help
shot in the dark here... but prependTo()? On Wed, Nov 4, 2009 at 9:01 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am uploading images and once uploaded they appear in my sortable list. I have success response: $('li/li').appendTo('#sortable').fadeIn('slow').html(response); page code: ul id=sortable class=files liimage1/li - are there when the page loads liimage2/li - are there when the page loads liimage3/li - are there when the page loads liimage4/li - newly added image appears here but I would like it to appear above image1 /ul But I would like to have it appear at the top. What I have adds it to the very bottom of the list. How can I have it appear at the top of the list? Thanks Dave -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
RE: [jQuery] Append Help
That certainly was fast. Thanks, just what i needed. Dave _ From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: November-04-09 1:35 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Append Help shot in the dark here... but prependTo()? On Wed, Nov 4, 2009 at 9:01 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am uploading images and once uploaded they appear in my sortable list. I have success response: $('li/li').appendTo('#sortable').fadeIn('slow').html(response); page code: ul id=sortable class=files liimage1/li - are there when the page loads liimage2/li - are there when the page loads liimage3/li - are there when the page loads liimage4/li - newly added image appears here but I would like it to appear above image1 /ul But I would like to have it appear at the top. What I have adds it to the very bottom of the list. How can I have it appear at the top of the list? Thanks Dave -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
Re: [jQuery] taconite strange problem
A Small update if I write the response to a file I get no difference in files between a failing and a working response. most of the data I see in firebug is exactly the same. only taconite fails to see the xml document root. Regards, gerkuil wrote: HI All, I am using the taconite plugin and am running into a strange issue. I use taconite to call several processes after each other (php) and update messages in the page, as such it is running fine. I have one big issue, if I open one database table too many in one of the calls, taconite receives the xml but does not update the page. With taconite debugging turned on I can see the following: WITHOUT the database I get to my last step in the database: [taconite] time to process response: 28ms [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: undefined [taconite] responseXML: [object XMLDocument] [taconite] XML document root: taconite log: [taconite] taconite command document detected [taconite] invoking command: $('#append').append(...) [taconite] invoking command: $('#replace').replaceContent(...) log: [taconite] time to process response: 9ms WITH opening the table the result is as follows: [taconite] [AJAX response] content-type: text/xml; status: 200 OK; has responseXML: true [taconite] type: undefined [taconite] responseXML: [object XMLDocument] So it does not see it as 'taconite command document' Strange thing is in other steps in the process database tables are also opened, and it does not matter which table is being opened. I am using kohana php framework, it opens a table with $dTable=ORM::factory('table', $Id); the command itself creates an object. anybody any ideas on how to get to the bottom of this (or maybe knows another method to call a url, update the page and call the next step? One thing I would like to avoid is reloading the whole page. Regards, Gerrit kuilder
Re: [jQuery] Attempting to hide a div using jquery but div displays for a split second and then disappears
See http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content- Richard On Wed, Nov 4, 2009 at 10:21 AM, Newbie hjohn...@geolearning.com wrote: I am working on an accordian side navigation jquery piece and I am unable to get it to operate exactly how I want. The menu was originally designed by Roshan Bhattarai and can be viewed at http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html The original design does not degrade well since the div containing the drop down menu information is set to display:none using CSS- but another forum poster suggested that the css selector be removed and the hiding function be set in the jquery. This is the code that was added to perform this function: $(div.menu_body).hide(); The code works to some extent, however the div does appear on the page for a split second on refresh or on page load and then diseappears. I am thinking I either did something wrong, am missing something, or could put that bit of code somewhere else in the script for the div to truly be hidden until the visible header is clicked. The whole point of adding this code is so the accordian menu degrades gracefully- if there is another way for the entire menu to be viewable with javascript turned off, please detail the steps. I have downloaded the newest version of jquery. Here is the entire script for the menu. script type=text/javascript language=javascript src=/javascript/ jquery.js/script script type=text/javascript !--//-+ // Developed by Roshan Bhattarai // Visit http://roshanbh.com.np for this script and more. // This notice MUST stay intact for legal use // - $(document).ready(function() {$(div.menu_body).hide(); //slides the element with class menu_body when paragraph with class menu_head is clicked $(#firstpane p.menu_head).click(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideToggle(300).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); //slides the element with class menu_body when mouse is over the paragraph $(#secondpane p.menu_head).mouseover(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideDown(500).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); }); /script The site is on a private server behind a firewall so I cannot share the site but I can provide as much information as possible to solve this issue. An example of that preload or flashing upon refresh of the page with this type of code is viewable on this website: http://docs.jquery.com/Effects/hide - If you view the demo where it stated Click to hide me too and continue to watch that line will refreshing the page, you will see the hidden information for a split second and then it will hide. I am wondering and trying to find a way to prevent that flash of hidden information to be viewable at all.
RE: [jQuery] Append Help Issue
Ok i changed the code to: $('li/li').prependTo('#sortable').fadeIn('slow').html(response); My response is already in a li which has variables from the php script so I need it returned in the response. So I end up with being added to the sortable list (extra li set i dont need) li li id =my_idcode. /li /li How can I just insert the response to the #sortable at the top? Thanks again, Dave _ From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: November-04-09 1:40 PM To: jquery-en@googlegroups.com Subject: RE: [jQuery] Append Help That certainly was fast. Thanks, just what i needed. Dave _ From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: November-04-09 1:35 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Append Help shot in the dark here... but prependTo()? On Wed, Nov 4, 2009 at 9:01 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am uploading images and once uploaded they appear in my sortable list. I have success response: $('li/li').appendTo('#sortable').fadeIn('slow').html(response); page code: ul id=sortable class=files liimage1/li - are there when the page loads liimage2/li - are there when the page loads liimage3/li - are there when the page loads liimage4/li - newly added image appears here but I would like it to appear above image1 /ul But I would like to have it appear at the top. What I have adds it to the very bottom of the list. How can I have it appear at the top of the list? Thanks Dave -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
Re: [jQuery] Append Help Issue
Try prepend() instead of prependTo()? http://docs.jquery.com/Manipulation/prepend On Wed, Nov 4, 2009 at 9:40 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Ok i changed the code to: $('li/li').prependTo('#sortable').fadeIn('slow').html(response); My response is already in a li which has variables from the php script so I need it returned in the response. So I end up with being added to the sortable list (extra li set i dont need) li li id =my_idcode. /li /li How can I just insert the response to the #sortable at the top? Thanks again, Dave -- *From:* Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] *Sent:* November-04-09 1:40 PM *To:* jquery-en@googlegroups.com *Subject:* RE: [jQuery] Append Help That certainly was fast. Thanks, just what i needed. Dave -- *From:* Charlie Griefer [mailto:charlie.grie...@gmail.com] *Sent:* November-04-09 1:35 PM *To:* jquery-en@googlegroups.com *Subject:* Re: [jQuery] Append Help shot in the dark here... but prependTo()? On Wed, Nov 4, 2009 at 9:01 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am uploading images and once uploaded they appear in my sortable list. I have success response: $('li/li').appendTo('#sortable').fadeIn('slow').html(response); page code: ul id=sortable class=files liimage1/li - are there when the page loads liimage2/li - are there when the page loads liimage3/li - are there when the page loads liimage4/li - newly added image appears here but I would like it to appear above image1 /ul But I would like to have it appear at the top. What I have adds it to the very bottom of the list. How can I have it appear at the top of the list? Thanks Dave -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
Re: [jQuery] Attempting to hide a div using jquery but div displays for a split second and then disappears
Good trick, will reuse, thanks ^^ Michel Belleville 2009/11/4 Richard D. Worth rdwo...@gmail.com See http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content- Richard On Wed, Nov 4, 2009 at 10:21 AM, Newbie hjohn...@geolearning.com wrote: I am working on an accordian side navigation jquery piece and I am unable to get it to operate exactly how I want. The menu was originally designed by Roshan Bhattarai and can be viewed at http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html The original design does not degrade well since the div containing the drop down menu information is set to display:none using CSS- but another forum poster suggested that the css selector be removed and the hiding function be set in the jquery. This is the code that was added to perform this function: $(div.menu_body).hide(); The code works to some extent, however the div does appear on the page for a split second on refresh or on page load and then diseappears. I am thinking I either did something wrong, am missing something, or could put that bit of code somewhere else in the script for the div to truly be hidden until the visible header is clicked. The whole point of adding this code is so the accordian menu degrades gracefully- if there is another way for the entire menu to be viewable with javascript turned off, please detail the steps. I have downloaded the newest version of jquery. Here is the entire script for the menu. script type=text/javascript language=javascript src=/javascript/ jquery.js/script script type=text/javascript !--//-+ // Developed by Roshan Bhattarai // Visit http://roshanbh.com.np for this script and more. // This notice MUST stay intact for legal use // - $(document).ready(function() {$(div.menu_body).hide(); //slides the element with class menu_body when paragraph with class menu_head is clicked $(#firstpane p.menu_head).click(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideToggle(300).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); //slides the element with class menu_body when mouse is over the paragraph $(#secondpane p.menu_head).mouseover(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideDown(500).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); }); /script The site is on a private server behind a firewall so I cannot share the site but I can provide as much information as possible to solve this issue. An example of that preload or flashing upon refresh of the page with this type of code is viewable on this website: http://docs.jquery.com/Effects/hide - If you view the demo where it stated Click to hide me too and continue to watch that line will refreshing the page, you will see the hidden information for a split second and then it will hide. I am wondering and trying to find a way to prevent that flash of hidden information to be viewable at all.
RE: [jQuery] Append Help Issue
I went with $(response).fadeIn('slow').prependTo('#sortable'); It works as I need it but not sure if that coded right. So the response fades in slow and inserted into the top of the sortable list Dave _ From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: November-04-09 2:17 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Append Help Issue Try prepend() instead of prependTo()? http://docs.jquery.com/Manipulation/prepend On Wed, Nov 4, 2009 at 9:40 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Ok i changed the code to: $('li/li').prependTo('#sortable').fadeIn('slow').html(response); My response is already in a li which has variables from the php script so I need it returned in the response. So I end up with being added to the sortable list (extra li set i dont need) li li id =my_idcode. /li /li How can I just insert the response to the #sortable at the top? Thanks again, Dave _ From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: November-04-09 1:40 PM To: jquery-en@googlegroups.com Subject: RE: [jQuery] Append Help That certainly was fast. Thanks, just what i needed. Dave _ From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: November-04-09 1:35 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Append Help shot in the dark here... but prependTo()? On Wed, Nov 4, 2009 at 9:01 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am uploading images and once uploaded they appear in my sortable list. I have success response: $('li/li').appendTo('#sortable').fadeIn('slow').html(response); page code: ul id=sortable class=files liimage1/li - are there when the page loads liimage2/li - are there when the page loads liimage3/li - are there when the page loads liimage4/li - newly added image appears here but I would like it to appear above image1 /ul But I would like to have it appear at the top. What I have adds it to the very bottom of the list. How can I have it appear at the top of the list? Thanks Dave -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. -- Charlie Griefer http://charlie.griefer.com/ I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] load() and utf-8 encoding, nothing seems to work...
I've been googling around but found no answer that works for me. I'm loading some content from a PHP script using the load() function inside an html document that already has the utf-8 encoding meta tag. I suposed that the rule at the head of the container document will affect all loaded contents, but it doesn't. The PHP I'm loading is using a switch to serve different contents, for every case I have open php tags like this: case '1': ? Here comes the choosen HTML contents ? break In my PHP I have also placed a header to indicate the content is utf-8: header ('Content-type: text/html; charset=utf-8'); But maybe just because the final content is out of php tags maybe it is not affecting the content... I have also tried setting the AJAX defaults: $.ajaxSetup({ scriptCharset: utf-8 , contentType: text/html; charset=utf-8 }); But not even like that... How can I fix that?
[jQuery] Re: Superfish plugin: some limitations that could be addressed
We're going in circles here. showed you an example of a multi column div in a sub, had h tags, image, and assorted other markup did you even look at it? Plugin code was untouched, any adjustemnts were done with css Yes i did look at that example, and analyzed the HTML code for it. Yes it works. Yes it uses Superfish with no hacks to the plugin. BUT, this example is using a UL with a single LI element that's assuming the role of a semantically neutral container (for styling purposes). In HTML, the only block-level semantically neutral container is the DIV element. Period. This is what the HTML 4 and HTML5 specs say. Which is why i believe this solution that works visually is not good enough. The YUI example is a good example because they are using the right elements for the job: two nested DIVs. (They could use just one for that example, but i suppose they want to offer a simple template with more styling hooks for users.) You then wrote: “The exact same markup in YUI example bellow works perfectly well...no hacks needed”. This is wrong. Can you REALLY use the same HTML markup as the YUI, and make the full Superfish functionnality work? I can do that... by hacking the Superfish source. The problem i'm talking about is a problem of HTML semantics. I'm not asking if you can do a mega-dropdown with Superfish, because you can, as your first example shows, and as my own tests showed me even before that. I'm saying that you can't do it using the adequate HTML elements, which i think is a problem. Not a huge problem, but a problem nonetheless.
Re: Re: [jQuery] Block UI question
If you have seen my previous reply - am I missing anything here? Is is because I downloaded jquery-1.3.2.js instead of jquery-1.3.2.min.js ? If that is the case, from where can I download the right js file? Thanks Again -- View this message in context: http://old.nabble.com/Block-UI-question-tp26174291s27240p26202265.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Block UI question
Has nothing to do with using the full or minified version
[jQuery] (treeview) Collapsable hitarea
I have a treeview in my application and all works pretty well with it. I want the toggle +/- button to work as it does by default, but want the rest of the node to not trigger the collapse/expand event. How would one go about preventing this behavior? I've checked the other threads that are similar to my question but didn't get any answers that actually worked. Thanks, Ryan
Re: [jQuery] Block UI question
With Rich's help...I have the following files. But nothing seems to be working. Please advise if I'm missing anything. 1. test.jsp 2. calculate.jsp - dummy jsp 3. review.jsp - dummy jsp 4. jquery-1.3.2.js 5. jquery.blockUI.js 6. And two graphics. When I run the test.jsp page http://localhost/testProject/test.jsp and click on the calculate button, it changes the URL but does nothing. This is the changed URL http://localhost/vendorManagement/test.jsp?txt=1223Submit.x=50Submit.y=13 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd; HTML HEAD TITLEProcessing/TITLE META http-equiv=content-type content=text/html; charset=UTF-8 script type=text/javascript src=jquery-1.3.2.js/script script type=text/javascript src=jquery.blockUI.js/script SCRIPT type=text/javascript $(document).ready( function() { /* Block the UI... */ $('#submit').click(function() { $.blockUI({ message: $('#processing') }); /* do the AJAX call and processing here... */ var txtval = $(#txt).val(); $.post(calculate.jsp, { txt: txtval }, function(data){ if(data.length 0) { window.location.href(review.jsp); } }); }); // unblock UI when ajax request completes complete: function(x,y) { $.unblockUI(); } }); /SCRIPT STYLE type=text/css body { background: #FFF; font: normal 12px Arial, Helvetica, sans-serif; padding: 0; margin:0; } #processing { padding:0; margin:0; } .BoxTitle { border-bottom:#ccc 1px solid; font-family: Lucida Grande, Helvetica, Arial, sans-serif; font-size: 18px; font-weight:bold; color: #005b9c; line-height: 120%; margin-bottom:5px; padding:2px 0; } /STYLE /HEAD BODY P table width=100% border=0 cellspacing=0 cellpadding=0 tr td align=centerbr br br br form Enter a value: input type=text id=txt name=txtbr br input id=submit src=img/calculate.gif type=image name=Submit value=Calculate / /form /td/tr /table div id=processing style=display:none; div style=text-align:center;padding:15px;font: normal 13px Arial, Helvetica, sans-serif;color:#cc6633;font-weight:bold;width:350px div class=BoxTitle style=text-align:center;Calculation in Progress./div img/ajaxloader.gif PPlease Stand By../P /div /div /BODY /HTML -- View this message in context: http://old.nabble.com/Block-UI-question-tp26174291s27240p26203460.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Submitting after Validation
@Leonard, unfortunately it's not due to the function argument. @Dylan, I've looked at this tutorial a few times. It's not using the official Jquery Validate system and hasn't been able to help me fill in any gaps in my learning curve... It seems that every tutorial has their own convoluted system to doing validation.. And the ones that do use the standard validation system none of them thoroughly explain the form submission part. This is my current working Validation code + Submit function that does not work properly. It post the page normally, like any HTML form would. $(document).ready(function(){ $(#contactForm).validate({ rules: { fullname: { required: true, minlength: 2 }, email: { required: true, email: true }, company: { required: true, minlength: 2 }, phone: { required: true, minlength: 2 }, }, messages: { fullname: 'span class=errorPlease enter your bfull name/b./ span', email: 'span class=errorPlease enter a valid bemail address/ b./span', company: 'span class=errorPlease enter your bcompany/b./ span', phone: 'span class=errorPlease enter your bphone number/b./ span' }, submitHandler: function() { form.submit(); } }); }); // HTML FORM form id=contactForm method=POST action=process.php //Stuff goes here /form // WORKING VALIDATION USING LIMITED VALIDATION SYSTEM $(document).ready(function(){ $(#signupForm #submit).click(function(){ $(.error).hide(); var hasError = false; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var regarding_Val = $(#regarding).val(); var message_Val = $(#message).val(); var subcontact = $(#subcontact).val(); var fullname_Val = $(#fullname).val(); if(fullname_Val == '') { $(#fullname).after('span class=errorPlease enter your full name./span'); hasError = true; } var company_Val = $(#company).val(); if(company_Val == '') { $(#company).after('span class=errorPlease enter your company./span'); hasError = true; } var phone_Val = $(#phone).val(); if(phone_Val == '') { $(#phone).after('span class=errorPlease enter a phone number./span'); hasError = true; } var email_Val = $(#email).val(); if(email_Val == '') { $(#email).after('span class=errorPlease enter an email address./span'); hasError = true; } else if(!emailReg.test(email_Val)) { $(#email).after('span class=errorPlease enter a valid email address./span'); hasError = true; } if(hasError == false) { $.post(process.php, $(#signupForm).serialize(), function(data){ $('#signupForm').clearForm(); if (data.success) { $(#success).html(data.message); } }, json ); } return false; }); }); On Oct 29, 6:22 am, Dylan dylan.h...@gmail.com wrote: Have a look at some of the ideas from this ...http://tutorialzine.com/2009/09/fancy-contact-form/ On Oct 27, 8:16 pm,StephenJacobturnstylecreat...@gmail.com wrote: Leonardo, I've been looking into the submitHandler option but i'm having problems getting it to work correctly. Here is a sample of the code i'm testing. $(#signupForm).validate({ rules: { fullname: required, company: required, phone: required, email: { required: true, email: true } }, messages: { fullname: Please enter your
[jQuery] Re: Submitting after Validation
Just to clarify, the $.post function works perfectly and returns my json results. Due to the limitations of the validation system i was using (no remote options) i had to begin using the standard jquery .validate library. Please help me understand how to implement the .Validate w/ my HTML form. As you can see the $.post option has the process.php written in the Jquery and leaves the HTML form action blank. With the Jquery .Validate, I need to define the process.php as the Action correct? If so, why does the form continue to submit normally? Thanks for all the help everyone! I think with a bit more guidance i'll have a really strong understanding of the validation system. On Nov 4, 3:33 pm, StephenJacob turnstylecreat...@gmail.com wrote: @Leonard, unfortunately it's not due to the function argument. @Dylan, I've looked at this tutorial a few times. It's not using the official Jquery Validate system and hasn't been able to help me fill in any gaps in my learning curve... It seems that every tutorial has their own convoluted system to doing validation.. And the ones that do use the standard validation system none of them thoroughly explain the form submission part. This is my current working Validation code + Submit function that does not work properly. It post the page normally, like any HTML form would. $(document).ready(function(){ $(#contactForm).validate({ rules: { fullname: { required: true, minlength: 2 }, email: { required: true, email: true }, company: { required: true, minlength: 2 }, phone: { required: true, minlength: 2 }, }, messages: { fullname: 'span class=errorPlease enter your bfull name/b./ span', email: 'span class=errorPlease enter a valid bemail address/ b./span', company: 'span class=errorPlease enter your bcompany/b./ span', phone: 'span class=errorPlease enter your bphone number/b./ span' }, submitHandler: function() { form.submit(); } }); }); // HTML FORM form id=contactForm method=POST action=process.php //Stuff goes here /form // WORKING VALIDATION USING LIMITED VALIDATION SYSTEM $(document).ready(function(){ $(#signupForm #submit).click(function(){ $(.error).hide(); var hasError = false; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var regarding_Val = $(#regarding).val(); var message_Val = $(#message).val(); var subcontact = $(#subcontact).val(); var fullname_Val = $(#fullname).val(); if(fullname_Val == '') { $(#fullname).after('span class=errorPlease enter your full name./span'); hasError = true; } var company_Val = $(#company).val(); if(company_Val == '') { $(#company).after('span class=errorPlease enter your company./span'); hasError = true; } var phone_Val = $(#phone).val(); if(phone_Val == '') { $(#phone).after('span class=errorPlease enter a phone number./span'); hasError = true; } var email_Val = $(#email).val(); if(email_Val == '') { $(#email).after('span class=errorPlease enter an email address./span'); hasError = true; } else if(!emailReg.test(email_Val)) { $(#email).after('span class=errorPlease enter a valid email address./span'); hasError = true; } if(hasError == false) { $.post(process.php, $(#signupForm).serialize(), function(data){ $('#signupForm').clearForm(); if (data.success) { $(#success).html(data.message); } }, json
[jQuery] Re: class toggle navigation
Thanks for the reply - I put the .active styling on the individual pages to make it clearer.. Sorry if this was confusing - the first link you referred to: lia href=01.html class=activeDesign Objects/abr//li Isn't what I was trying to switch the class of - that's just the category menu and I know that once the browser has moved on, the active class and it's switchability is irrelevant. The links whose classes I'm trying to switch are in the div class=img_selector at the bottom of the page, and they aren't redirects - they're there to switch the image, hence the necessity of changing classes to turn them black, so they act as indicators of which image is active. I know I could just redirect to another page with a different image, but I'd love to get it working on the same page so that the more information button isn't reset and the page doesn't flash to reload.. Seems to me that there's some conflict between the image swapping script and the class swapping script.. The image swapper is called in the tr.js file which contains this: function showPic (whichpic) { if (document.getElementById) { document.getElementById('placeholder').src = whichpic.href; if (whichpic.title) { document.getElementById('desc').childNodes[0].nodeValue = whichpic.title; } else { document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue; } return false; } else { return true; } } var j = jQuery.noConflict(); j(document).ready(function() { j('a#content-link').click(function() { j('#content-div').toggle(80); return false; }); }); Do you have any idea how to combine them? As you can probably tell, I'm an absolute novice with jQuery. Thanks a million for any pointers, Bernard On Nov 3, 4:35 am, jmatthews jmatth...@xexam.net wrote: I'm a little confused, but before I examine more closely, one thing I'd like an answer to is whether you have defined the initial active a incorrectly. You gave the link tohttp://www.thomasrugani.com/static/designobjects/02.html That's 02.html - NOT 01.html Yet, when I look at the source of 02.html, here is what I see: lia href=01.html class=activeDesign Objects/abr//li Maybe your definition of active should refer to all the 02's? It would help to see your class styling for active. Can you move it into the source, so that View Page Source will show what the styling criteria is? Also, post a description of what the active style is supposed to change? What are you trying to do? It is confusing that every one of your pages: 01, 02, and 03 show 01 as active in the source. On a last-second re-look, it occurs to me that your a causes a re- direct to another page. How do you stall (delay) (avoid immediate loss of control) in order to change the class in the current page script? Once you redirect, I think you are gone. Your current page loses control. I have had this happen in another context, so I bet this is it. Do not use a. Use just the li and give it a style that makes it look like a link. Use onclick() only in your Jquery. In your Jquery, change the class, and then redirect. I believe it is a javascript window.location=... that accomplishes the same thing is a's re- direct. window.location = 'http://www.yourdomain.com' // this immediately takes you to the page yourdomain. Now, once you are in the new page, the importance of knowing what element had the active class in the previous page is defeated. In the new page, you will know nothing about what used to be in the old page. So, what is the point of the needing to know active class if you are leaving the page?
[jQuery] Re: Submitting after Validation
Hi Stephen, Try using input type=button instead of submit as per my example below. Excuse the aspx :). register.aspx code. string usrName = Request[userName]; Response.Clear(); Response.Write(Hello + usrName); Response.End(); -- client side code and html script type=text/javascript $(document).ready(function() { $(form).validate(); $(#userName).rules(add, { required: true, messages: { required: User Name is required. } }); $(#submitForm).click(function() { if ($(form).valid()) { $.post(register.aspx, $(form).serialize(), function (data, status) { $(#message).text(data) }, text) } }); }); /script body div id=message/div form id=dataForm table tr tdlabelUser Name:/label/td tdinput type=text id=userName name=userName value=//td /tr tr td colspan=2input type=button id=submitForm name=submitForm value=Submit //td /tr /table /form /body --- end of client side code and html On Nov 5, 7:41 am, StephenJacob turnstylecreat...@gmail.com wrote: Just to clarify, the $.post function works perfectly and returns my json results. Due to the limitations of the validation system i was using (no remote options) i had to begin using the standard jquery .validate library. Please help me understand how to implement the .Validate w/ my HTML form. As you can see the $.post option has the process.php written in the Jquery and leaves the HTML form action blank. With the Jquery .Validate, I need to define the process.php as the Action correct? If so, why does the form continue to submit normally? Thanks for all the help everyone! I think with a bit more guidance i'll have a really strong understanding of the validation system. On Nov 4, 3:33 pm, StephenJacob turnstylecreat...@gmail.com wrote: @Leonard, unfortunately it's not due to the function argument. @Dylan, I've looked at this tutorial a few times. It's not using the official Jquery Validate system and hasn't been able to help me fill in any gaps in my learning curve... It seems that every tutorial has their own convoluted system to doing validation.. And the ones that do use the standard validation system none of them thoroughly explain the form submission part. This is my current working Validation code + Submit function that does not work properly. It post the page normally, like any HTML form would. $(document).ready(function(){ $(#contactForm).validate({ rules: { fullname: { required: true, minlength: 2 }, email: { required: true, email: true }, company: { required: true, minlength: 2 }, phone: { required: true, minlength: 2 }, }, messages: { fullname: 'span class=errorPlease enter your bfull name/b./ span', email: 'span class=errorPlease enter a valid bemail address/ b./span', company: 'span class=errorPlease enter your bcompany/b./ span', phone: 'span class=errorPlease enter your bphone number/b./ span' }, submitHandler: function() { form.submit(); } }); }); // HTML FORM form id=contactForm method=POST action=process.php //Stuff goes here /form // WORKING VALIDATION USING LIMITED VALIDATION SYSTEM $(document).ready(function(){ $(#signupForm #submit).click(function(){ $(.error).hide(); var hasError = false; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var regarding_Val = $(#regarding).val(); var message_Val = $(#message).val(); var subcontact = $(#subcontact).val(); var fullname_Val = $(#fullname).val(); if(fullname_Val == '') { $(#fullname).after('span class=errorPlease enter your full name./span'); hasError = true; } var company_Val = $(#company).val(); if(company_Val == '') { $(#company).after('span class=errorPlease enter your company./span'); hasError = true; } var phone_Val =
[jQuery] cannot insert html into DIV
Hi Guys, I have several .class DIVs I want to manipulate. I have retrieved them using the following code: var canvasClasses = new Array(); $(.canvas).each(function() { canvasClasses.push() }); I am now trying to insert some HTML into the DIVs but its not working: canvasClasses[0].innerHTML = htmlhere; Any ideas on why its not working ?
[jQuery] jQueryExchange
http://old.nabble.com/file/p26206565/theme.logo Going around the web looking for well structured jQuery community discussion points, I realized that there are several places where to find answers or suggestions but there isn’t a core space dedicated to QA, made exception to jQuery site that anyway doesn’t work as a QA service. I can find discussions on Stackoverflow, or in many blogs dedicated to all kinds of plug-ins, but there’s any place really dedicated entirely to the growing community interested on developing with the jQuery framework. The intent of jQueryExchange is to give a referral for any kind of questions, issues, proposals for components, critics, solutions, etc. to all jQuery’s users and developers that want to participate and discuss on; it is built over the Stack overflow QA engine (Stack exchange) with all its features available. Now jQueryExchange is waiting for your contribution to become a useful tool for all of you who needs or wants to give support on jQuery developing matters. visit http://jquery.pupunzi.com jQueryExchange and, if you want, partecipate! -- View this message in context: http://old.nabble.com/jQueryExchange-tp26206565s27240p26206565.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] cannot insert html into DIV
You have to supply the canvas object as a parameter to the push function to add it to the array. canvasClasses.push($(this)); On Thu, Nov 5, 2009 at 10:16 AM, shaf shaolinfin...@gmail.com wrote: Hi Guys, I have several .class DIVs I want to manipulate. I have retrieved them using the following code: var canvasClasses = new Array(); $(.canvas).each(function() { canvasClasses.push() }); I am now trying to insert some HTML into the DIVs but its not working: canvasClasses[0].innerHTML = htmlhere; Any ideas on why its not working ?
[jQuery] Re: cannot insert html into DIV
You have to supply the canvas object as a parameter to the push function to add it to the array. canvasClasses.push($(this));
[jQuery] Show/Open jqGrid with hiddengrid: true on a click event
Hi all, I'm using jqgrid with: hiddengrid: true, when the page is loaded the grid is collapsed. I ask if there's a way to open/show the grid when I made a click event on a link. In example: $(a.show-grid).click(function(e){ //code to open/show the grid which is now collpased. e.preventDefault(); }); -- Massimiliano Marini - http://www.massimilianomarini.com It's easier to invent the future than to predict it. -- Alan Kay
[jQuery] Re: cannot insert html into DIV
That doesnt work either. On Nov 4, 11:28 pm, Andrew Tan afh...@gmail.com wrote: You have to supply the canvas object as a parameter to the push function to add it to the array. canvasClasses.push($(this)); On Thu, Nov 5, 2009 at 10:16 AM, shaf shaolinfin...@gmail.com wrote: Hi Guys, I have several .class DIVs I want to manipulate. I have retrieved them using the following code: var canvasClasses = new Array(); $(.canvas).each(function() { canvasClasses.push() }); I am now trying to insert some HTML into the DIVs but its not working: canvasClasses[0].innerHTML = htmlhere; Any ideas on why its not working ?
[jQuery] Removed iframe still loads
When trying to remove an iframe from the dom (i.e. $('iframe').remove ()) while the iframe is still loading, the iframe is removed, however the main browsers progress bar indicates that the iframe is still loading. Is there a way to stop it from loading and remove it? Thanks.
[jQuery] Re: cannot insert html into DIV
If you used Andrew's example, then you added a jQuery object to the canvasClasses array. Calling innerHTML on a jQuery object won't work. Try canvasClasses[0].html('htmlhere') On Nov 4, 3:35 pm, shaf shaolinfin...@gmail.com wrote: That doesnt work either. On Nov 4, 11:28 pm, Andrew Tan afh...@gmail.com wrote: You have to supply the canvas object as a parameter to the push function to add it to the array. canvasClasses.push($(this)); On Thu, Nov 5, 2009 at 10:16 AM, shaf shaolinfin...@gmail.com wrote: Hi Guys, I have several .class DIVs I want to manipulate. I have retrieved them using the following code: var canvasClasses = new Array(); $(.canvas).each(function() { canvasClasses.push() }); I am now trying to insert some HTML into the DIVs but its not working: canvasClasses[0].innerHTML = htmlhere; Any ideas on why its not working ?
Re: [jQuery] Why this code don't work
Dhruva Sagar wrote: Great :) Hi again Dhruva: I have one more question regarding this topic. How I can delete all the newest elements created using the previous jQuery functions? Exists one method for all or I need to build a custom function and clic as many times as new elements I added? Cheers -- Saludos ReynierPM
Re: [jQuery] Why this code don't work
Well I would suggest that you keep adding the generated id's of the inputs hidden inputs in an array. Write a reset function which then loops through the array and selects them using $() and call remove() for them to remove them from the DOM. Other than that I don't think there is any way specifically that could allow you to identify the inputs created from jquery uniquely. Thanks Regards, Dhruva Sagar. On Thu, Nov 5, 2009 at 5:56 AM, ReynierPM rper...@uci.cu wrote: Dhruva Sagar wrote: Great :) Hi again Dhruva: I have one more question regarding this topic. How I can delete all the newest elements created using the previous jQuery functions? Exists one method for all or I need to build a custom function and clic as many times as new elements I added? Cheers -- Saludos ReynierPM
[jQuery] Re: cannot insert html into DIV
Thanks that worked. Ok, I am now trying to add several google maps using the same method to no avail. Code below: $(document).ready(function(){ /*Create Map/Address/.map_canvas class Arrays*/ var map = new Array(); var mapCanvasClasses = new Array(); /*Load Default view on map*/ geocoder = new google.maps.Geocoder(); var myLatlng = new google.maps.LatLng(51.50, -0.07); var myOptions = { zoom: 8, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } /*Get all map_canvas class instances*/ $(.map_canvas).each(function() { mapCanvasClasses.push($(this)); }); /*suspect problem here*/ map[0] = new google.maps.Map(mapCanvasClasses[0], myOptions); }); I suspect the the problem is with the second last line, or more accurately the mapCanvasClasses[0] bit. Whenever I replace that with a getElementById(map_canvas) it will work. But since I am using multiple DIV classes I cannot use the getElementById() function. Any ideas on how I can fix this ? On Nov 5, 12:04 am, mkmanning michaell...@gmail.com wrote: If you used Andrew's example, then you added a jQuery object to the canvasClasses array. Calling innerHTML on a jQuery object won't work. Try canvasClasses[0].html('htmlhere') On Nov 4, 3:35 pm, shaf shaolinfin...@gmail.com wrote: That doesnt work either. On Nov 4, 11:28 pm, Andrew Tan afh...@gmail.com wrote: You have to supply the canvas object as a parameter to the push function to add it to the array. canvasClasses.push($(this)); On Thu, Nov 5, 2009 at 10:16 AM, shaf shaolinfin...@gmail.com wrote: Hi Guys, I have several .class DIVs I want to manipulate. I have retrieved them using the following code: var canvasClasses = new Array(); $(.canvas).each(function() { canvasClasses.push() }); I am now trying to insert some HTML into the DIVs but its not working: canvasClasses[0].innerHTML = htmlhere; Any ideas on why its not working ?
[jQuery] [ ajax jQuery]
Hi, Why this code not is ok? -8--- $(document).ready(function(){ $(.button).click(function(){ $.ajax({ url: ejemplo.html, success: function(datos){ alert(datos); } }); }); }); -8-- When y click en Button it not show datos. thank´s
Re: [jQuery] [ ajax jQuery]
Normally, one would direct an AJAX request to some server-side script (eg. PHP, Python, Perl, etc.) not a plain HTML page. On Wed, Nov 4, 2009 at 8:55 PM, Lord Gustavo Miguel Angel goosfanc...@gmail.com wrote: Hi, Why this code not is ok? -8--- $(document).ready(function(){ $(.button).click(function(){ $.ajax({ url: ejemplo.html, success: function(datos){ alert(datos); } }); }); }); -8-- When y click en Button it not show datos. thank´s
Re: [jQuery] [ ajax jQuery]
if i change ejemplo.html for example.php error. if i change for this: $(document).ready(function(){ $.ajax({ type: POST, url: uno.php, data: nombre=juanapellido=luna, success: function(datos){ alert(datos); } }); }); script run!. before not. -- From: brian zijn.digi...@gmail.com Sent: Wednesday, November 04, 2009 11:00 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] [ ajax jQuery] Normally, one would direct an AJAX request to some server-side script (eg. PHP, Python, Perl, etc.) not a plain HTML page. On Wed, Nov 4, 2009 at 8:55 PM, Lord Gustavo Miguel Angel goosfanc...@gmail.com wrote: Hi, Why this code not is ok? -8--- $(document).ready(function(){ $(.button).click(function(){ $.ajax({ url: ejemplo.html, success: function(datos){ alert(datos); } }); }); }); -8-- When y click en Button it not show datos. thank´s