Re: [jQuery] Problems with script replacement in Safari
Safari does not let you to inject script files once the page has loaded. A few months ago I found a tricky way to make it possible... not tried... http://lists.apple.com/archives/Webcore-dev/2005/Mar/msg00023.html Good luck and don't forget to tell us the result ; ) 2007/3/28, Brandon Aaron [EMAIL PROTECTED]: Safari improves pretty rapidly and is pretty good about following standards but it is not without its problems. It can be very frustrating sometimes ... especially if you have to support 1.0.3 or even 1.3. -- Brandon Aaron On 3/28/07, Yansky [EMAIL PROTECTED] wrote: Hmm ok, I guess the easiest solution would be to put all the javascript into one file and do the browser sniffing in that file. It's weird - people always complain about IE's bugs, but lately I've had a lot of problems getting things to work in Safari; whereas IE(7) will just work. Brandon Aaron wrote: Last time I tried an ID on a script tag, Safari wouldn't find it. -- Brandon Aaron On 3/28/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: Safari is very weird with script tags! any script tag is assumed to be javascript, and loaded in the beginning and that's it. Try making a new script tag, and inserting it. Safari broke many of my cute tricks! I'd never considered using an id on a script tag, but they are in the dom, so it should work. On 3/28/07, Yansky [EMAIL PROTECTED] wrote: Hi guys, I'm trying to get the following to work in Safari, but it just wont add the script source I can't figure out why. This is my code: head title/title script type=text/javascript src=jquery-latest.js/script script type=text/javascript $(document).ready(function() { if($.browser.msie) { $('#scriptReplace').attr(src,test2-ie.js); } else { $('#scriptReplace').attr(src, test2-mozilla-EtAl.js); } }); /script link rel=stylesheet href=test2.css media=screen,projection type=text/css / script id=scriptReplace type=text/javascript /script /head It works fine in IE, Opera Firefox, yet it wont work in Safari (2.0.4). Does it take longer for Safari's DOM to be ready? Is using an ID to locate the correct script tag the right way to go? Cheers. -- View this message in context: http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9718408 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9722143 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] utf-8 and jquery
Perhaps you can find a solution reading http://php.group.stumbleupon.com/forum/37465/ Good luck! 2007/3/26, Ⓙⓐⓚⓔ [EMAIL PROTECTED]: Jake on duty! Amirca, let's get debugging! I need to see how the data is served and how the page is written and served! On 3/26/07, Karl Swedberg [EMAIL PROTECTED] wrote: Calling Jake! Calling Ⓙⓐⓚⓔ! Come in, ʝǡǩȩ. ᎫᎪᏦᎬ, someone needs your help. :-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Mar 26, 2007, at 8:34 AM, amircx wrote: my db and the page saved as utf-8... its returns me in textfield values of : ××× and wierd chars instad of hebrew letters Michael Fuerst wrote: hey. when im trying to send data to mysql or anything else in forgin language such hebrew its retruns me gibbrish... its a known bug? how can i fix it? i need to use php htmlentitles() ? I would say this debends what you mean with its retruns me gibbrish: The data you get back from your ajax-call is probably utf-8 encoded. But is the data in your database also utf-8 encoded? If not, your're inserting non utf-8 code into an utf-8 encoded document... a php utf8_encode when inserting the data from database into your ajax-result would do the trick in that case... michael ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/utf-8-and-jquery-tf3466629.html#a9672408 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Beginner needs help - Basics
Try this: script type=text/javascript $(document).ready(function(){ $(a).click(function(){ alert(Thanks for visiting!); }); }); /script 2007/1/24, Clodelio C. Delfino [EMAIL PROTECTED]: can't find in your code where a is attached to... c,) On 1/24/07, Johannes Theile [EMAIL PROTECTED] wrote: Hi, I came across jQuery, I thinks I might like it, but I'm unable to try it out. I downloaded the uncompressed version and just cp one of the examples from the Wiki. But nothing happens. I tried it with various browsers on two systems, but nothing works. So I thinks that I'm doing a general mistake. Maybe someone could check the code below. # html head script type=text/javascript src=jquery.js/script script type=text/javascript $(a).click(function(){ alert(Thanks for visiting!); }); /script /head body # Do something! /body /html # jQuery is in the same folder as my html page is. Any help is appreciated. Regards, Johannes -- View this message in context: http://www.nabble.com/Beginner-needs-help---Basics-tf3080171.html#a8557894 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Trivial use
try this: script type=text/javascript $(document).ready(function(){ $(#trigger).click(function(){ $(#content).append('a href= class=testclick does not work/a'); $(.test).click(function(){ alert(yeepee); return false; }); return false; }); }); /script 2007/1/23, Peter Bengtsson [EMAIL PROTECTED]: I don't think it'll work because there is no ELEMENT called .test. 'div class=testclick does not work/div' is treated as a string and isn't converted into the DOM. Consider changing you #trigger.click() to instead create a DOM element and add DOM text to it. Eg. $(#trigger).click(function(){ var div = document.createElement('div'); div.className = 'test'; div.appendChild(document.createTextNode('click does not work')); $(#content).append(div); return false; }); Laurent Goussard wrote: Hi there, I'm trying a very simple (in my opinion) use of jQuery, but I can't figure how I am suppose to make it work. Can someone explain me how enabling the click event on .test even if the .test element is loaded dynamically from script (ajax doesn't work neither) ? - - - - script type=text/javascript $(document).ready(function(){ $(.test).click(function(){ alert(yeepee); }); $(#trigger).click(function(){ $(#content).append('div class=testclick does not work/div'); return false; }); }); /script (...) a href=http://www.site.com/; id=triggerclick/a div id=contentdummy content/div (...) - - - - Thank you, Laurent ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Very long input text value and focus
Hello, I don't know how to do that in JS or in JQuery, here is the problem: Imagine 2 or 3 text fields of a form. A long value text is displayed in each field. The text is too long and when I put a focus on a field I did not see the cursor. How can I automatically display the end of the text when I focus it? Hoping is clear... thanks in advance -- Roberto ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] input type checkbox
I think that it's correct. Have you tried to select checked elements using something like: $([EMAIL PROTECTED]:checked).val(); 2006/12/7, Christian Bach [EMAIL PROTECTED]: Hi, Perhaps I'm doing something wrong, but when using .val() on check boxes they method seems to always return 'on' disregarding the state of the checked attribute. Is this correct behavior? The tests are made with the latest stable release of jQuery and not the svn version. Best regards Christian ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Stop using thickbox!
uhm, all the samples seems not working on the last version of Safari ;) 2006/11/25, Matt Stith [EMAIL PROTECTED]: Theres many reasons why someone would want to use thickbox instead of your plugin. 1. Your plugin uses tables, noone likes tables. 2. Your plugin is slow compared to thickbox 3. Your plugin uses a bunch of things from the Interface library, thickbox only needs jquery. 4. Your plugin is a bit harder to use, with thickbox all you need to do is add a class to the element, and a bit of CSS styling. 5. Tables... ew. On 11/25/06, Webunity | Gilles van den Hoven [EMAIL PROTECTED] wrote: And use my window plugin :) Why? Thickbox was made for images Window plugin was made for popups (dialogs) Just my $0.02 -- Gilles http://gilles.jquery.com/window/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] input field focus help!
Yeah, thanks Klaus ;) 2006/11/17, Klaus Hartl [EMAIL PROTECTED]: Roberto Ortelli schrieb: Hello, A few weeks ago I've written a small plugin for that: $.fn.fieldFocus = function(id){ document.getElementById(id).focus(); } and you call it using: $(document).fieldFocus(the_id_of_the_input_field_without_#); That is exactly the same as if you were doing this: $('#the_id_of_the_input').get(0).focus(); And that's two lines less ;-) -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Prevent form submission when enter is hit with jQuery
Hi all, all is in the title. I've found this resource but it seems not working in FF2.0: http://www.cs.tut.fi/~jkorpela/forms/enter.html Thanks -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Prevent form submission when enter is hit with jQuery
Ah, problem solved. FYI: $(#to).keypress(function(e){ return !(e.keyCode == 13); }); where #to is the ID of a form [EMAIL PROTECTED] field, easy! 2006/11/16, Roberto Ortelli [EMAIL PROTECTED]: Hi all, all is in the title. I've found this resource but it seems not working in FF2.0: http://www.cs.tut.fi/~jkorpela/forms/enter.html Thanks -- Roberto Ortelli http://weblogger.ch -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] input field focus help!
Hello, A few weeks ago I've written a small plugin for that: $.fn.fieldFocus = function(id){ document.getElementById(id).focus(); } and you call it using: $(document).fieldFocus(the_id_of_the_input_field_without_#); 2006/11/17, Clodelio Delfino [EMAIL PROTECTED]: Thanks Erik for the input, got the culprit...when thickbox is used, the modal/dialog box link clicked doesn't fire-up the onload event which is the reason why focus() doesn't work... c,) anyway, i've created a link without using thickbox and just do plain CSS, it now works! Thanks again for the help... cheers, cdelfino -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Erik Beeson Sent: Friday, November 17, 2006 10:36 AM To: jQuery Discussion. Subject: Re: [jQuery] input field focus help! Ahh, right, that is the right code, but it doesn't work in $(document).ready(...). I do it like this: setTimeout(function() {$('#username').get(0).focus();}, 250); Inside $(document).ready(...). Maybe moving it to load or something would work better. Haven't tried yet. --Erik On 11/16/06, Clodelio Delfino [EMAIL PROTECTED] wrote: Thanks Erik for the input but it doesn't work... c,) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Erik Beeson Sent: Friday, November 17, 2006 7:34 AM To: jQuery Discussion. Subject: Re: [jQuery] input field focus help! .focus() does NOT set the focus of an element, it fires all of the registered onfocus events. Use $().get(0).focus(). --Erik On 11/16/06, Clodelio Delfino [EMAIL PROTECTED] wrote: i've downloaded thickbox and tried the login demo, the dialog box work as expected however but when i tried to set an autofocus on the username field, it doesn't work. below is a snippet of the code: default.php has the clickable: a href=login.php?height=200width=300 class=thickbox title=Please LoginClick Login/a login.php is the form with code below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head titleTest Only/title meta http-equiv=content-type content=text/html;charset=utf-8 script type=text/javascript src=./libraries/jquery-latest.pack.js/script script type=text/javascript $(document).ready(function() { /*$(#frmLogin [EMAIL PROTECTED]'frmUsername']).attr('disabled',true)*/ /* just to test that im correctly referencing the correct field */ $(#frmLogin [EMAIL PROTECTED]'frmUsername']).focus() }) /script /head body !-- Section:Content -- div id=divContent form id=frmLogin method=post action=check_credential.php table class=tblForm captionnbsp;/caption tr td class=frmFieldID Number/td td class=frmInputinput name=frmUsername type=text size=20 maxlength=20 //td /tr tr td class=frmFieldPassword/td td class=frmInputinput name=frmPassword type=password size=20 maxlength=20 //td /tr tr tdnbsp;/td td class=frmInput input name=btnLogin type=submit value=Login / /td /tr /table /form /div !-- [Section:Content] -- /body /html Need inputs and thanks in advance cdelfino ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New jQuery Plugin - Star Rating
http://sandbox.wilstuckey.com/jquery-ratings/ Not working on Safari 1.3 (blank page, no error displayed) 2006/11/9, Brandon Aaron [EMAIL PROTECTED]: On 11/8/06, Wil Stuckey [EMAIL PROTECTED] wrote: Ok, I implemented the IE6 background flicker fix. Source has been updated. If it is in the plugin source, I wonder if it is a good idea to include that hack in the plugin. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuery Safari
Hi all, I'm currently developping a huge web app for a swiss private banking using jQuery. I have to be sure that Safari 1.2 is compatible with what I'm doing and I have to be sure that jQuery is full compatible with this version of Safari. I've searched on the blog, google... and no found this information. Any about the browser supported by jQuery, Safari in particular? Thanks -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $.ajax mistake
Hello, strange problem, jQuery can't extract the xml data after an ajax query... see below for the code: my XHTML file contains a simple form: form method=post name=cityForm id=cityForm input type=text name=city id=city size=40 / input type=submit value=Localité id=submit / img src=images/ajax-loader.gif alt=ajax loader id=ajax-loader / /form div id=feedback/div jquery script: script type=text/javascript $(document).ready(function(){ $(#ajax-loader).ajaxStart(function(){ $(#submit).hide(); $(this).show(); }); $(#ajax-loader).ajaxStop(function(){ $(this).hide(); $(#submit).show(); }); $(form).submit(function(){ data = $([EMAIL PROTECTED]).val(); $.ajax({ type: POST, url: find.php, data: localite=+data, dataType: xml, success: function(xml){ result = $(count, xml).text(); $(#feedback).html(result = + result); } }); return false; }); }); /script find.php (just an example to test the code): ?php $xml = resultcount5/count/result; header('Content-type: text/xml'); echo $xml; ? post: localite=test response: resultcount5/count/result headers: Date: Tue, 19 Sep 2006 12:01:52 GMT Server: Apache/1.3.33 (Darwin) PHP/5.1.4 X-Powered-By: PHP/5.1.4 Connection: close Transfer-Encoding: chunked Content-Type: text/xml Any idea? -- Roberto Ortelli http://weblogger.ch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/