Re: [jQuery] superfish joomla
You forgot to put ; after }) a couple of times. IE is a bit strict in that regard. Jonathan Eddie wrote: Hello all at jquery group, superfish menu in joomla works fantastic but it gives an error in IE8 and my client hates it! the done, but with errors this is the errordoes anyone know how to fix it!! Best, Chris Message: Object doesn't support this property or method Line: 48 Char: 35 Code: 0 URI: http://www.rallybrc.co.uk/ this is the code around line 48: jQuery.noConflict(); jQuery(function($){ $(ul.sf-menu).superfish({hoverClass:'sfHover', pathClass:'active', pathLevels:0, delay:800, animation: {opacity:'show'}, speed:'def', autoArrows:0, dropShadows:1}) }); jQuery(window).load( function() { jQuery(ul.sf- menu).superfish_width_mod({ vertical:0, menuWidth:'100%', equalWidth: 0, resizeSeps:0, resizeSubMenus:0 }) }) jQuery.event.special.hover.delay = 100; jQuery.event.special.hover.speed = 100; /script -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] tooone7 Can't understand this... Want to make a image appear on active link
tooone777 wrote: $(ul#nav_prim a)[i]... you need to use $(ul#nav_prim a).eq(i)... or $(ul#nav_prim a:eq(+i+))... Jonathan -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] tooone7 Can't understand this... Want to make a image appear on active link
$('selector')[index] returns the actual DOM element, while $('selector').eq(i) returns a jquery object (you can see a jquery object as some sort of a shell around the actual DOM node that the jquery functions work on). You can only use the jquery .css() function on jquery objects, and not directly on DOM nodes. I think it's easiest to explain by using the console in firebug: type $(ul#nav_prim a)[1] and $(ul#nav_prim a).eq(i) into the console and you'll see that firebug returns a slightly different result. As for ($(ul#nav_prim a)[i]==document.URL), I don't think this is the proper way to do it, but if it works, great (just don't assume this will work in all browsers, test it first). Jonathan tooone777 wrote: Jonathan Vanherpe (Tamp; T NV) wrote: tooone777 wrote: $(ul#nav_prim a)[i]... you need to use $(ul#nav_prim a).eq(i)... or $(ul#nav_prim a:eq(+i+))... Jonathan -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be I changed my code to the way you suggested, the error message is now gone but the background image doesn't change. However, if it looks like this: function displayBgImg() { for (var i=0; i$(ul#nav_prim a).length; i++) { if ($(ul#nav_prim a)[i] == document.URL) { $(ul#nav_prim a).eq(i).css(background-image, url(images/nav_bg.gif)); } } } it works! Notice that i only have eq(i) on line 4 but not on line 3. Do you mind explaining what's happening when i use .eq(i) instead of [i]? Thank you very much for the help Jonathan :) -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] Get font-family from iframe
I'm not sure what exactly you're trying to do, maybe if you gave us an explanation of your overall goal we could help you better. There might be other ways to do what you're trying that might not even involve javascript and work everywhere. FWiW, this behaviour is in FF 3.6 too Jonathan jordanrynard wrote: Wow, you're absolutely right -- I didn't even bother to try any other browsers as it's just the sort of thing I wouldn't think would be the result of a 'browser issue'. I tested this code in recent versions of IE, Chrome, Opera, and Safari, and it works perfectly. In Firefox 3.5.7 this appears to be a bug... How disappointing - I love my Firefox, and it's never let me down before : ( Thanks for pointing that out Jonathan - at least I know I can use the code for now and know it'll work 'most' of the time... and I can stop racking my brain as to why it wasn't working! Now if only I can find a workaround to use in Firefox for now that's preferably not as annoying as having to store fonts in a cookie!!! If anyone has any suggestions I'd love to hear it... Thanks!! Jonathan Vanherpe (Tamp; T NV) wrote: I didn't see you posted azn example page. When testing it, I found that both Opera and Chromium returned the correct thing but they format it differently. Opera alerts Comic Sans MS [microsoft]. I actually like how Opera alerts the font you're actually using instead of the whole font stack, this is way more useful information in most cases. I didn't test in IE, but I guess this is a bug in Firefox. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] Get font-family from iframe
So you're basically writing a preview window or something for tinyMCE? I can't really think of a different way of doing this, unless you want to implement autosave and reload the content periodically with AJAX. Jonathan jordanrynard wrote: I have two documents: The parent, and the iframe. When activated, the parent document dynamically appends an instance of tinymce to itself. It retrieves the content for the editor (tinymce) from a selected element in the iframe. The style of text displayed in tinymce is identical to the style of text displayed in the iframe by extracting the css style properties from the element when loading the editor. So because of this bug in Firefox, the text in the editor isn't being styled according to the font being used in the iframe. (works in all other browsers of course, but not the current version of Firefox) Hopefully that helps explain the situation in which I'm using the aforementioned method. I'm not sure what exactly you're trying to do, maybe if you gave us an explanation of your overall goal we could help you better. There might be other ways to do what you're trying that might not even involve javascript and work everywhere. FWiW, this behaviour is in FF 3.6 too Jonathan -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] Re: show input field base on selected option
maybe something like this? $(function(){ $('#type').change(function(){ var selected = $(this).children().filter(':selected'); if(selected.val()=='parttime'){ $('#numOfHours').show(); }else{ $('#numOfHours').hide(); } }); }); This is untested, and can probably be written a lot shorter. Throw a couple of console.log(); lines in there and I'm sure you'll figure out what's wrong. If it still doesn't work, post your page online somewhere. Jonathan 123gotoandplay wrote: this is what i have now $('#numOfHours').hide(); $('#type').change(function() { if($('#type :selected').text() == parttime) { $('#numOfHours').show(); } else { $('#numOfHours').hide(); } On Feb 17, 2:08 pm, 123gotoandplaywesweatyous...@gmail.com wrote: How do i show a input field only when a certain option is selected? and hide if it isn't selected regards -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] Get font-family from iframe
does every browser do that? jordanrynard wrote: I'm trying to retrieve the current font from an element that is within an iframe... unsuccessfully. From within the document itself I can retrieve the font just fine using the following: $(document).ready(function(){ var getFontFamily = $(#get_font_of_this).css(font-family); alert(getFontFamily); }); -- returns (Comic Sans MS, cursive) But once I try retrieving the same element's font from a parent document as shown below, I do not get the expected response: $(document).ready(function(){ $(#iframe).load(function(){ var getFontFamily = $(#iframe).contents().find(#get_font_of_this).css(font-family); alert(getFontFamily); }); }); -- returns (serif) I can seemingly retrieve any other css property through this method, but for some reason the font returns as a default (serif), or sometimes (Arial, ..., serif) If anyone can shed some light on this issue, I will be indebted to you. Thanks in advance! Example page can be found at http://www.arcadiasitedesign.com/page1.php http://www.arcadiasitedesign.com/page1.php -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] Get font-family from iframe
I didn't see you posted azn example page. When testing it, I found that both Opera and Chromium returned the correct thing but they format it differently. Opera alerts Comic Sans MS [microsoft]. I actually like how Opera alerts the font you're actually using instead of the whole font stack, this is way more useful information in most cases. I didn't test in IE, but I guess this is a bug in Firefox. Jonathan Jonathan Vanherpe (T T nv) wrote: does every browser do that? jordanrynard wrote: I'm trying to retrieve the current font from an element that is within an iframe... unsuccessfully. From within the document itself I can retrieve the font just fine using the following: $(document).ready(function(){ var getFontFamily = $(#get_font_of_this).css(font-family); alert(getFontFamily); }); -- returns (Comic Sans MS, cursive) But once I try retrieving the same element's font from a parent document as shown below, I do not get the expected response: $(document).ready(function(){ $(#iframe).load(function(){ var getFontFamily = $(#iframe).contents().find(#get_font_of_this).css(font-family); alert(getFontFamily); }); }); -- returns (serif) I can seemingly retrieve any other css property through this method, but for some reason the font returns as a default (serif), or sometimes (Arial, ..., serif) If anyone can shed some light on this issue, I will be indebted to you. Thanks in advance! Example page can be found at http://www.arcadiasitedesign.com/page1.php http://www.arcadiasitedesign.com/page1.php -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] Re: ajaxsubmit dosn´t send the respons e to the defined target
And more importantly, does it have the same case? Marty Jones wrote: I know this may sound silly but do you have a div element with a id of 'Preview'? On Feb 12, 5:43 am, Pietpeter.fr...@sellbytel.de wrote: Dear all, I´m using ajaxSubmit to send a form (incl. fileuploads) to my server. Everthings works well but the response from the server will not displayed in the defined target (div id=Preview). Instead of the response is display in target=_blank. What could be wrong??? The submit bind is $(document).ready(function() { $('#store').bind('submit', function() { $(this).ajaxSubmit({ target: '#Preview' }); return false; }); }); Greetings Peter -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] Re: how to make this really beautifull pattern
hno wrote: hno wrote: HI I have seen this pattern in http://www.altsoftware.com/index.php . there are news menu in the left side . Please visit this site . The news will be change with a really beautiful pattern in every 5 seconds I think it has been written with jquery but I don't know how can I make something like this How can I do so ? thanks so , How can I do so ? I'm waiting ... . How about you just look at the source code? http://www.altsoftware.com/alt_news_rotator.js There's comments and everything -- Jonathan Vanherpe - Tallieu Tallieu nv - jonat...@tnt.be
Re: [jQuery] rel=nofollow with jquery.
snowalker wrote: Hi, I am pretty new in jQuery and I have a dumb (I guess) question: How will google spider interpret rel=nofollow added to links with jQuery? or, will consider Google spider nofollow all of those links? Thanks! Googlebot does not execute javascript, so it'll just assume the links don't have rel=nofollow . It really needs to be in the markup to be effective. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Removing percentage after dot - font-size: 30.6207px
Mircea wrote: I have a slider that sets my CSS font-size to a value. The value itself is accepted by CSS buy I would like to remove the decimals after the dot. For example one value is: font-size: 30.6207px and it should be font-size: 30px or font-size: font-size: 44.2759px; and it should be font-size: 44px The font-size is set my this function: $(.ui-selected).css('font-size', maxFont * percentage); Is there a way I could strip the after dot part? Thank you. parseInt(maxFont * percentage,10) should do it. see: http://www.w3schools.com/jsref/jsref_parseInt.asp Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Reduce Image Quality
German Bortoli wrote: Hello everybody, I'm getting a problem in my server, for example when someone want to upload an image with 5mb of size, on the server side is kinda impossible to upload that, max size is 2mb and I cannot modify it because is rented host. Now my question is... there is some stuff on client/browser side to reduce the quality of an image converting any size of them in less than 1mb ? Thanks for reading -- - Bortoli German - Blog: http://www.geoks.com.ar There are Flash and java applets that can do this for you. You can't do this with plain javascript, AFAIK (at least not in all browsers). Jonathan -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
Re: [jQuery] Reduce Image Quality
German Bortoli wrote: 2010/1/18 Jonathan Vanherpe (T T NV) jonat...@tnt.be mailto:jonat...@tnt.be German Bortoli wrote: Hello everybody, I'm getting a problem in my server, for example when someone want to upload an image with 5mb of size, on the server side is kinda impossible to upload that, max size is 2mb and I cannot modify it because is rented host. Now my question is... there is some stuff on client/browser side to reduce the quality of an image converting any size of them in less than 1mb ? Thanks for reading -- - Bortoli German - Blog: http://www.geoks.com.ar There are Flash and java applets that can do this for you. You can't do this with plain javascript, AFAIK (at least not in all browsers). Jonathan -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441 Nice, could you give me some names about that or some example if is possible, I was looking for it on google, and didn't find it. -- - Bortoli German - After googling (http://www.google.com/search?name=fhl=enq=flash+image+upload+resize) for a few minutes I found this: http://code.google.com/p/swfupload/ I'm sure there are others, but I haven't used any of them, so don't ask me which one's best ;-). Jonathan -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
Re: [jQuery] Re: Argh!! IE8!
RobG wrote: On Jan 12, 5:51 am, Valerijvaleri...@gmail.com wrote: Hey guys, I have this popup menu that works.. great! In Chrome, Safari, Firefox AND it USED to work in IE8, until I added just 1 div. [...] This works in all the browsers great even after I added this div, but in IE8 it suddenly stopped. a id=acc class=baritem href=javascript:void(0);div class=textupMy Account/div/a Your markup is invalid, div elements don't belong inside a elements. [...] Is there a fix for this? Start with valid markup:URL: http://validator.w3.org/ Also, if it's not a link, don't use an a element. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: Foreign charachters in .post()
maybe it's because of the application/json part. I guess that should be application/x-www-form-urlencoded or something. Just play with the options you find here: http://docs.jquery.com/Ajax/jQuery.ajaxSetup Jonathan youradds wrote: Mmm, maybe that didn't work :/ jQuery.ajaxSetup({ scriptCharset: ISO-8859-1 , contentType: application/json; charset=ISO-8859-1}); jQuery.post(/cgi-bin/unterricht/review.cgi, { Review_Rating: the_rating, ID: theID, add_this_review: 1, Review_Contents: contents, Review_Subject: subject, Review_ByLine: byline, Review_GuestName: guestname, Review_GuestEmail: guestemail, add_review: 1, SecurityImage: SecurityImage, SessionID: SessionID }, function(response){ jQuery('#ajax_rate_indicator').fadeOut(); setTimeout(finishAjaxReview('the_rating_box', '+escape (response)+'), 400); }); The script is called ok, but it doesn't pass any of the paramaters - the POST values passed in are simple $VAR1 = {}; (i.e nothing was passed it?) TIA Andy On Jan 11, 3:54 pm, Jonathan Vanherpe (T T NV)jonat...@tnt.be wrote: actually, putting this once somewhere in your script should fix it: $.ajaxSetup({ scriptCharset: ISO-8859-1 , contentType: application/json; charset=ISO-8859-1}); but still, you'll make your life easier if you just go for a completely utf-8 workflow. Jonathan Jonathan Vanherpe (T T NV) wrote: this seems to answer your question somewhat: http://stackoverflow.com/questions/26620/how-to-set-encoding-in-getjs... although I'd personally recommend to just use utf-8 for everything (so making your website and database use utf-8) Jonathan youradds wrote: Anyone got any suggestions? This is the last bug I've gotta squish :/ TIA Andy On Jan 11, 9:18 am, youraddsandy.ne...@gmail.com wrote: I found a way to do this in the .cgi script - but obviously I'd prefer to do it vai the AJAX submission, instead of having to encode it properly at the server end :) my $contents = $IN-param('Review_Contents'); $contents =~ s/([\200-\377]+)/from_utf8({ -string = $1, - charset = 'ISO-8859-1'})/eg; $IN-param('Review_Contents' = $contents ); TIA Andy On Jan 11, 8:15 am, youraddsandy.ne...@gmail.com wrote: Hi, Got a bit of a weird one here :/ The following code works fine: jQuery.post(/cgi-bin/review.cgi, { Review_Rating: the_rating, ID: theID, add_this_review: 1, Review_Contents: contents, Review_Subject: subject, Review_ByLine: byline, Review_GuestName: guestname, Review_GuestEmail: guestemail, add_review: 1, SecurityImage: SecurityImage, SessionID: SessionID }, function(response){ jQuery('#ajax_rate_indicator').fadeOut(); setTimeout(finishAjaxReview('the_rating_box', '+escape (response)+'), 400); }); ...*appart* from the fact stuff like: = = = ..gets converted to: ö = ä = ü = I did a little bit of research, and found something about adding this (but this seems to really be for a different jQuery function - which is probably why its not working); contentType: application/x-www-form- urlencoded;charset=ISO-8859-15, Can anyone suggest how I could fix this issue with foreign charachters? TIA Andy -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: Foreign charachters in .post()
I'm not sure what else there is, I never change character sets and set everything to UTF-8 just to avoid the mess you're having. The only advice I can give you is to make sure everything's set to the same character set (your html, your js, your database, your php source files, ...) Then try to figure out where the conversion happens with firebug (set some console.log(var) markers in your code, look at the headers, etc... Or post a link to a test case that shows the problem so we can have a direct look at it. Jonathan youradds wrote: Mmm, changing to that works - but the error is still there with the unlat charachters :( On Jan 12, 12:40 pm, Jonathan Vanherpe (T T NV)jonat...@tnt.be wrote: maybe it's because of the application/json part. I guess that should be application/x-www-form-urlencoded or something. Just play with the options you find here:http://docs.jquery.com/Ajax/jQuery.ajaxSetup Jonathan youradds wrote: Mmm, maybe that didn't work :/ jQuery.ajaxSetup({ scriptCharset: ISO-8859-1 , contentType: application/json; charset=ISO-8859-1}); jQuery.post(/cgi-bin/unterricht/review.cgi, { Review_Rating: the_rating, ID: theID, add_this_review: 1, Review_Contents: contents, Review_Subject: subject, Review_ByLine: byline, Review_GuestName: guestname, Review_GuestEmail: guestemail, add_review: 1, SecurityImage: SecurityImage, SessionID: SessionID }, function(response){ jQuery('#ajax_rate_indicator').fadeOut(); setTimeout(finishAjaxReview('the_rating_box', '+escape (response)+'), 400); }); The script is called ok, but it doesn't pass any of the paramaters - the POST values passed in are simple $VAR1 = {}; (i.e nothing was passed it?) TIA Andy On Jan 11, 3:54 pm, Jonathan Vanherpe (TT NV)jonat...@tnt.be wrote: actually, putting this once somewhere in your script should fix it: $.ajaxSetup({ scriptCharset: ISO-8859-1 , contentType: application/json; charset=ISO-8859-1}); but still, you'll make your life easier if you just go for a completely utf-8 workflow. Jonathan Jonathan Vanherpe (TT NV) wrote: this seems to answer your question somewhat: http://stackoverflow.com/questions/26620/how-to-set-encoding-in-getjs... although I'd personally recommend to just use utf-8 for everything (so making your website and database use utf-8) Jonathan youradds wrote: Anyone got any suggestions? This is the last bug I've gotta squish :/ TIA Andy On Jan 11, 9:18 am, youraddsandy.ne...@gmail.comwrote: I found a way to do this in the .cgi script - but obviously I'd prefer to do it vai the AJAX submission, instead of having to encode it properly at the server end :) my $contents = $IN-param('Review_Contents'); $contents =~ s/([\200-\377]+)/from_utf8({ -string =$1, - charset ='ISO-8859-1'})/eg; $IN-param('Review_Contents' =$contents ); TIA Andy On Jan 11, 8:15 am, youraddsandy.ne...@gmail.comwrote: Hi, Got a bit of a weird one here :/ The following code works fine: jQuery.post(/cgi-bin/review.cgi, { Review_Rating: the_rating, ID: theID, add_this_review: 1, Review_Contents: contents, Review_Subject: subject, Review_ByLine: byline, Review_GuestName: guestname, Review_GuestEmail: guestemail, add_review: 1, SecurityImage: SecurityImage, SessionID: SessionID }, function(response){ jQuery('#ajax_rate_indicator').fadeOut(); setTimeout(finishAjaxReview('the_rating_box', '+escape (response)+'), 400); }); ...*appart* from the fact stuff like: = = = ..gets converted to: = = = I did a little bit of research, and found something about adding this (but this seems to really be for a different jQuery function - which is probably why its not working); contentType: application/x-www-form- urlencoded;charset=ISO-8859-15, Can anyone suggest how I could fix this issue with foreign charachters? TIA Andy -- Jonathan Vanherpe - TallieuTallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: Superfish IE6 dies with opacity CSS attribute
Šime Vidas wrote: It violates the standard and you should avoid such practice. Proper nesting: ul liFirst ul liOne/li liTwo/li /ul /li liSecond/li /ul Please, put a demo of the problem online... It's perfectly ok to omit the ul's in your css selector, but the HTML has to be like you posted, yes. It's not exactly clear from his post what cubefree did, though. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: Foreign charachters in .post()
this seems to answer your question somewhat: http://stackoverflow.com/questions/26620/how-to-set-encoding-in-getjson-jquery although I'd personally recommend to just use utf-8 for everything (so making your website and database use utf-8) Jonathan youradds wrote: Anyone got any suggestions? This is the last bug I've gotta squish :/ TIA Andy On Jan 11, 9:18 am, youraddsandy.ne...@gmail.com wrote: I found a way to do this in the .cgi script - but obviously I'd prefer to do it vai the AJAX submission, instead of having to encode it properly at the server end :) my $contents = $IN-param('Review_Contents'); $contents =~ s/([\200-\377]+)/from_utf8({ -string = $1, - charset = 'ISO-8859-1'})/eg; $IN-param('Review_Contents' = $contents ); TIA Andy On Jan 11, 8:15 am, youraddsandy.ne...@gmail.com wrote: Hi, Got a bit of a weird one here :/ The following code works fine: jQuery.post(/cgi-bin/review.cgi, { Review_Rating: the_rating, ID: theID, add_this_review: 1, Review_Contents: contents, Review_Subject: subject, Review_ByLine: byline, Review_GuestName: guestname, Review_GuestEmail: guestemail, add_review: 1, SecurityImage: SecurityImage, SessionID: SessionID }, function(response){ jQuery('#ajax_rate_indicator').fadeOut(); setTimeout(finishAjaxReview('the_rating_box', '+escape (response)+'), 400); }); ...*appart* from the fact stuff like: ö = ä = ü = ..gets converted to: ö = ä = ü = I did a little bit of research, and found something about adding this (but this seems to really be for a different jQuery function - which is probably why its not working); contentType: application/x-www-form- urlencoded;charset=ISO-8859-15, Can anyone suggest how I could fix this issue with foreign charachters? TIA Andy -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: Foreign charachters in .post()
actually, putting this once somewhere in your script should fix it: $.ajaxSetup({ scriptCharset: ISO-8859-1 , contentType: application/json; charset=ISO-8859-1}); but still, you'll make your life easier if you just go for a completely utf-8 workflow. Jonathan Jonathan Vanherpe (T T NV) wrote: this seems to answer your question somewhat: http://stackoverflow.com/questions/26620/how-to-set-encoding-in-getjson-jquery although I'd personally recommend to just use utf-8 for everything (so making your website and database use utf-8) Jonathan youradds wrote: Anyone got any suggestions? This is the last bug I've gotta squish :/ TIA Andy On Jan 11, 9:18 am, youraddsandy.ne...@gmail.com wrote: I found a way to do this in the .cgi script - but obviously I'd prefer to do it vai the AJAX submission, instead of having to encode it properly at the server end :) my $contents = $IN-param('Review_Contents'); $contents =~ s/([\200-\377]+)/from_utf8({ -string = $1, - charset = 'ISO-8859-1'})/eg; $IN-param('Review_Contents' = $contents ); TIA Andy On Jan 11, 8:15 am, youraddsandy.ne...@gmail.com wrote: Hi, Got a bit of a weird one here :/ The following code works fine: jQuery.post(/cgi-bin/review.cgi, { Review_Rating: the_rating, ID: theID, add_this_review: 1, Review_Contents: contents, Review_Subject: subject, Review_ByLine: byline, Review_GuestName: guestname, Review_GuestEmail: guestemail, add_review: 1, SecurityImage: SecurityImage, SessionID: SessionID }, function(response){ jQuery('#ajax_rate_indicator').fadeOut(); setTimeout(finishAjaxReview('the_rating_box', '+escape (response)+'), 400); }); ...*appart* from the fact stuff like: ö = ä = ü = ..gets converted to: ö = ä = ü = I did a little bit of research, and found something about adding this (but this seems to really be for a different jQuery function - which is probably why its not working); contentType: application/x-www-form- urlencoded;charset=ISO-8859-15, Can anyone suggest how I could fix this issue with foreign charachters? TIA Andy -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Need your opinion you ALL!!!
Erik R. Peterson wrote: Hello everyone, Someone wants me to use FULL DIRECTORY PATHS for every page and script for a website I just completed. I argued that it would slow down the website for users... I prefer relative paths such as /src/ and /img/. Am I wrong to say this? Is there really a difference in performance with speed whether I use absolute or relative paths? Love to hear your opinion... Thanks. Erik BTW - the website was transferred from WINDOWS SERVER to a UNIX... I actually preferred Windows. I'm dealing with a Network Admin that doesn't know web design... Using relative paths is the way to go, otherwise moving the site or changing a domain name will cause you tons of extra work (tell your client you'll have to charge more down the road if they ever change the domain name). It won't make a difference speed-wise, though. Note that most Unix systems are case-sensitive (I know Linux is, but Mac OS X isn't). So always use lowercase for all your filenames, folders and links. http://www.example.com/jQuery.js is not the same as http://www.example.com/jquery.js Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: superfish transparent PNG problem IE (8) when dropdown opens
troop wrote: did you look at the site with IE8? the menu doesnt contain images, the maincontent DIV does. and the transparent PNG of the DIV gets messed up somehow. I kinda solved it by setting: animation: {height:'show'} now there is no opacity change, and the background PNG of the content DIV stays as it should, but the whole thing still is odd... IE's alpha png support basically consists of them applying the IE alpha png filter we all know internally by default. So basically the same bugs we saw in IE6 show when you try to fade in a png in the later versions too. You can either avoid fading elements with transparent png's (in IE) or you can send IE 8-bits versions of your .png (or a .gif, same thing). Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be I'm out of the office from 24/12/09 until 05/01/10
Re: [jQuery] Re: Why mootools animations is more smooth than jquery?
Karl Swedberg wrote: On Dec 3, 2009, at 7:31 PM, Dave Methvin wrote: I refrained from replying because the OP seemed trollish, but he has a point, IMHO. It would be great if someone who knew both frameworks could set up a page that demonstrated a side-by-side case where Mootools has smoother animations than jQuery. Otherwise it's hard do know what might be causing the problem, or even whether there's a problem at all. That's a great idea, Dave. I wonder how much the easing equation affects people's perception of smoothness. It might be worthwhile to try animations using the easing plugin and see if any of those equations feel smoother. --Karl Karl Swedberg www.englishrules.com http://www.englishrules.com www.learningjquery.com http://www.learningjquery.com ok, I've used some code I had lying around and put dummy content in there: http://www.tnt.be/bugs/jquery/moovsjquery/ I actually don't really see a difference on my Ubuntu box (using FF 3.6b4), but there's a huge difference on a colleague's G4 (OS X 10.4, Firefox 3.5.5), so try to find a slow computer to test this on. Again, this might be the fault of the plugin I'm using, if you have another way of doing the same thing in jQuery you can tell me so I know for next time. I really prefer using jQuery, but sometimes I just can't because of things like this. Jonathan -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
Re: [jQuery] Re: Why mootools animations is more smooth than jquery?
That's why I said you needed to find a slow computer to test it on ;-). We need to cater to a diverse audience, and part of that audience is using IE6 on a crappy Intel Celeron chip or Firefox on a G4. Jonathan Michel Belleville wrote: Just used your benchmark and I didn't see any significant differences. Both had slight jumps from time to time, none felt like there was a pattern, I'm using Firefox 3.5 on a iMac pro (last year's edition) running snow leopard. Michel Belleville 2009/12/4 Jonathan Vanherpe (T T NV) jonat...@tnt.be mailto:jonat...@tnt.be Karl Swedberg wrote: On Dec 3, 2009, at 7:31 PM, Dave Methvin wrote: I refrained from replying because the OP seemed trollish, but he has a point, IMHO. It would be great if someone who knew both frameworks could set up a page that demonstrated a side-by-side case where Mootools has smoother animations than jQuery. Otherwise it's hard do know what might be causing the problem, or even whether there's a problem at all. That's a great idea, Dave. I wonder how much the easing equation affects people's perception of smoothness. It might be worthwhile to try animations using the easing plugin and see if any of those equations feel smoother. --Karl Karl Swedberg www.englishrules.com http://www.englishrules.com www.learningjquery.com http://www.learningjquery.com ok, I've used some code I had lying around and put dummy content in there: http://www.tnt.be/bugs/jquery/moovsjquery/ I actually don't really see a difference on my Ubuntu box (using FF 3.6b4), but there's a huge difference on a colleague's G4 (OS X 10.4, Firefox 3.5.5), so try to find a slow computer to test this on. Again, this might be the fault of the plugin I'm using, if you have another way of doing the same thing in jQuery you can tell me so I know for next time. I really prefer using jQuery, but sometimes I just can't because of things like this. Jonathan -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441 -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
Re: [jQuery] Re: Why mootools animations is more smooth than jquery?
I'm not trolling (at least today I'm not ;-)), but mootools' effects are smoother in at least some cases. I've switched to mootools for some websites just because of that, even though I really prefer working with jQuery. Try using scrollTo() diagonally in both frameworks to see one example (ofcourse, this might just be the scrollto plugin's fault). I refrained from replying because the OP seemed trollish, but he has a point, IMHO. Jonathan Rey Bango wrote: LOL. :D Thanks Scott. Rey... Scott Sauyet wrote: On Dec 3, 11:02 am, Rey Bango r...@reybango.com wrote: I think you should consider looking into this yourself. The animations provided by jQuery, while basic, are quite smooth and perform well. If you feel that the ones provided by MooTools perform better, then I would urge you to take the time to investigate it and consider offering patches should you find a good solution. How does Rey do that? Twice I stopped my fingers over the send key on a troll message. I decided that ignoring it was my best bet. I never even considered trying to turn it into a positive suggestion. Sure, Rey, show us all up by being nicer! :-) -- Scott -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: does JQuery have browser bookmarklet development support??
greghauptmann wrote: ok, so really just javascript then What about caching the user credentials - how would you cache this typically? (noting the username/password could not be tied to a particular page/tab, so it would have to be cached at the overall browser context if this makes sense) Also re caching the username/password is there a way to cache it after the browser closes then starts up, or would it not be possible for this scenario? tks On Dec 2, 4:06 pm, Dhruva Sagardhruva.sa...@gmail.com wrote: A bookmarklet is simply javascript code. eg.) javascript: alert('Hi!');void(0); You can create a bookmark in your browser and add that code for it. Whenever you click on that bookmarklet, it will then execute that code on the current page and in this particular case alert a message saying 'Hi!'. It's pretty simple, hope you understand. Thanks Regards, Dhruva Sagar. On Wed, Dec 2, 2009 at 11:33 AM, greghauptmanngreg.hauptm...@gmail.comwrote: Hi I want to development some browser bookmarklets (e.g. for firefox, IE, safari) but I'm not sure where to start. As an example of what I'm talking about see: *http://www.evernote.com/about/download/web_clipper.php *http://readitlaterlist.com/bookmarklets/ I'm after a way to allow a user pass a browser link (e.g. the page they are on) through to my web application see the bookmarklet approach a easier/more basic way to achieve this. They would have to type in their username/password the first time they use it for the their authentication to the backend. QUESTION: How does one develop these bookmarklets? Does JQuery have support or supply a template for this? Or just any other pointers on how people do this? Thanks I guess you can use cookies for that, unless you're somehow not allowed to use them in bookmarklets. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] jquery-1.3.2.min.js causing 400 bad request
hello i want to ask only if what websites best for jqueery tutorial i wanna learn this ! it seem its good On Fri, Nov 27, 2009 at 3:16 AM, rbishop robfromplymo...@gmail.com wrote: Hi there, hoping someone can help a strange intermittent problem. Occasionally, I am experiencing 400 bad request errors when trying to load jquery-1.3.2.min.js. I have taken the request and response headers from firebug during a failure and a success. Does anyone have more experience than myself to analyse these for me please? I can see the differences but don't know how significant they are (such as the failure one saying Content-Type: text/html). ***LOAD FAILURE*** Date: Thu, 26 Nov 2009 19:04:51 GMT Content-Type: text/html Content-Length: 20 Cache-Control: no-store, no-cache Via: 1.1 ourwebsite.com (Access Gateway 3.1.0-420) Host: ourwebsite.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: __utma=188525673.792568405.1258744191.1258744191.1258911751.2; __utmz=188525673.1258744191.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd= (none) If-Modified-Since: Fri, 06 Mar 2009 03:23:42 GMT If-None-Match: 073f8f2a9ec91:6f0 Cache-Control: max-age=0 SUCCESSFUL LOAD: Last-Modified: Fri, 06 Mar 2009 03:23:42 GMT Accept-Ranges: bytes Etag: 073f8f2a9ec91:6f0 Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Thu, 26 Nov 2009 19:06:49 GMT Content-Type: application/x-javascript Content-Length: 57254 Via: 1.1 ourwebsite.com (Access Gateway 3.1.0-420) Host: ourwebsite.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: __utma=188525673.792568405.1258744191.1258744191.1258911751.2; __utmz=188525673.1258744191.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd= (none) Cache-Control: max-age=0
Re: [jQuery] BlockUi - blue ring?
heohni wrote: Hi, I am using the BlockUI in 2 apps. In the first, The overlay works fine, but as soon as I go with my mouse outside the div, into the grey area, my mouse pointer turns to a blue ring (ring of death). In my second, I have the blue ring also within my div area. What am I doing wrong? Can someone please help? A link to the page would be nice. Also some information about the browser and operating system you're using (I suspect you're on Windows as you're using the 'blue something of death' terminology). Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: BlockUi - blue ring?
I don't see a busy cursor in Ubuntu, but I do see it in Win 7 and win XP (on pretty much any browser). The example page on http://malsup.com/jquery/block/stylesheet.html also seems to do this. So I guess this is just a Windows thing. It doesn't stop you from using your browser or anything so it's mostly a cosmetic issue. You could try using something other than blockui to show a modal dialog. Jonathan heohni wrote: Well, we are only on localhost right now, but one example is: http://www.iwb-stahldesign.de/produkte_blumenkuebelgrau.php if you add the item to the shopping cart, you will see it, too. Inside the div all is fine, outside, I see the blue ring cursor. I am on a windows 7 machine, and I have the same behavoir on all browsers, so I guess, you will see the same effect? And the same happen on our localhost example, just with the difference that there I see the blue ring also inside the div area. On 17 Nov., 09:30, Jonathan Vanherpe (T T NV)jonat...@tnt.be wrote: heohni wrote: Hi, I am using theBlockUIin 2 apps. In the first, The overlay works fine, but as soon as I go with my mouse outside the div, into the grey area, my mouse pointer turns to a blue ring (ring of death). In my second, I have the blue ring also within my div area. What am I doing wrong? Can someone please help? A link to the page would be nice. Also some information about the browser and operating system you're using (I suspect you're on Windows as you're using the 'blue something of death' terminology). Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: BlockUi - blue ring?
this seems like a pretty decent list of modal boxes, or use google to find some more: http://komunitasweb.com/2009/03/jquery-modal-box-round-up/ Jonathan heohni wrote: Do you know an alternative to BlockUi? On 17 Nov., 10:05, Jonathan Vanherpe (T T NV)jonat...@tnt.be wrote: I don't see a busy cursor in Ubuntu, but I do see it in Win 7 and win XP (on pretty much any browser). The example page onhttp://malsup.com/jquery/block/stylesheet.htmlalso seems to do this. So I guess this is just a Windows thing. It doesn't stop you from using your browser or anything so it's mostly a cosmetic issue. You could try using something other than blockui to show a modal dialog. Jonathan heohni wrote: Well, we are only on localhost right now, but one example is: http://www.iwb-stahldesign.de/produkte_blumenkuebelgrau.php if you add the item to the shopping cart, you will see it, too. Inside the div all is fine, outside, I see the blue ring cursor. I am on a windows 7 machine, and I have the same behavoir on all browsers, so I guess, you will see the same effect? And the same happen on our localhost example, just with the difference that there I see the blue ring also inside the div area. On 17 Nov., 09:30, Jonathan Vanherpe (TT NV)jonat...@tnt.be wrote: heohni wrote: Hi, I am using theBlockUIin 2 apps. In the first, The overlay works fine, but as soon as I go with my mouse outside the div, into the grey area, my mouse pointer turns to a blue ring (ring of death). In my second, I have the blue ring also within my div area. What am I doing wrong? Can someone please help? A link to the page would be nice. Also some information about the browser and operating system you're using (I suspect you're on Windows as you're using the 'blue something of death' terminology). Jonathan -- Jonathan Vanherpe - TallieuTallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Basic selectors question
HB wrote: Hey, I started learning JQuery today. I got what (EF) selector does but I didn't digest what (E+F) and (E~F) do. Thanks for help and time. They're mostly the same ones as in css and they're all listed here: http://docs.jquery.com/Selectors Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Re: Nested Accordion
Use FireBug to see which styles apply to what element and where they're defined. If you don't show any code it's hard to help you. Jonathan Akbar Ehsan wrote: Unfortunately, I am working in my development area and can not show you the page. In itself it works fine. But when I try to remove/rename your container style from the CSS, my CSS navigation container on the left disappears. Could you, please, explain the purpose container and wrapper classes play in your CSS and JS. I think if I am able to understand it well, I will be able to resolve my issues. Thanks again, Akbar On Mon, Nov 16, 2009 at 11:07 AM, Akbar akbareh...@gmail.com mailto:akbareh...@gmail.com wrote: Hi Adriana, I am trying to use your Side Column nested accordion. I am trying to use it as right hand navigation. I am having all kinds of issues with it. It appears that the CSS for our WWW site may be conflicting with wrapper, container styles of the CSS for nested navigation. I tried renaming wrapper, container etc in your CSS , it did not work. Do you have bare-bones code for your Side Nested Accordion? Thanks, Akbar On Nov 13, 7:08 pm, Adriana adipa...@yahoo.com mailto:adipa...@yahoo.com wrote: Add this CSS declaration: .accordion li {list-style-type:none} On Nov 13, 10:21 pm, Akbar Ehsan akbareh...@gmail.com mailto:akbareh...@gmail.com wrote: I have it almost working. You are right nothing other than JQuery and CSS is needed. However, I get the bullet points next to plus and minuses as well. I am not yet sure why? If you have thoughts about it, please pass it along. Thanks, Akbar On Fri, Nov 13, 2009 at 3:45 PM, MorningZ morni...@gmail.com mailto:morni...@gmail.com wrote: Nothing jQuery, or anything client side for that matter, should have any sort of server-side requirement any HTML that PHP can generate can be done by Perl, Cold Fusion, .NET, etc etc On Nov 13, 2:59 pm, Akbar Ehsan akbareh...@gmail.com mailto:akbareh...@gmail.com wrote: Hello Adriana, Thanks, Does it require PHP? I have no PHP skills. Regards, Akbar On Thu, Nov 12, 2009 at 9:12 PM, Adriana adipa...@yahoo.com mailto:adipa...@yahoo.com wrote: Hello Akbar, Here are two links that provide examples of nested accordions: http://adipalaz.awardspace.com/experiments/jquery/nested_accordion.html http://blog.evaria.com/wp-content/themes/blogvaria/jquery/index-multi. .. Regards, Adriana -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
Re: [jQuery] Re: How to avoid page refresh with jquery in typo3 ?
chris wrote: On Nov 6, 5:25 pm, Jonathan Vanherpe (T T NV)jonat...@tnt.be wrote: I guess you'll just need to add this: $('div#menu').load($(this).attr('href')+' div#menu'); But I should warn you, this is far from efficient, as you're making 2 requests for the same page this way, instead of the one request it would take to just load the page normally. I personally think it's just not worth the effort, but I've told you that before. yes i figured that out, also solved the menu highlighting which was just a CSS div order error on my part. this is how it works for the moment: script src=http://code.jquery.com/jquery-latest.js;/script script $(document).ready(function(){ $('#menu a').click(function(){ $('#maincontent').load($(this).attr('href')+' #maincontent'); $('.submenu').load($(this).attr('href')+' .submenu'); return false; }); }); /script in Safari on the mac it works, the pages load and the submenu loads, however there is a problem with the submenu. on the first click of a submenu item the page loads/refreshes completely but then when i click on another submenu item it loads correcrly directly into the div without refresh, and then alternately, once it loads into the div, once it refreshes the whole page .. in Firefox on the mac the first level menu and loading works but the submenu doesn't appear In Internet Explorer 8 the first level works 'sort of' on some clicks it loads a page corrctly and on other clicks it doesn't load at all, but it's random, i did a series of 10 clicks several times in a row after cleaning cache each time and everytime it works/doesn't on some other combination of pages ... after a dozen clicks or so it doesn't load anything at all anymore ... Do you have a link we can see this at? in terms of efficiency and not being worth the effort, could you elaborate your thoughts on this. the actual page content i am loading through those calls is only very short text paragraphs (maincontent) and a 4 item list (submenu). i have three columns: [snip] so i thought my solution would be more efficient than a traditional refresh can you explain why i got it wrong ? for this site i don't need bookmarking/history or back button browser functionality ... Well, even though you're only showing part of the page, the whole page gets downloaded by your browser (twice, since you're calling load() twice). jQuery will download the whole page, then parse it, throw away what is doesn't need, and insert the small chunk you wanted into the page. Basically this is slower then just loading the page straight away (but I guess you don't see the flicker that's associated with a page load). thx again for the help ! Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] Create PDF from js
I'd look into something server-side if I was you: http://code.google.com/p/wkhtmltopdf/ is a good option, if you have a way of running custom binaries on your server. Jonathan m.ugues wrote: Hallo all. I found this library (http://code.google.com/p/jspdf/) as someone suggested to create custom PDF files from javascript. What I need now is a more difficult task. I need to create a PDF file using the css media=print. So I would like to generate a PDF file equal to what is sent to the printer. Any idea? Kind regards Massimo -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
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] AJAX page working in IE6,7,8 but not in Firefox,Safari and Opera
acetrader wrote: Hi there, The problem is that when I assign the dropdown value to a variable called dropdown in the following line of code var dropdown = document.getElementById('ddlChannelSelect'); it works in IE but not in the other browsers, I have debbugged this in FireBug and it seems that the variable dropdownlist is not actually getting the value of the actual dropdownlist nad it says 'null' or sometimes 'undefined'. Am I doing something wrong ? why is it that it is working in IE but not in other browsers ? can you pls give me a solution with some examples ? [snip] Thank you very much, :) My guess is that the html for your selectbox is select name=ddlChannelSelect. IE will (wrongly) return this element when you call getElmentById, but other browsers won't, because that's not really an idea. Just add id=ddlChannelSelect to your select element. And if you're using jQuery, use $('#ddlChannelSelect') instead of getElementById. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
Re: [jQuery] AJAX page working in IE6,7,8 but not in Firefox,Safari and Opera
Jonathan Vanherpe (T T NV) wrote: because that's not really an idea s/idea/id/ -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: SPAM Messages in the list
http://ejohn.org/blog/google-groups-is-dead/ apparently Google Groups is a nightmare to keep spam-free, and jquery will move to another solution soon (I don't get why Google doesn't put the same spamfilter they use for Gmail in front of Google Groups) Jonathan Michel Belleville wrote: Better just tagging it as spam as it deserve. Michel Belleville 2009/10/28 Shawn sgro...@open2space.com mailto:sgro...@open2space.com We should refrain from replying to any of these spam messages that come through. I agree with the sentiments that the spam is NOT welcome here, but replying to the thread just adds us as a confirmed email address. I honestly believe these messages are not being consciously sent by anyone, but rather those who do appear to be sending them are likely suffering a virus/trojan infection. Or an automated bot is signed up to the list and harvesting emails to send out as. I think the right approach here is to simply ignore the messages, but let the list operators know (via a different thread/message) that these need to be addressed. My thoughts. Shawn -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
[jQuery] Re: alter the font size of a dynamic header?
derek allard wrote: Hello. We are working within a CMS and we have a dynamic text header that pulls into the top of the page. The problem is that there are certain titles that are too long and are breaking into other design elements. I'm thinking there should be a way to count the number of characters and then dynamically change the font-size of the header. 1. Is this possible? 2. Can you point me in the right direction? Thanks. derek Unless you're using a monospace font the approach of counting characters will fail due to the differences in width between characters. I think a better way is to find out the width of a certain element using $('#title').width(), and then just make the font size smaller until it fits (with a loop or something). Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: how to paste image into a web app
Margie wrote: I have a web app (front end jquery, backend django) that allows users to type commens into a text area. My users are asking for the ability to cut and paste images into their comments. They want to use an windows app called mwsnap to basically snap images from their desktop, then ctrl-v to copy the image into my django app. Does anyone know what sort of client side support is needed to do this? I am fairly adept at jquery/javascript, but haven't seen anything like this though it does seem like a very reasonable request since they are certainly able to cut and paste into Outlook this way. However, when I try to cut and paste this way into yahoo mail or gmail it doesn't work, so perhaps this is a hard thing to do in a web app. Can anyone give me a pointer on how this could be done or if it can be done? Thanks, Margie That doesn't work on the web. The best thing you can do is use something like CKeditor and a seperate image upload system that handles rescaling of images and stuff. Maybe you could do this with a Java applet (that's Java, not Javascript), but I haven't seen anything like that anywhere so far. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Get url from iframe
rupak mandal wrote: no because after clicking on any search link, it was redirect to new web page. But src remains same. On Mon, Oct 19, 2009 at 9:45 PM, brian zijn.digi...@gmail.com mailto:zijn.digi...@gmail.com wrote: I believe you can get it from the src attirbute. On Mon, Oct 19, 2009 at 7:37 AM, Rupak rupakn...@gmail.com mailto:rupakn...@gmail.com wrote: Hi all, I have an ifram in a page. iframe contains google.com http://google.com (google search). from there if the user search for a key word, i and click on a link.Is there a way to get the url of newly open page inside the iframe. Plz help me.. thanks Rupak nameofiframe.location ? -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
[jQuery] Re: fadeIn and Out not working on IE but working on firefox
Mr J wrote: hi, i run into a probelm when i want to use the fadein and out function for a new dynamic added inputs. you can add inputs dynamically and i want to do that with fadeIn and Out. it is working great in firefox but not in IE. i think the problem is the new added rows are not in the DOM when the page is loaded and that is why the effect is not working i tried few solutions but i did not manage to solve the problem. here is the test page i'm working on it. http://www.voorbeeldvan.uwapothekeronline.nl/pages/New_Herhaalrecepten.asp?articleid=113816 any help will be appreciated. have you tried styling your input fields (border: 1px solid #000)? It might have to do with the fact that the page is showing native widgets instead of styled ones. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Don't use onclick
RobG wrote: On Oct 13, 1:34 pm, expressodschin...@gmail.com wrote: I don't think it's too hyped. Having calls to javascript in your elements defeats the purpose of unobtrusively maintaining and using libraries like jQuery. The mechanism frequently used to attach such listeners is to add a class, id, name or some other attribute value designed to make the element identifiable specifically to add a listener. How is: div class=mySpecialClass ... hugely different to: div onclick=mySpecialListener() ... when both attributes can be added using exactly the same server logic, static template or whatever? The only difference is that in the first case, the client must do extra work to attach listeners that could have been added on the server directly. Consider also that in the second case, you don't care about a document ready or load event, or whether the user must wait for elements to be enlivened while other content loads. Not hip, not cool or funky, but very robust and avoids a bunch of issues. Adding listeners at the client simply because the chosen development library supports it is not a particularly convincing argument. -- Rob For one, you're usually using that class to style something too (a class=required can be used for validation and for styling the input differently to show the user it's a required field), so you use essentially the same markup to hook in both your presentational layer and your behavioural layer. I've rarely used onclick after discovering the unobtrusive way of doing js, it's easier to maintain and your code looks cleaner. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: My code is not working for rollover
use css rollovers instead jessie wrote: Hi I had it all working and now its not :( My problem now lies with the hovering over my 2 classes ie. .LPButton,.CatMoreBtn its just not hovering! and i'd like to make this work for me so i can have not only png's rollover but, gifs and jpgs but i have no clue where to put the additional code. Any help would be much much appreciated. This is what i have for jquery so far. jQuery(function($) { function getLeaf(url) { var splited=url.split('?');// remove all the parameter from url url=splited[0]; return url.substring(url.lastIndexOf(/)+1);// return file name without domain and path } jQuery.fn.extend({ enter: function() {//plugins creation return this.each(function() { var pth = $(this).find(img)[0]; //alert($(this).children().attr(href)); if($(this).children().attr(href)==getLeaf (document.location.href)){// check that the link url and document url is same $(pth).attr(src,pth.src.replace(/.png/g, '_active.png')); } else{ $(this).hover(function(){ $(pth).attr(src,pth.src.replace(/.png/g, '_active.png'));// mouse over Image },function(){ $(pth).attr(src,pth.src.replace(/_active.png/ g, '.png'));// mouse out image }); } }); } }); $(function(){ // Document is ready $(.LPButton,.CatMoreBtn).enter();// call the function }); $('input[type=image]').hover( function () { $(this).attr(src, $(this).attr(src).split('- off').join('-on')); }, function () { $(this).attr(src, $(this).attr(src).split('- on').join('-off')); } ); }); jQuery(function($) { $(document).pngFix(); }); Jess -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: My code is not working for rollover
This method seems to work with images off while still keeping replacement text (with only minimal extra markup): http://ryanroberts.co.uk/_dev/experiments/accessible-rollovers/index.html Jonathan jessie wrote: I would if there were ways to keep my alt text so users can browse with iimages off. But there is no work around so i have opted to use jquery. So is there a way to make this work using jquery? Thanks Jess On Oct 9, 5:15 pm, Jonathan Vanherpe (T T NV)jonat...@tnt.be wrote: use css rollovers instead jessie wrote: Hi I had it all working and now its not :( My problem now lies with the hovering over my 2 classes ie. .LPButton,.CatMoreBtnits just not hovering! and i'd like to make this work for me so i can have not only png's rollover but, gifs and jpgs but i have no clue where to put the additional code. Any help would be much much appreciated. This is what i have for jquery so far. jQuery(function($) { function getLeaf(url) { var splited=url.split('?');// remove all the parameter from url url=splited[0]; return url.substring(url.lastIndexOf(/)+1);// return file name without domain and path } jQuery.fn.extend({ enter: function() {//plugins creation return this.each(function() { var pth = $(this).find(img)[0]; //alert($(this).children().attr(href)); if($(this).children().attr(href)==getLeaf (document.location.href)){// check that the link url and document url is same $(pth).attr(src,pth.src.replace(/.png/g, '_active.png')); } else{ $(this).hover(function(){ $(pth).attr(src,pth.src.replace(/.png/g, '_active.png'));// mouse over Image },function(){ $(pth).attr(src,pth.src.replace(/_active.png/ g, '.png'));// mouse out image }); } }); } }); $(function(){ // Document is ready $(.LPButton,.CatMoreBtn).enter();// call the function }); $('input[type=image]').hover( function () { $(this).attr(src, $(this).attr(src).split('- off').join('-on')); }, function () { $(this).attr(src, $(this).attr(src).split('- on').join('-off')); } ); }); jQuery(function($) { $(document).pngFix(); }); Jess -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: browser window close
Muhammad Arif wrote: Hello All: I'm trying to close a browser window.. using windows.close().. but its not working... so can you help me. Regards I think it's window.close(), and i think you can only do this in popups. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: browser window close
Muhammad Arif wrote: Thanks you very much for your reply.. but if window.close() so for popup so then how can we close a browser window Regards On Tue, Oct 6, 2009 at 4:08 PM, Jonathan Vanherpe (T T NV) jonat...@tnt.be mailto:jonat...@tnt.be wrote: Muhammad Arif wrote: Hello All: I'm trying to close a browser window.. using windows.close().. but its not working... so can you help me. Regards I think it's window.close(), and i think you can only do this in popups. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be mailto:jonat...@tnt.be Browsers won't allow you to do that. You can only close a window that was created with javascript. Why would you want to close a normal browser window? You'd just be annoying visitors this way. Jonathan -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
[jQuery] Re: format number
Doh...thank you Karl for saving my behind. Parse Int won't work...coffee hadn't kicked in yet. Cheers, - Jonathan On Mon, Oct 5, 2009 at 6:58 PM, Karl Swedberg k...@englishrules.com wrote: On Oct 5, 2009, at 11:43 AM, Jonathan Sharp wrote: You can run a parseint on the number: var myInt = parseInt( '15,000', 10); Cheers, - Jonathan http://jqueryminute.com Oops. that's not such a good idea. It'll return 15. ;-) There are probably much better ways of doing this, but one way is to use a regex replace: var someFormattedNumber = '15,000'; +someFormattedNumber.replace(/\D/g,'') --Karl Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Quick question on image loading
Hi Eric, The browser will replace the image first before loading it. What you can do to preload the image is as follows: var newBackgroundImage = '/new/image/url.png'; $('img /') .attr('src', newBackgroundImage) .bind('load', function() { $('div').css('background-image', 'url(' + newBackgroundImage + ')'); }); This starts by creating a new image element and setting the source of it to the background image which will start loading it in the browser. Then we bind to the image's load event which is triggered when the image has finished loading. In the load callback function you can then set the css background image of your div and the image will already be in the browser's cache and load instantly. Cheers, - Jonathan http://jqueryminute.com On Mon, Oct 5, 2009 at 2:25 AM, Erock ethetenniss...@gmail.com wrote: My question is, if I have one image as the background of a div, and I set the background of that div to another image, will html load the new image before replacing the old one or replace the old image with something ugly (say just plain white) and then load it. The reason I'm asking is, because my site isn't hosted anywhere, it's hard to tell what will happen on a non-local connection when the images actually have to be loaded. Thanks Eric
[jQuery] Re: textContent attribute problem with ie
What are you trying to do? On Mon, Oct 5, 2009 at 11:37 AM, m.ugues m.ug...@gmail.com wrote: HAllo all. This piece of code works fine in FIrefox but does not work in IE. http://pastie.org/642444 The problem is on textContent attribute that in IE is undefined. Any workaround? Kind regards Massimo UGues
[jQuery] Re: How to Add A Callback Function to a plugin
$.fn.myPlugin = function(options) {options $.extend({ callback: null }, options); // Your plugin if ( $.isFunction(options.callback) ) { options.callback.call(); } }; $('div').myPlugin({ callback: function() { // Your callback code } }); A better approach might be to simply have your plugin do a .trigger('pluginevent') which allows for multiple listeners to then use it: $.fn.myPlugin = function() { // Your plugin code $(this).trigger('myplugindidsomething'); }; $('div') .myPlugin() .bind('myplugindidsomething', function() { // Your callback code }); Cheers, - Jonathan http://jqueryminute.com On Mon, Oct 5, 2009 at 3:10 PM, bittermonkey brakes...@gmail.com wrote: How do I add a callback function to a plugin so that i can execute another function after the plugin completes its own processes. Thanks in advance.
[jQuery] Re: Underline links of dynamic HTML introduced in the DOM
SmiThiCo wrote: Hi all, Till now I din not found and an clean solution for my problem. I have a button in my web site underline links that changes all the links and affects its text decoration to 'underline'. From this point all the links of the website should be underline. The problem is that I can only make it work for the current DOM. If I introduce new links into the DOM I need to select them specifically to change its text decoration. Is there something similar to the live function in jquery? For instance for every links introduced in the DOM I want to check if the website is in underline mode. Case its true, the text decoration will be changed! Thanks in advance! SmiThiCo $('body').addClass('underlinelinks'); and style type=text/css .body a { text-decoration: underline; } /style -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Underline links of dynamic HTML introduced in the DOM
SmiThiCo wrote: Hi all, Till now I din not found and an clean solution for my problem. I have a button in my web site underline links that changes all the links and affects its text decoration to 'underline'. From this point all the links of the website should be underline. The problem is that I can only make it work for the current DOM. If I introduce new links into the DOM I need to select them specifically to change its text decoration. Is there something similar to the live function in jquery? For instance for every links introduced in the DOM I want to check if the website is in underline mode. Case its true, the text decoration will be changed! Thanks in advance! SmiThiCo I obviously meant: .underlinelinks a { text-decoration: underline; } -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Underline links of dynamic HTML introduced in the DOM
well, if you don't underline your links, you only really needed to define text-decoration: none once in your css. If you add .underlinelinks before whatever the selector you used for that, it will be overridden in most cases. so your css would be something like: #content a { text-decoration: none; } .underlinelinks #content a { text-decoration: underline; } if you really want to force it, you can use text-decoration: underline !important; , but note that internet explorer 6 doesn't know about !important. Jonathan SmiThiCo wrote: Thanks. I'll give it a try. I didn't tried this before because in the inner divs of the body I sometimes override the text decoration value. So in terms of css priority I not sure if this is going to work. But I'll tell you later. Thanks! On Oct 1, 1:11 pm, Jonathan Vanherpe (T T NV)jonat...@tnt.be wrote: SmiThiCo wrote: Hi all, Till now I din not found and an clean solution for my problem. I have a button in my web site underline links that changes all the links and affects its text decoration to 'underline'. From this point all the links of the website should be underline. The problem is that I can only make it work for the current DOM. If I introduce new links into the DOM I need to select them specifically to change its text decoration. Is there something similar to the live function in jquery? For instance for every links introduced in the DOM I want to check if the website is in underline mode. Case its true, the text decoration will be changed! Thanks in advance! SmiThiCo I obviously meant: .underlinelinks a { text-decoration: underline; } -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: select cannot check checkboxes' states
Xi Shen wrote: hi, i have a group of check boxes, and i want to iterator over all the checked ones. i use the following code, but without luck. $(input[type=checkbox][checked=true]).each(function()...); can someone give a better solution? [checked=checked] ? -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: select cannot check checkboxes' states
tried Sam Doyle's response yet? It looks like that might be the proper way. $(input[type=checkbox]:checked).each(function(){}); Jonathan Xi Shen wrote: tried, not working ;( On Thu, Sep 24, 2009 at 5:03 PM, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: Xi Shen wrote: hi, i have a group of check boxes, and i want to iterator over all the checked ones. i use the following code, but without luck. $(input[type=checkbox][checked=true]).each(function()...); can someone give a better solution? [checked=checked] ? -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Get rid of long-running script dialog box ?
Machin Pouet wrote: Hello all, I'd like to know if you have a way to disable the long-running script dialog boxes, as one can see many in this article : http://www.nczonline.net/blog/2009/01/05/what-determines-that-a-script-is-long-running/ I can hardly split my processing into smaller chunks, and cannot ask clients to tweak their browsers or registry ! I hope my call for help is in the right section, shouldn't it be the case, I apologize, but would appreciate any link to a potential solution. Looking forward to hear back from you, sincerely, S. From the article you linked: Brendan Eich, creator of JavaScript, is quoted as saying, [JavaScript] that executes in whole seconds is probably doing something wrong... And who are we do argue with him? You're probably using javascript for something you shouldn't use it for, or you have some kind of infinite loop. Could you give us an idea as to what exactly you're doing? Jonathan -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
[jQuery] Re: unsibscribe without google account
Christof Donat wrote: Hi, I'm trying to unsubscribe from this mailinglist and from the developer mailinglist. It seems, that I need a google account for that. Actually I wasn't planing to create a new account just to unsubscribe from two mailinglists. Is there another way? Christof just send a blank e-mail to: jquery-en+unsubscr...@googlegroups.com Google doesn't make it easy to find this method, but it should work. (the only place you can find it is in the e-mail headers, afaik) List-Id: jquery-en.googlegroups.com List-Post: mailto:jquery-en@googlegroups.com List-Help: mailto:jquery-en+h...@googlegroups.com List-Unsubscribe: http://googlegroups.com/group/jquery-en/subscribe, mailto:jquery-en+unsubscr...@googlegroups.com If I don't hear from you I'll assume it worked, i haven't tried unsubscribing yet myself. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: AJAX: Display raw XML Document
The REST service requires custom authorization headers, parameters and various methods (GET, PUT, POST, and DELETE) which is why I can't just pass a URL. The earlier solution was better for this. On Sep 17, 5:33 am, DBJDBJ dbj...@gmail.com wrote: var myRESTurl = ... ; $.ajax({ ... complete: function(xhr, status) { alert(OK!); $( document.body ).append(iframe src=' + myRESTurl + ' /iframe) ; } ... }) ; Since you are testing REST end point reply, which returns text/xml mime type, you can assign it to IFRAME src. In all browsers this will show nicely formated and coloured xml. Above is the core solution. One can style the iframe, re-use one iframe, find some jquery iframe plugin, etc ... PS: this is easier solution than using dreaded window.open()
[jQuery] Re: AJAX: Display raw XML Document
I still can't find a solution to simply print out the XML response from an AJAX call. I'm surprised jQuery can't handle something that simple, as it can otherwise do so much. The other js libraries don't seem to have a problem with it, it looks like jQuery just isn't up to the task, and I can't use it for this project. Disappointed. On Sep 14, 11:53 pm, Jonathan jonandke...@gmail.com wrote: I'm re-writing a test page for a RESTful web service with AJAX, and need to be able to display the XML or JSON response in a textarea or a div. I'm re-writing the web page to work off jQuery, but I'm stuck here. The best response I can get is: [Object XMLDocument] I have to set a custom Authorization header, set an HTTP method (get, put, post, or delete), send data, and display the raw XML (or JSON, depending on the request) response in the page. With firebug I see the XML response is there, but I can't figure out how to display that raw XML with jQuery. It worked with the prototype js, but I'm stumped trying to get it to work with jQuery. It seems like a simple enough task, the XML is there, I want to print it out on the page. I've spent hours searching through the jQuery docs and online examples to no avail. Any ideas?
[jQuery] Re: AJAX: Display raw XML Document
That did it. I was using success which did not provide access to the xml as a string I could output, but complete works great. Thanks! Now I cane easily get the text, the HTTP Response code. On Sep 16, 1:32 pm, Mike Alsup mal...@gmail.com wrote: I still can't find a solution to simply print out the XML response from an AJAX call. I'm surprised jQuery can't handle something that simple, as it can otherwise do so much. The other js libraries don't seem to have a problem with it, it looks like jQuery just isn't up to the task, and I can't use it for this project. Try hooking the 'complete' callback and access the responseText property of the XHR: $.ajax({ ... complete: function(xhr, status) { alert(xhr.responseText); } });
[jQuery] AJAX: Display raw XML Document
I'm re-writing a test page for a RESTful web service with AJAX, and need to be able to display the XML or JSON response in a textarea or a div. I'm re-writing the web page to work off jQuery, but I'm stuck here. The best response I can get is: [Object XMLDocument] I have to set a custom Authorization header, set an HTTP method (get, put, post, or delete), send data, and display the raw XML (or JSON, depending on the request) response in the page. With firebug I see the XML response is there, but I can't figure out how to display that raw XML with jQuery. It worked with the prototype js, but I'm stumped trying to get it to work with jQuery. It seems like a simple enough task, the XML is there, I want to print it out on the page. I've spent hours searching through the jQuery docs and online examples to no avail. Any ideas?
[jQuery] Re: each() needs documentation
Did you really look for it? It's like the 2nd or 3rd link under Core. http://docs.jquery.com/Core/each#callback On Sep 14, 6:53 am, Jānis eye...@gmail.com wrote: Hello! I could not find each() in jQuery's documentation. Could it be included there, please, as I was browsing all the features to find out what exactly is the collection of elements returned by the many JQuery functions and how to be able to access and manage each of them separately, but could not find a page for each anywhere (which I found on some tutorial later). Regards, Janis
[jQuery] Re: JCarouselLite - pause scrolling
Steffan A. Cline wrote: on 8/28/09 5:37 PM, Steffan Cline at stef...@hldns.com wrote: I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Anyone? Thanks Steffan The plain jcarousel has this option: http://sorgalla.com/projects/jcarousel/examples/static_auto.html Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Using jQuery to see if CSS is disabled.
mumbojumbo wrote: Hello All, I'm trying to code a site using progressive enhancement methods. It's built upon standards-compliant CSS and HTML and JS. I'm using jQuery on the site to animate some elements on hover etc. Now, when CSS and JS is disabled, it's all good. But, If CSS is disabled and JS is still enabled, the js still manipulates the elements and it's not what I want. I was wondering if anybody knew anything about this. I can't seem to find anything about this... I guess you could try to look at a known css property of a known element (let's say the background-image property of the element containing your sites logo or something even more generic) and check if that has the value you expect. I haven't tried anything like that, though. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Preventing browser scrollbars from bumping content in slideDown()
Say I have a site that's centered on the page, and do $ (#some_content).slideDown(). If the appearance of the new content means that the page no longer fits in the browser window, scrollbars will appear, and so the available page width decreases slightly, and so my centered content jumps left while it's sliding down. Is there a decent workaround for this? Best I can figure out at the moment is to persuade the browser to always display scrollbars, which isn't exactly ideal.
[jQuery] Re: Unsubscribe
amuhlou wrote: oh, looks like there's also an Unsubscribe button on that same Edit my Membership page. Have you tried that? On Sep 1, 8:52 pm, Peter Stulzer pstul...@mac.com wrote: Thank you amuhlou. That's what I tried first but I still get all the mails. Is there another way to unsubscribe or can some moderator just kick me out of all the jQuery groups I'm in right now maybe? Thanks for any help. Peter Von meinem iPhone gesendet Am 01.09.2009 um 22:44 schrieb amuhlou amysch...@gmail.com: On the right side of the page, choose Edit my Membership There, you will be able to choose the No Email option. On Sep 1, 4:52 pm, Peter Stulzer pstul...@mac.com wrote: send an e-mail to jquery-en+unsubscr...@googlegroups.com -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Https mixed content error with ajax
Watch the 'net' tab in Firebug, make sure everything that pops up there is https:// . If everything /is/ https:// , post the url here (either of your site or just a limited test case). Jonathan UglySkinnyGuy wrote: Yes thats all fine. Like I said it only occures when I make an ajax call out and then inject the returned html into the DOM. On Aug 31, 3:44 pm, James james.gp@gmail.com wrote: Is the include script to the jQuery library also HTTPs? All external content (CSS, Scripts, Images) has to be over HTTPs to not create the mixed content error. On Aug 31, 5:10 am, UglySkinnyGuy evan.e.free...@gmail.com wrote: Have a wierd issue. It seems that if I use jquery in https and do an ajax call out and then update the dom with the resulting html I get an HTTPS unsecure content warning. Now the content is all https and there are not http calls any where so I'm wondering if this has been seen before. I've dug very deep looking for the issus and if I take jquery out of the equation it doesn't give me an error. But I've standardized jquery as part of the site and don't want to mix straight old javascript with jquery, if I can avoid it. So any help would be useful.- Hide quoted text - - Show quoted text - -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Jquery at Sears
Erik Reppen wrote: I should specify. It's not the little guy in the upper left although it might be worth plugging it into that. It's all the silly ones down below. On Aug 31, 11:58 pm, Erik Reppen erik.rep...@gmail.com wrote: What do you guys think of my precious. I'm not sure how many other elastic carousels there are out there, but I'm pretty proud of the auto-margin action. Please don't judge us (the FEDs at Sears) on the HTML. We don't actually have full control of the front end. It can scroll full pages but doesn't for other reasons that relate to not having full control of the front end among other things. I really liked the whole options hash thing from JQ in action so it's actually got a few options like switching to vertical for the carousel in our shopping whose item height is currently misaligned for other reasons that relate to not having full control of the front end. ;) Anyway I'm contemplating making a more generic and diversely featured one eventually and hope to start contributing when I have time. http://www.sears.com/shc/s/p_10153_12605_05775819000P?mv=rr aww, you guys fixed the bug where you could change the breadcrumbs displayed on the site just by changing the GET params. Too bad, that was a fun feature ;). The carousel seems to work pretty well, I'm sure it would be welcome if you turned it into a plugin and uploaded it somewhere. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Display DIVs as Multiple Columns
S2 wrote: How can I display a bunch of DIVs in multiple columns? Like Flex's TileList component. A B C C E F G A B C D E F G A B C D E F G You could use float: left;width: 33%; in the stylesheet. No need to use javascript for that (as long as your divs have a fixed height). Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: trouble with 'url' in $.ajax
It's kinda hard to tell without seeing the site, but I think you could try finding out which url gets loaded and what response you get by using something like Fiddler ( http://www.fiddlertool.com/ ) or Wireshark ( http://www.wireshark.org/ ). Chrome also has a built-in debug thing, I believe. Jonathan ch2450 wrote: Hi everybody, I recently updated my website with url rewriting. What I did was change the htaccess file so that every url is redirected to an index.php file, which then parts this url ($_SERVER ['REQUEST_URI']) and 'include()' the corresponding files. Since then, I've had several problems with absolute and relative paths throughout the whole website, so I hardcoded every url and src tag inside the code using the absolute path http://www.mysite.com/path/to/file (instead of path/to/file/). This has been working fine for every browser running on a Mac (Safari and Firefox) and for Firefox on PC. I didn't have the same luck with Chrome, Safari (PC) and IE for which everything seems to work fine except the ajax requests. After several days of testing, I am 95 percent sure that the problem comes from the url's used by the $.ajax requests. Although I wrote the absolute path for all of them (http:// www.mysite.com/path/to/file.php), the above-mentioned browsers don't seem to find them. Any idea what the problem could be ? Any tips on how I could manage the absolute/relative path problem better (for php and js) ? Thank you for your help. Best, -Clem. Here is the entire content of my htaccess file : IfModule mod_rewrite.c Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ index.php /IfModule I use Dreamhost, if this is of any help. -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Animation Vapour Trails
https://bugzilla.mozilla.org/ https://bugs.webkit.org/ Leonard Martin wrote: Can someone point me to where I might log a bug with Gecko or Webkit? I'm fairly new to this whole process. Thanks again. On Aug 20, 3:41 pm, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: I see the same thing on Ubuntu, so I guess it's some bug that's both in Gecko and Webkit (I see it in Firefox and in Chromium, not in Opera). There's slight differences between the way the artifacts are shown in both browsers. Your best bet might be to try and get in touch with somebody that's working on either Webkit or Mozilla through IRC or something. Jonathan Liam Potter wrote: Might have something to do with cleartype? Leonard Martin wrote: -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Animation Vapour Trails
I see the same thing on Ubuntu, so I guess it's some bug that's both in Gecko and Webkit (I see it in Firefox and in Chromium, not in Opera). There's slight differences between the way the artifacts are shown in both browsers. Your best bet might be to try and get in touch with somebody that's working on either Webkit or Mozilla through IRC or something. Jonathan Liam Potter wrote: Might have something to do with cleartype? Leonard Martin wrote: Apologies, I missed the link: http://in.tellig.net/jquery.animateparam/jquery.animateparam.js and http://in.tellig.net/jquery.animateparam/ for an example. On Aug 19, 2:08 pm, Leonard Martin leonard.mar...@gmail.com wrote: I've been trying to write an extension to the animate function to allow the animation of elements along a parameterised path (in the original motivation this was around the diameter of a circle) whilst keeping use of things like $.easing and $().stop(). I've managed to put something together that seems to work, except that in the basic example I have one of the animated elements leaves a trail behind it as it moves it certain browsers. It seems to work fine in IE6 and Opera(Win) but leaves a trail in FF 3.5.2, Chrome 2.0.172.40 and Safari 4.02. I'm assuming it's a rendering engine bug, but it's something I've never come across before, so if anyone has any sage advice about how to deal with it, or has any other feedback on the plugin in general then I'd be interested to hear. -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: jquery license - what do my company have to do
Antoine Blanchard wrote: Hi everyone, For the latest project I have lead (which is a java web project) I have included some jquery,jqueryui and 1 or 2 jquery plugins, knowing that the MIT license allow us to use it even for commercial use. Now that the v1 is almost done. We are wondering what exactly we have to do to be legal. MIT license says: on the condition that the license is distributed with that software. what does that mean exactly? Do we need to write a line in our docu saying: use jquery,..., which is under MIT license? Do we have to write on the pages with our copyright that we use jquery with the little ©? Do we have to do something else? Thanks for the explanations. Antoine if you leave the comment on top of your js file intact, you'll be fine. -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Hide function in IE
By IE, I think he means IE6. I haven't tested this, but I think IE7 and up can do this fine, as long as you make sure you're applying any png hacks you're using to IE6 only with conditional comments. I could be wrong on this, though. Jonathan pmni wrote: Thank you for the explain. On 18 Ago, 08:58, Liam Potter radioactiv...@gmail.com wrote: IE cannot animate the opacity of a png with alpha transparency and there is no solution to this. pmni wrote: Hi. I'm building a website, and use your framework to hide/show a div. This work, but in IE when click to hide/show the div, the background became black, instead to maintaine the image with alpha properties... In Firefox, Opera and Chrome works fine. Why this append? Thanks in advance, pmni- Ocultar texto citado - - Mostrar texto citado - -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Hide function in IE
That sucks, I didn't know that. I was under the impression that they had fixed IE's png support with IE7, but I guess it shouldn't surprise me their 'fix' is buggy. Jonathan Liam Potter wrote: Nope, all versions of IE cannot animate the opacity of a PNG without the black artifact, regardless of any hacks that are applied. It's really quite annoying. Jonathan Vanherpe (T T NV) wrote: By IE, I think he means IE6. I haven't tested this, but I think IE7 and up can do this fine, as long as you make sure you're applying any png hacks you're using to IE6 only with conditional comments. I could be wrong on this, though. Jonathan pmni wrote: Thank you for the explain. On 18 Ago, 08:58, Liam Potter radioactiv...@gmail.com wrote: -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Hover function issue
Geir wrote: Hi! ..rather new to javascript I'm making a rollover-script for my site. It works fine for one image, but not for many. How can I modify it to supprt any number of images? var sti = $('.ro').attr('src'); var nySti = sti.replace('.png', '_ov.png') $('.ro').hover(function() {$(this).attr('src', nySti)}, function() {$(this).attr('src', sti)} ); for image.png class=ro hoverstate is image_ov.png Thanks! You can do rollovers with just css, which might be a better solution. An example is here: http://ago.tanfa.co.uk/css/examples/rollover-images-no-preload.html (or just google for 'css rollover', and you'll find tons of variations) Jonathan
[jQuery] Re: How to Get Retuned GeoLocation
Bluesapphire wrote: Hi! Iam using following JQuery Code: /***/ script type=text/javascript jQuery(document).ready(function(){ jQuery.post( 'http://api.hostip.info/country.php' ,{ ip: '12.215.42.19' ,position : true } ,function(response){ alert(response.Country); } ,'json'); /* jQuery.post(http://api.hostip.info/country.php;, function(data){ alert(Data Loaded: + data); }); */ }); /script /***/ But Ima unable to get response from the link. When 'http:// api.hostip.info/country.php' is typed in browser's address bar, it show location correctly, but in above jquery code it doesn't show anything. Can some one guide me, what Iam doing wrong. Thanks in advance. You can't use xmlHTTPRequest across domains (it's a security thing). So you need to cache this result on your server before you can get to it with javascript. (there is a way to use json across domains though, apparently: http://docs.jquery.com/Release:jQuery_1.2/Ajax#Cross-Domain_getJSON_.28using_JSONP.29 but I don't think you can do a POST like you're doing) Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Checkbox behaviour
You'll have to run the whole function block within $(#show_resolve).click() on load (ie. put it somewhere in $(document).ready(function(){}). Make it a seperate function so you can avoid copy/pasting the whole thing Jonathan Samuurai wrote: Hi, This is my first little foray into JQuery, so far i'm impressed, having had very little JS experience, I was able to create the result I wanted very qucikly and easily! However, I'm having one little niggle... Here's my code: [code] $(document).ready(function(){ $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); $(#show_resolve).click(function () { if ($(#show_resolve).is(:checked)) { $(.submit_problem_form_right).css(visibility,visible); $(#left_submit).css(visibility,hidden); } else { $(.submit_problem_form_right).css(visibility,hidden); $(#left_submit).css(visibility,visible); } }); }); [/code] This works fine.. ticking the checkbox shows and hides the div. However, if I check the checkbox and refresh the page, the checkbox remains ticked, but the div is hidden. Any ideas how I can make it work reliably? -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: jQuery and window.print
Not really, You pretty much have to tell users to enable the 'print backgrounds' feature in their browser. Jonathan Mazi wrote: Thanks a lot Tomas. I'm trying to test it out. One question: in my page I have a css that refer for some elements to soma images. When I use the window.print function I lose all the background-images. Is there e way to print them all? Kind regards MAx On Aug 3, 11:32 am, Tomáš Kavalek tomas.kava...@gmail.com wrote: I don't know how to do it in jQuery, but it's simple in CSS. You can transform it to jQuery, using .css(). Insert at the begin of document content: div id=printheadYour header for printing/div Insert at the end of document content: div id=printfootYour footer for printing/div Create this styles with media=screen: #printhead { display: none; } #printfoot { display: none; } Create this styles with media=print: #printhead { display: block; position: fixed; text-align: center; top: 0px; left: 0px; width: 100%; border-bottom: 1px solid #00; } #printfoot { margin-top: 25px; width: 100%; text-align: right; } This example show you, how to print header on each page and footer on last page. You can modify CSS for print both on each page. Hope it's help. On 3 srp, 11:16, m.ugues m.ug...@gmail.com wrote: Hallo all. I need to enhance the window.print function adding an header and a footer to the page. Is there any way or suggestion to achieve this goal? Kind regards Max -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] input fields and change
Is there some better way than change() to check if an input field's content has changed? As you all probably know, change() only fires when you remove the focus from the input field, but I want to trigger an event every time the content of an input field changes either by typing something, using crtl-v, pasting from the selection buffer (middle click on *nix), or rightclicking and selecting 'paste'. Is there an existing solution for that, or will I need to write something that just checks the field periodically using setInterval()? Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: input fields and change
Jonathan Vanherpe (T T NV) wrote: Is there some better way than change() to check if an input field's content has changed? As you all probably know, change() only fires when you remove the focus from the input field, but I want to trigger an event every time the content of an input field changes either by typing something, using crtl-v, pasting from the selection buffer (middle click on *nix), or rightclicking and selecting 'paste'. Is there an existing solution for that, or will I need to write something that just checks the field periodically using setInterval()? Jonathan Found the answer myself here: http://furrybrains.com/tag/jquery/ works like a charm (with a small modification) Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Does jquery have a plugin to do this?
paulswansea wrote: Hi, I'm looking for a jquery plugin that does the 'rays' effect on http://scripty2.com/ i've had a look, but can't seem to find anything, I was wondering if anyone had come across something like this before? Looking at the generated code, it's an svg which is being transformed by changing the values in rotate(). svg width=700 height=700defsradialgradient id=raphael-gradient-0stop offset=0% stop-color=#9ed356/stop offset=100% stop-color=#97be63 stop-opacity=0//radialgradient/defspath fill=url(#raphael-gradient-0) stroke=none style=opacity: 1; opacity=1 fill-opacity=1 d=M350.000 350.000 L350.000 350.000 L700.000 350.000 L694.683 289.223 L350.000 350.000 L678.892 230.293 L653.109 175.000 L350.000 350.000 L618.116 125.024 L574.976 81.884 L350.000 350.000 L525.000 46.891 L469.707 21.108 L350.000 350.000 L410.777 5.317 L350.000 0.000 L350.000 350.000 L289.223 5.317 L230.293 21.108 L350.000 350.000 L175.000 46.891 L125.024 81.884 L350.000 350.000 L81.884 125.024 L46.891 175.000 L350.000 350.000 L21.108 230.293 L5.317 289.223 L350.000 350.000 L0.000 350.000 L5.317 410.777 L350.000 350.000 L21.108 469.707 L46.891 525.000 L350.000 350.000 L81.884 574.976 L125.024 618.116 L350.000 350.000 L175.000 653.109 L230.293 678.892 L350.000 350.000 L289.223 694.683 L350.000 700.000 L350.000 350.000 L410.777 694.683 L469.707 678.892 L350.000 350.000 L525.000 653.109 L574.976 618.116 L350.000 350.000 L618.116 574.976 L653.109 525.000 L350.000 350.000 L678.892 469.707 L694.683 410.777 Z transform=rotate(499.793, 350, 350)//svg So the only thing you really need js for is the animation, which you can easily do without even using a framework. Keep in mind that this thing probably only works in the most recent versions of Safari , Chrome and Firefox Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Does jquery have a plugin to do this?
Yeah, I noticed. pretty neat. Liam Potter wrote: works in IE as well, using rvml instead of svg. Jonathan Vanherpe (T T NV) wrote: paulswansea wrote: Hi, I'm looking for a jquery plugin that does the 'rays' effect on http://scripty2.com/ i've had a look, but can't seem to find anything, I was wondering if anyone had come across something like this before? Looking at the generated code, it's an svg which is being transformed by changing the values in rotate(). svg width=700 height=700defsradialgradient id=raphael-gradient-0stop offset=0% stop-color=#9ed356/stop offset=100% stop-color=#97be63 stop-opacity=0//radialgradient/defspath fill=url(#raphael-gradient-0) stroke=none style=opacity: 1; opacity=1 fill-opacity=1 d=M350.000 350.000 L350.000 350.000 L700.000 350.000 L694.683 289.223 L350.000 350.000 L678.892 230.293 L653.109 175.000 L350.000 350.000 L618.116 125.024 L574.976 81.884 L350.000 350.000 L525.000 46.891 L469.707 21.108 L350.000 350.000 L410.777 5.317 L350.000 0.000 L350.000 350.000 L289.223 5.317 L230.293 21.108 L350.000 350.000 L175.000 46.891 L125.024 81.884 L350.000 350.000 L81.884 125.024 L46.891 175.000 L350.000 350.000 L21.108 230.293 L5.317 289.223 L350.000 350.000 L0.000 350.000 L5.317 410.777 L350.000 350.000 L21.108 469.707 L46.891 525.000 L350.000 350.000 L81.884 574.976 L125.024 618.116 L350.000 350.000 L175.000 653.109 L230.293 678.892 L350.000 350.000 L289.223 694.683 L350.000 700.000 L350.000 350.000 L410.777 694.683 L469.707 678.892 L350.000 350.000 L525.000 653.109 L574.976 618.116 L350.000 350.000 L618.116 574.976 L653.109 525.000 L350.000 350.000 L678.892 469.707 L694.683 410.777 Z transform=rotate(499.793, 350, 350)//svg So the only thing you really need js for is the animation, which you can easily do without even using a framework. Keep in mind that this thing probably only works in the most recent versions of Safari , Chrome and Firefox Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: error jquery-1.3.2.js(line 3633)
Sorry, I didn't see your reply, this list is pretty high-traffic. I tried it, but it doesn't give me an error. The POST returns a 200 OK. What I do notice is that after I click the button, I get a page reload, so I think you need to put a 'return false;' in there somewhere to stop the form from getting submitted. It's also a nice idea to use submit() instead of click(), to catch people that use keyboard shortcuts and the like. so use: $(form#myform).submit(function()... instead of $(button).click(function()... Jonathan Mark wrote: Can anybody find anything what i did wrong? the only code that is not commented out in the handler.php is ?php print_r($_POST); ? To show me what kind of values it gets and how it looks in an array so i can make an associative of it. On Jul 7, 3:01 pm, Mark johanns.m...@gmail.com wrote: http://webserver.c4v.nl/mark/agenda%20nieuw/agenda.php for the main filehttp://webserver.c4v.nl/mark/agenda%20nieuw/handler.php for the handlerhttp://webserver.c4v.nl/mark/agenda%20nieuw/agenda.css for the csshttp://webserver.c4v.nl/mark/agenda%20nieuw/jquery-1.3.2.js for the java sript librarie You can see all the files here and test what is going wrong. (the notes u see in the handler.php are in dutch made for my internship boss so hecan easy can see what i have done but he hasnt time to help me time = money:s ) On Jul 7, 10:09 am, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: Mark wrote: Are you sure 'handler.php' exists? 'POST' isn't typically an error, unless the server returns a 404 or internal server error (500), in which case Firebug will show it in red. It would be nice if you uploaded your stuff somewhere (preferably reduced as a testcase). Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: error jquery-1.3.2.js(line 3633)
This should stop the form from submitting (untested): $(f...@myform).submit(function() { $.post('handler.php', { jaar:$('#jaar').val(), maand:$('#maand').val(), week:$('#week').val() }//, //do_something(data) ); return false; }); Jonathan Mark wrote: I used $(document).ready(function() { $(from#myfrom).submit(function() { now it doesn't give an error anymore so far i can see. So now only try to figure out how to post the value's with out the reload and then im going to make a callback to a new div and print the php array thereso i can go on form there Thank you for your help so far now only hope and pray it will work On Jul 8, 9:56 am, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: Sorry, I didn't see your reply, this list is pretty high-traffic. I tried it, but it doesn't give me an error. The POST returns a 200 OK. What I do notice is that after I click the button, I get a page reload, so I think you need to put a 'return false;' in there somewhere to stop the form from getting submitted. It's also a nice idea to use submit() instead of click(), to catch people that use keyboard shortcuts and the like. so use: $(form#myform).submit(function()... instead of $(button).click(function()... Jonathan Mark wrote: Can anybody find anything what i did wrong? the only code that is not commented out in the handler.php is ?php print_r($_POST); ? To show me what kind of values it gets and how it looks in an array so i can make an associative of it. On Jul 7, 3:01 pm, Mark johanns.m...@gmail.com wrote: -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: jCarousel Appears Vertical then Horizontal
Sparky12 wrote: Btw - the problem is the li items are aligned vertically by default and then after applying the jCarousel script they become aligned horizontally ? Any way to resolve this ? Try editing the css so the container div has overflow: hidden and a fixed width/height. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: error jquery-1.3.2.js(line 3633)
Mark wrote: I have 3 drop down menu's where is post the value's bij a button.click (see code below). But when i push the button i see an error in fire bug POST http://localhost/agenda nieuw/handler.php 67ms jquery-1.3.2.js(line 3633) I looked online for awnsers but couldn't find any. Maybe you guys can help me. Here is my js code. Are you sure 'handler.php' exists? 'POST' isn't typically an error, unless the server returns a 404 or internal server error (500), in which case Firebug will show it in red. It would be nice if you uploaded your stuff somewhere (preferably reduced as a testcase). Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Weird jumping happening with hover-over
I just use a bunch of virtual machines in Virtualbox. I find that running IE in wine like you are doing has issues. And IE is basically the only browser I test multiple versions from. For all others I just test the latest one. Jonathan osu wrote: Hi John, Thanks for doing that, much appreciated. I think it was a glitch at work - seems to be working everywhere else (I develop on a Mac, so Safari 3/4, FF 2/3 and Internet Explorer 6 using ie4osx). Is there an easy way to check all browsers at once? I'm finding it a real pain trying to keep track of all browsers. Thanks, osu On Jun 29, 10:57 am, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: osuwrote: Hi, Could someone take a look at this website I developed and let me know what's going on with the footer logos please? It seems to happen on all browsers on my computer at work (Mac and PC) that the logos jump about when you hover over them: http://www.water4lifeconference.co.uk/ It's not happening on my system at home, but can someone confirm whether it's happening on their as well? Anyone know how I can stop it if so? Thanks, osu Seems fine in all browsers I tried (Firefox 3, 3.5, Opera 10, Chromium daily, IE7 and IE8 on Linux and Windows) with the exception of IE6, where (part of?) the custom title seems to be positioned under the body, causing the scrollbar to move a bit, but that's hardly noticeable. It would be nice if you told us which versions of which browsers you're using on what platforms if the issue is something other than what I'm seeing in IE6. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Get dynamic width
eewan wrote: Hello, I want to find full width of all elements in one div. Here is example code: div id=scroller ptext/p ptext/p ptext/p ptext/p /div $(#scroller p).each( function(i){ var elSize = $(this).width();}); I need total width of all p :-) Thanks in advance The following seems to work for me: var elSize = 0; $(#scroller p).each( function(i){ elSize+=$(this).width();}); console.log(elSize); Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: ui.jquery.com down?
Vorge wrote: Is the UI section of the site down? I have a few websites that link to it and they're all taking forever to load, seemingly hanging when waiting for ui.jquery.com... This is the first time I've seen this and am wondering if anyone else is aware of the problem. Thanks, Vorge This is on of the reasons why loading scripts from an external server is usually a bad idea. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] removing submitHandler
I have 4 buttons in a form. Save, Back, Submit, Confirm. The submit does form validation and has a submitHandler and invalidHandler. If no errors, a modal Confirm screen is shown with another button of Confirm. This button does the actual post to the form to complete the process. The Save and Back buttons need to post the form, but does not have any validation. The problem is that if I hit Submit and my Confirm modal pops up and I cancel out the Save and Cancel button now inherit the submitHandler and invalidHandler of the Submit button. So if i click on save of back, the Confirm modal pops up. Ideally, I would like to remove the Handler's if the Save or Back button are clicked. I've tried unbinding the form and submitting it myself, but the Modal window still pops up. I have a working example I can give out individually if required. Here is my JS: [code] script type=text/javascript $(document).ready(function() { $(window).keydown(function(event){ document.getElementById('save').src = /bttn- save.jpg; }); var errorimage = img src=\error.png\ width=\19\ height=\19\ alt=\error\ title=\error\ style=\vertical- align:top;margin-top:5px;\ /; $('#submit').click(function(e) { $('#promoForm').validate({ submitHandler: function() { tb_show(, #TB_inline? height=400width=600inlineId=confirmblock, null); }, invalidHandler: function(e, validator) { var errors = validator.numberOfInvalids(); if (errors) { tb_show(, #TB_inline? height=150width=250inlineId=errorblock, null); } }, errorElement: span, rules: { additionalinfo: required }, messages: { additionalinfo: errorimage } }); document.getElementById('td_info').innerHTML = document.getElementById('additionalinfo').value; }); $('#back').click(function() { $(#promoForm).attr(action, step6/? action=backemail=%%=RequestParameter(email)=%%); }); $('#save').click(function() { $(#promoForm).attr(action, /step7/? action=saveemail=%%=RequestParameter(email)=%%); }); $('#confirm').click(function() { document.getElementById('promoForm').action = / thatsit/?email=%%=RequestParameter(email)=%% document.getElementById('promoForm').submit(); }); $('#attach').click(function() { tb_show(, #TB_inline? height=300width=336inlineId=uploadblock, null); }); }); /script [/code]
[jQuery] input validation
is there a way to prevent user from adding more characters into a text input based on a validation rule(eg. you entered more than n words, you can't enter more, but you can delete or edit)? I think I'll have to programmatically delete the extra letter(s) that user just input somehow if the addition causes a violation of the rule, is this the best way? thanks
[jQuery] class inheritance
var A=function(){ }; $.extend(A.prototype, { init:function(){ alert('A init'); } }); var B=function(){ }; $.extend(B.prototype,A.prototype,{ init:function(){ alert('B init'); } }); var p=new A(); p.init(); var x=new B(); x.init(); is the above the best way to create class and inheritance in jQuery? In B's init how do I invoke parent's init (similar to super.init() in OO languages)?
[jQuery] copy and paste event
I have a text input box, is there a way to detect a copy and paste event into the box? keyup, focus doesn't really do it. thanks
[jQuery] Re: Weird jumping happening with hover-over
osu wrote: Hi, Could someone take a look at this website I developed and let me know what's going on with the footer logos please? It seems to happen on all browsers on my computer at work (Mac and PC) that the logos jump about when you hover over them: http://www.water4lifeconference.co.uk/ It's not happening on my system at home, but can someone confirm whether it's happening on their as well? Anyone know how I can stop it if so? Thanks, osu Seems fine in all browsers I tried (Firefox 3, 3.5, Opera 10, Chromium daily, IE7 and IE8 on Linux and Windows) with the exception of IE6, where (part of?) the custom title seems to be positioned under the body, causing the scrollbar to move a bit, but that's hardly noticeable. It would be nice if you told us which versions of which browsers you're using on what platforms if the issue is something other than what I'm seeing in IE6. Jonathan
[jQuery] Re: Protect images
I guess you could just put an absolutely positioned div with a 100%x100% transparent gif/png over your image, but it's my opinion that any kind of image protection is useless, and usually easily defeated by just dragging the image out of the cache folder. I personally think it's a waste of time to try to 'protect' media on the internet, as there's always a way of getting it. It's better to just assume that everything you put online will be copied and either turned into a lolcat or a motivational poster. Jonathan Mario Soto wrote: Actually, sorry for not putting a good descrpition. You're right. What I want to do is to make harder for a visitor to get the immage, putting a transparent gif or similar in front of the immage. So, the immage is loaded by ajax, and never has the same address, and cannot download the image by right clicking and select save image. Of course, if can crack a password mostly with patiente, it would not be hard to keep the immage, but, for the average user (mostly my users) want to make as imposible as I can. The immage type I'm dealing with are documents, so it should not be give full access to anyone cappable of right clicking. Thanks. On 25 jun, 11:52, Lee R Lemon III leerlemon...@gmail.com wrote: If by protecting you mean keeping from being downloaded NO... If you want some watermarking, you could use something like php's gd function that could aloow for a watermark... You could also use javascript canvas but that does not work in IE without a plugin On Jun 24, 1:49 pm, Mario Soto canc...@gmail.com wrote: Hi. I want to know if there is a way to protect images that are styled with an overflow auto. I found a lot of tutorials, scripts and plugins for that with static images. The big issue here is that the image can (and is usual) to be resized (two buttons are added for that + and -). Any ideas? Will be vary good recieved. Thanks. -- Mario Soto marios...@cancuen.net ..._ -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: how to ask questions
shaded wrote: its not always practical to post a link. The stuff im working on is offline for now. including database and php files. but thanks for all the tips. You don't always have to post your whole site, you could reduce it to a testcase. Just show the minimal amount of html and javascript that exhibits the problem you have. Chances are you'll find the root of your problem while you're working on the testcase. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: how to ask questions
James wrote: ...post a link to your code, or better yet, a demo page demonstrating the issue. Code does not show up formatted very well on Google groups and the emails it send, so keep it short if you post code here. I totally agree with this. Link to your code, don't leave us guessing. If you just post code, we'd have to paste it into a document ourselves, reformat it because it got garbled, and the figure out what might be the problem. It's understandable that most of us don't bother with that, unless your problem looks really interesting. If you post a link, we can load the page, take a quick look in Firebug, and tell you what the problem was. This list is also pretty high-traffic, which means that nobody will read all messages. Make sure your subject line is a proper summary of your problem. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Protect images
Mario Soto wrote: Hi. I want to know if there is a way to protect images that are styled with an overflow auto. I found a lot of tutorials, scripts and plugins for that with static images. The big issue here is that the image can (and is usual) to be resized (two buttons are added for that + and -). Any ideas? Will be vary good recieved. Thanks. What exactly do you mean by 'protecting'? Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be