[jQuery] Re: Validate Input of type File
Please, anyone? Thanks, Miguel On Sep 7, 10:57 pm, shapper [EMAIL PROTECTED] wrote: Hi, I tried and it is working ... well kind of. I am using FileStyle JQuery plugin to style the file input:http://www.appelsiini.net/projects/filestyle So the generated code (note the error message that is working): label for=PathFicheiro/label input class=file style=display: inline; width: 320px;/ div style=background: transparent url(../../Assets/Image/PT/ FileUpload_Button.jpg) no-repeat scroll right center; overflow: hidden; width: 20px; height: 15px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: - moz-initial; display: inline; position: absolute; input id=Path class= type=file value= name=Path style=position: relative; height: 15px; width: 320px; display: inline; cursor: pointer; opacity: 0; margin-left: -142px;/ label class=Error for=Path generated=trueSelect a document/label /div The error message is in the HTML markup as you can see but it is not visible. Any idea of how to solve this? Thanks, Miguel On Sep 7, 10:48 am, Jörn Zaefferer [EMAIL PROTECTED] wrote: Yes, just check the input value. You could use the validation plugin for that:http://bassistance.de/jquery-plugins/jquery-plugin-validation/ The demo here has two file inputs that get validated:http://jquery.bassistance.de/validate/demo/errorcontainer-demo.html Jörn On Sat, Sep 6, 2008 at 11:39 PM, shapper [EMAIL PROTECTED] wrote: Hello, Is it possible to validate a input of type File? I mean that I would like to test if the user checked a file ... nothing else. Thanks, Miguel
[jQuery] Re: New Website in IE7
By the way it's IE 7.0.6001.18000 if that makes any difference. Simon On Sep 8, 8:59 am, SiCo [EMAIL PROTECTED] wrote: Yes but more specifically any page other than the home page. This is the docs page as rendered in my IE7 on Vista: See:http://www.sico.co.uk/stuff/jquery-website-docs.jpg This happens to the blog and most other pages on the site. Simon On Sep 4, 1:21 pm, MorningZ [EMAIL PROTECTED] wrote: are you speaking ofhttp://jquery.com? both the main site and docs site appear fine to me in IE7 across two computers (Vista and XP)
[jQuery] Re: New Website in IE7
Yes but more specifically any page other than the home page. This is the docs page as rendered in my IE7 on Vista: See: http://www.sico.co.uk/stuff/jquery-website-docs.jpg This happens to the blog and most other pages on the site. Simon On Sep 4, 1:21 pm, MorningZ [EMAIL PROTECTED] wrote: are you speaking ofhttp://jquery.com? both the main site and docs site appear fine to me in IE7 across two computers (Vista and XP)
[jQuery] Re: Superfish
TEST On 6 Sep., 04:11, Joel Birch [EMAIL PROTECTED] wrote: Hi Erick, To reduce the height of the menu, simply reduce the amount of top and bottom padding on the anchor elements. Your text colour problem is a little more complicated to do cross-browser as the CSS cascade makes things tricky. The declaration you need to override is this one: .sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ color: #FFF; } so the first idea would be to add to the selectors for the rule you use to describe the hover styles, like this: .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu li:hover a, sf-menu li.sfHover a, /* --- ADDED THESE*/ .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #FFF; outline: 0; color: #D1001A; } This will override the link's colour, but will probably also affect links in the nested submenu. This could be avoided by using the operator in our new selector, but that wouldn't fix the issue for IE6 unfortunately. So the next thing to do might be to reset the colour for deeper nested links like so: .sf-menu li:hover li a, sf-menu li.sfHover li a { /* --- ADDED AN EXTRA LI */ color: #FFF; } Again, we may run into another problem because this new rule might override the hover styles set above, so the final solution could add an ID selector to each of the link pseudo styles in order to make sure they always get priority. Here is the final proposed solution: /* FINAL CODE: */ .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu li:hover a, sf-menu li.sfHover a, /* --- ADDED THESE*/ #someID .sf-menu a:focus, #someID .sf-menu a:hover, #someID .sf-menu a:active { /* --- ADDED IDs */ background: #FFF; outline: 0; color: #D1001A;} .sf-menu li:hover li a, sf-menu li.sfHover li a { /* --- ADDED AN EXTRA LI */ color: #FFF; } It's hard to be certain what the answer is without being able to test the ideas on your menu so I may have overlooked things, but hopefully this gives you some ideas. Joel Birch.
[jQuery] Re: $.ajax() timeout
Hi Josh, It is not JQuery style. JQuery allows you to handle timeout event by implementing error() callback like this jQuery.ajax({ beforeSend: function(xhr) { // do something such as: set headers }, type: GET, timeout: 5000, url: Pone.buildRestfulUrl(document.getElementById('ajaxCompanyLookup')), dataType: json, success: function(response){ jQuery('#loading').hide(); handleJsonResponse(response); jQuery(#ajaxCompanyLookupButton).removeAttr('disabled'); }, error: displayError }); Now you can define a callback named displayError function displayError(request, errorType, errorThrown) { try { if (errorType == 'timeout') { // do sonething here } catch (e) {} } More natural, right? pcdinh http://groups.google.com/group/phpvietnam On Aug 21, 2:34 am, Josh Nathanson [EMAIL PROTECTED] wrote: timeout is actually how long the request will wait to complete before it sends back atimeouterror. You actually want setTimeout, like so. This will wait five seconds before doing the ajax request. var t = setTimeout( function() { $.ajax({ type: GET, url: myurl.com, beforeSend: function() { $(#adminToolsListingA .scroll).html(); $(#adminToolsListingA .ajaxLoading).show(); }, success: function(html) { $(#adminToolsListingA .ajaxLoading).hide(); $(#adminEditListingA .scroll).html(html); } }); }, 5000 ); -- Josh - Original Message - From: hubbs [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, August 20, 2008 11:25 AM Subject: [jQuery] $.ajax()timeout I seem to not be understanding how the ajaxtimeoutworks, because it does not seem to work how I thought. I was hope it would delay the ajax request, for the number of miliseconds that is specified, but that does not seem to be working. Is thetimeoutused for something different? Or is there a different way to delay an ajax request for a few seconds? Using: $.ajax({ type: GET, timeout: 5000, url: myurl.com, beforeSend: function() { $(#adminToolsListingA .scroll).html(); $(#adminToolsListingA .ajaxLoading).show(); }, success: function(html) { $(#adminToolsListingA .ajaxLoading).hide(); $(#adminEditListingA .scroll).html(html); } });
[jQuery] Re: Superfish
hi joel, first of all .. thank you very much for your replay :-) i changed the css with your solutions but still have problems with the display of the first menu item when hovering over a submenu. unfortunately i am not the big css master, so i do have enormous problems where to fix it. also i dont know where to enter your suggested #someID to get work. for a quick view of my problem i prepared 2 files my html file and my changed css file. just exchange my html file with your example.html file and the CSS with your superfish.css to see the problem. if you cant help either it wont help anyway. thank you anyway Erick ### HTML ### !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / title/title link rel=stylesheet type=text/css href=main.css / link rel=stylesheet type=text/css href=css/superfish.css media=screen script type=text/javascript src=js/jquery-1.2.6.min.js/script script type=text/javascript src=js/hoverIntent.js/script script type=text/javascript src=js/superfish.js/script script type=text/javascript // initialise plugins jQuery(function(){ jQuery('ul.sf-menu').superfish(); }); /script /head body bgcolor=#FF !-- Begin Wrapper -- div id=wrapper !-- Begin Header -- div id=header /div !-- End Header -- !-- Begin Naviagtion -- div id=navigation ul class=sf-menu id=someID li a href=#Home/a /li li class=current a href=# Info/a /li li a href=#About us/a ul lia href=#aaHistory/a/li lia href=#aaPartner/a/li /ul /li /ul /div !-- End Naviagtion -- !-- Begin Content -- div id=contentbr style=clear:left; zukkzkuzku a href=#CONTENT/a /div !-- End Content -- !-- Begin Footer -- div id=footer /div !-- End Footer -- /div !-- End Wrapper -- /body /html ###HTML ### ### CSS ### /*** ESSENTIAL STYLES ***/ .sf-menu, .sf-menu * { margin: 0; padding:0; list-style: none; } .sf-menu { line-height:1.0; } .sf-menu ul { position: absolute; top:-999em; width: 10em; /* left offset of submenus need to match (see below) */ } .sf-menu ul li { width: 100%; font-weight:bold; } .sf-menu li:hover { visibility: inherit; /* fixes IE7 'sticky bug' */ } .sf-menu li { float: left; position: relative; font-weight:bold; } .sf-menu a { display:block; position: relative; } .sf-menu li:hover ul, .sf-menu li.sfHover ul { left: 0; top:2.5em; /* match top ul list item height */ z-index:99; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { top:-999em; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { left: 10em; /* match ul width */ top:0; } ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul { top:-999em; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { left: 10em; /* match ul width */ top:0; } /*** DEMO SKIN ***/ .sf-menu { float: left; margin-bottom: 1em; } .sf-menu a { border-left:0px solid #fff; border-top: 0px solid #FFF; padding:.75em 1em; text-decoration:none; } .sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ color: #FFF; } .sf-menu li { background: #D1001A; } .sf-menu li li { background: #D1001A; } .sf-menu li li li { background: #9AAEDB; } /* FINAL CODE: */ .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu li:hover a, sf-menu li.sfHover a,/* --- ADDED THESE*/ #someID .sf-menu a:focus, #someID .sf-menu a:hover, #someID
[jQuery] Finding elements with some ID
How to find the elements with the id beginning by myID_ and terminated with any number like myID_25789.
[jQuery] Re: How to prevent multiple click sound in IE 6 using jQuery History plugin
Hi Klaus, thanks for replying and pointing out this option. Yes, it would be nice to lose the sound and keep the navigation! Hopefully there may be another way out there :) On Sep 8, 3:12 am, Klaus Hartl [EMAIL PROTECTED] wrote: Although there's a way to supress that sound: http://www.julienlecomte.net/blog/2007/11/30/ you can't have both: By using this trick, you will break the back / forward navigation buttons. Therefore, this trick should only be used for a non-navigational purpose only. --Klaus On Sep 7, 12:25 pm,RobAnderson[EMAIL PROTECTED] wrote: I am hoping someone might be able to help with this problem. I am using thejQueryhistoryplugin and it is working fine, except that in IE 6, I hear the 'start navigation' click sound twice when navigating backwards and forwards between pages. I have got as far as identifying the parts of the plugin code where this is occurring, but do not know enough to stop prevent the annoying double-click sound (it seems to fire once when the age is loaded and again when the hidden iframe is populated). Here is the relevant code segment and I have added two comments indicating where the clicks occur: - load: function(hash) { var newhash; if ($.browser.safari) { newhash = hash; } else { newhash = '#' + hash; // First click heard in IE 6 location.hash = newhash; } this._curHash = newhash; if ($.browser.msie) { var ihistory = $(#jQuery_history)[0]; // TODO: need contentDocument? var iframe = ihistory.contentWindow.document; iframe.open(); iframe.close(); // Second click heard in IE 6 iframe.location.hash = newhash; this._callback(hash); } - I note that the multiple click sounds occur in thejQueryHistorydemo as well, so don't think it is just my implementation. Is there perhaps another way to load the new hsh location into the iframe? Any help much appreciated :) Thanks,Rob
[jQuery] display more than 3 images with thickbox and autoscroll?
hey guys, I been braking my brains for hours trying to figure this one out. I figure how to input images into the jcarousel and to link them to a bigger size one that would display in thickbox. using the thickbox sample... anyways I cant figure out how to make the jcarousel to display more than 3 images and to auto scroll, if anyone know and can tell me what to do, ill really appreciate it =)
[jQuery] How to load JQuery Cycle script first/quicker?
I have made a website (www.outback-encounter.com) where I am using the JQuery cycle code for the rotating images in the header, and the problem is that the images load first and fill up the screen before the javascript function loads which then puts them all together into the slideshow header. You can often see this by going to any new page or reload the existing one. It is not so much a problem in Google Chrome browser since it handles javascript much faster, but standard browsers show the header images all across the screen the first second of the page load quite frequently. I am not sure how I can improve on how the page loads, but would very much appreciate any feedback that could help. I am using the compressed cycle .js file which is only 3.8kb. Thanks for any help you can give!
[jQuery] Re: Determine if a Javascript has loaded?
Mike, Thanks for all of the great explanations. I knew there was probably something severely wrong with my approach to determining if the widget had loaded, but now I think I actually understand some of the WHY. As far as what not loaded successfully means... the iBegin site (the source of the data for the weather widget) was down for most of a day the other day... and so there was a huge gap in the content of the website, since the widget never loaded. I'm looking to find a way to replace where the widget would be with a static image... or even the code for an alternate weather widget... if the iBegin site's widget doesn't respond. Brad posted a completely alternate approach which I'm going to try out... but I'd love to hear your take on it, if you have the time! :D Thanks again, - John On Sep 7, 6:46 pm, Michael Geary [EMAIL PROTECTED] wrote: Your code has a syntax error in it. Install Firebug in your Firefox browser and enable it for your page. Then reload the page and you'l get an error message. It's referring to is the {} in the .replaceWith({...}) call. But fixing that won't help, because the logic is wrong. The code seems to be assuming that jQuery.ajax({...}) will return the requested data as its return value. It doesn't do that. The data you request isn't ready when .ajax() returns. Instead, it is passed as an argument to the success: function. Fixing that won't help either, because the URL you're requesting doesn't return anything you can use in this manner. Open your weather URL directly in a browser and do a View Source: http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/custom.jsback... color=transparentcolor=093384width=200padding=0border_width=0border_co l or=transparentfont_size=18font_family=inheritshowicons=1 You will see that the URL doesn't return an HTML fragment suitable for insertion into the DOM with .replaceWith(). Instead, it returns JavaScript code consisting of a bunch of document.write() calls. The way this widget is normally used is that you pass that URL as the src= attribute of a script tag, correct? You would need to execute this script, which would be easy enough to do with an eval(), but that won't help (are you tired of me saying that?), because the document.write() calls *must* be made during the initial page load, e.g. from a script tag in your document. But there's another problem. You're trying to do a .ajax() GET across domains. You can't do that. Basically, unless the widget provider offers another format for their widget, you need to do it their way: Use that URL in a script type=text/javascript src=.../script just like they say to do. The one viable option if you want more control would be to create a second .html file which is a complete page that loads the widget in that manner. In your main page, use an iframe src=thatfile.html/iframe to include that second .html file as an IFRAME. Once you get that working, you can add additional JS code inside the IFRAME to detect whether the widget was loaded successfully and hide it if not. But what does not loaded successfully mean here? If the weather site is down, you may get a long timeout before you are able to figure out it wasn't loaded. Then if you hid it, you'd have a blank box appear on your page which would then disappear some number of seconds after the page loads. You'd probably want to substitute some message instead of that. -Mike -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bcbounders Sent: Sunday, September 07, 2008 2:56 PM To: jQuery (English) Subject: [jQuery] Re: Determine if a Javascript has loaded? OK... so here's what I've got so far. I'm trying to work out the jQuery so that if the iBegin weather widget is successfully loaded, then the div id=weather is shown... otherwise, it's hidden. script type=text/javascript jQuery.ready(function(){ jQuery(#weather).replaceWith({ jQuery.ajax({ type: GET, dataType: script, url: http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/ custom.jsbackground_color=transparentcolor=093384width=200 padding=0border_width=0border_color=transparentfont_size=18 font_family=inheritshowicons=1, success: function(){ jQuery(#weather).show() }, error: function(){ jQuery(#weather).hide() } }); }); }); /script But... what I've got isn't working. And, being new to jQuery (and Javascript), I'm not sure why it's not working... or even if this is the best route to try and achieve what I want. Can someone take a look and provide some feedback? I'd really appreciate it! Thanks a lot! - John On Sep 6, 10:49 am,
[jQuery] Re: Superfish Current menu not displaying...
I've made another pass at it. http://isitsf.com/test/sfish/ For reference, you can see the original here: http://isitsf.com/test/sfish/original/ I currently am facing two problems. One of them is general IE6 compatibility. I am at a loss as to why it's not working out there right now - but the testing is interesting. It DOES manage to display correctly at certain points in the hover. But I need help in understanding what is happening under the hood - which classes are being applies and why the menu fails over all. I think the problems here are related to the changes I made in order to make the sub nav level reach the full width of the nav bar - something you have to do in order to make the menu useful. (see the original example and hit the last menu item, and then try to reach one of it's sub items to see why this is a problem) Second problem is less apparent but equally devastating, and it's happening basically with all other browsers - and I think might be related to the IE 6 bug or the changes I needed to make to get the sub nav to run full width. The error can be experienced by activating one of the last two or three menu items and then mousing into the sub nav. About every 3rd or 4th time after activating the sub menu for some reason the sub menu reverts to the current menu. As if you have moused out of the area altogether. Only you haven't. At least not visibly. Any ideas or assistance would be greatly appreciated! On Sep 7, 11:22 am, trackpad [EMAIL PROTECTED] wrote: Thanks Joel. Here are two versions. One without the pathClass set... http://www.goodcompany.dk/tests/superfish/index.php And one with the pathClass set. http://www.goodcompany.dk/tests/superfish/index.php?pathClass=current Note that I am in the process of restructuring the CSS a bit, and have combined the two CSS files and have made some minor changes - but I have ruled out these as the cause by swapping in the original CSS periodically and running into the same problem. In fact you can see the example included with Superfish 1.4.8. behaving in the same way. I am testing in Mac Safari/FF and Win IE 6/7. http://www.goodcompany.dk/tests/superfish/original/example.html Sorry if I've overlooked the obvious (again). I must have because I don't think you would include a non-working example in the download. Could it be it is intentional that you don't show the sub level marked as current until you mouseover the parent? Been working some very late nights recently, so maybe I missed the idea. In any case I need to display the current location (including the submenu) from the start. Also, I don't know if you take freelance or would be available to do some paid superfish consulting, but please get in touch with me if you do offer help along these lines. I have some more complex modifications in mind down the road. goodcompany [dot] dk [at] gmail - thanks. On Sep 6, 4:21 am, Joel Birch [EMAIL PROTECTED] wrote: Hello, I can think of many possible causes of your problem. If you can show us a working example I'm sure we can figure out which one applies to your menu and offer a solution for it. Joel Birch.
[jQuery] Re: Determine if a Javascript has loaded?
Brad, Interesting approach... I like it! Now I'll see if I can get this to work on the site... like replacing the missing widget with a static image or something... so the page doesn't have a gaping hole where the weather's supposed to be (which is what was happening when iBegin was down and the widget wouldn't load, on-and-off all day a few days ago). Thanks a lot!!! - John On Sep 7, 6:22 pm, Brad [EMAIL PROTECTED] wrote: Here is a different approach. Include the javascript source for the weather.ibegin.com in the body of your page. On load run a delayed function to see if it has written its forecast to your page. I ran this on a test page and it worked. I could never get the ibegin source to fail, therefore I had to change the script source to something else likehttp://foo.weather.ibegin.com/... to simulate failure. BTW, I was playing with the widget, so my example gets a different forecast than yours. script var ibeginHTML; function ibeginLoaded() { ibeginHTML = $(#ibegin div).html(); if (ibeginHTML == null) { alert('Widget not loaded'); // You'd do something useful here like insert your missing widget image } } function ibeginTest() { // Give the widget a few seconds to load setTimeout('ibeginLoaded();',2000); } $().ready(function(){ ibeginTest(); }); /script /head body ... other content ... div id=ibegin script type=text/javascript src=http://foo.weather.ibegin.com/js/ us/nm/santa+fe/1/1/1/1/1/ custom.jsbackground_color=ffcolor=00width=175padding=10border_ width=1border_color=00font_size=11font_family=Tahomashowicons=1/ scriptnoscripta href=http://weather.ibegin.com/;Weather Information by iBegin/a/noscript /div ... more content ... /body /html On Sep 7, 3:55 pm, bcbounders [EMAIL PROTECTED] wrote: OK... so here's what I've got so far. I'm trying to work out the jQuery so that if the iBegin weather widget is successfully loaded, then the div id=weather is shown... otherwise, it's hidden. script type=text/javascript jQuery.ready(function(){ jQuery(#weather).replaceWith({ jQuery.ajax({ type: GET, dataType: script, url: http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/ custom.jsbackground_color=transparentcolor=093384width=200padding=0bor der_width=0border_color=transparentfont_size=18font_family=inheritshowi cons=1, success: function(){ jQuery(#weather).show() }, error: function(){ jQuery(#weather).hide() } }); }); }); /script But... what I've got isn't working. And, being new to jQuery (and Javascript), I'm not sure why it's not working... or even if this is the best route to try and achieve what I want. Can someone take a look and provide some feedback? I'd really appreciate it! Thanks a lot! - John On Sep 6, 10:49 am, bcbounders [EMAIL PROTECTED] wrote: Rene, Thanks so much for posting. I got the site up, using the iBegin weather widget on it's own. If it helps, here's a link: http://tinyurl.com/5n8mco I'll take a stab at doing what you suggest... wish me luck! :D But... expect to hear more questions from me soon. - John
[jQuery] reading from HTML file...
hie everybbody, can any one tell me how do i read from HTML file using ajax or JQuery,,,. I have to use this in ASP.NET but i do not want to use Server side, that is why wished to use JQuery but i even do not know about the function which is to be used, can you please help em out, and tell the way i can use it. Thanks,
[jQuery] Re: How to load JQuery Cycle script first/quicker?
I have made a website (www.outback-encounter.com) where I am using the JQuery cycle code for the rotating images in the header, and the problem is that the images load first and fill up the screen before the javascript function loads which then puts them all together into the slideshow header. You can often see this by going to any new page or reload the existing one. It is not so much a problem in Google Chrome browser since it handles javascript much faster, but standard browsers show the header images all across the screen the first second of the page load quite frequently. I am not sure how I can improve on how the page loads, but would very much appreciate any feedback that could help. I am using the compressed cycle .js file which is only 3.8kb. Thanks for any help you can give! You can fix that with CSS. Set the position on the slide container to relative, and the position on the slides to absolute, with the top and left style set to zero. That should fix the positioning problem but will probably leave the last slide on top (when you want the first slide on top). You could then set display:none on each slide and use a display:block inline style for the first slide. Mike
[jQuery] Re: How to load JQuery Cycle script first/quicker?
I tried the css code with no change, here is the result and perhaps you can say if there is something not implemented as described above: Your css is a bit off. #slideshow is your container, not #top_area. Your slides are the images with #slideshow, not the .pics class. Try the following: #slideshow { position: relative } #slideshow img { position: absolute; top:0, left:0, display:none } #slideshow img:first-child { display:block } Mike
[jQuery] Re: Tabs ui links
No problem - that happens quite a lot. I've no problem with being mistaken with Karl, the jQuery Karl, hehe ;-) --Klaus On Sep 8, 1:20 pm, Daniel Beard [EMAIL PROTECTED] wrote: Sorry, I meant Klaus! I get called David a lot Daniel On 7 sep, 11:22, Klaus Hartl [EMAIL PROTECTED] wrote: You need to ajaxify those links after the content has been loaded: $(function() { $('#example').tabs({ load: function(e, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); }); --Klaus On Sep 1, 12:52 pm,DanielBeard[EMAIL PROTECTED] wrote: Hi everyone, I am using jQuery UItabsversion 3.0. I am calling thetabscontent via Ajax, but the links inside thetabsdon't open inside thetabs, instead they load into a new page. Is there any way to make my links load via Ajax into the current tab? Thanks, Daniel
[jQuery] Re: reading from HTML file...
Check out the load method: http://docs.jquery.com/Ajax/load#urldatacallback The example there doesn't work, but usually all you do is select a container and load a URL: $(#container).load(somefile.html); Jörn On Mon, Sep 8, 2008 at 8:31 AM, Zain Shaikh [EMAIL PROTECTED] wrote: hie everybbody, can any one tell me how do i read from HTML file using ajax or JQuery,,,. I have to use this in ASP.NET but i do not want to use Server side, that is why wished to use JQuery but i even do not know about the function which is to be used, can you please help em out, and tell the way i can use it. Thanks,
[jQuery] using an external parser with MarkItUp
Hi, Not sure if this is the right place to ask, but here goes nothing. I have a small php/jQuery framework in which I would like to use the seemingly excellent MarkItUp tool. The users want to use MarkDown as their content markup language, and I would like to oblige - but the documentation for typing MarkItUp instance is a bit thin on the ground... I have a PHP Markdown parser, and I know where to put the parser file, and how to let MarkItUp know where the parser file is but, I have no idea how to pass the variable and indeed process the request! I can get the preview to return a text file, but somehow it's not invoking the parser file as either PHP or javascript. Does anyone have experience of using an external parser with MarkItUp? TIA, R
[jQuery] Re: Get ID from HTML variable
Perfect Mike!!! Thank you! On 7 set, 23:10, Michael Geary [EMAIL PROTECTED] wrote: Cristiano, try this: var data = 'htmlbodytabletrtddiv.../divdiv id=myDivmore html here/div/td/tr/table/body/html'; var html = $(data).find('#myDiv').html(); alert( html ); // alerts 'more html here' -Mike -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cristiano Sent: Sunday, September 07, 2008 3:15 PM To: jQuery (English) Subject: [jQuery] Get ID from HTML variable Hi, I have a variable (data) with html content. I need only get the innerHTML(?) from one element in content. The element is a div with id. Sample: htmlbodytabletrtddiv.../divdiv id=myDivmore html here/div/td/tr/table/body/html I try create a element with the variable content but this dont work... In HTML/javascript I do: var myObj = document.createElement(div); myObj.innerHTML = data; var myDiv = myObj.getElementById(myDiv); How make this in jQuery? tks Cristiano
[jQuery] Re: Finding elements with some ID
Olivier wrote: How to find the elements with the id beginning by myID_ and terminated with any number like myID_25789. Try this: $('*[id^=myID_]').filter(function(){ return (/\_[0-9]+$/).test($(this).attr('id')); });
[jQuery] Disappearing accordion elements
Hi folks, I'm having trouble with lower elements (correct usage of the term???) of disappearing under the footer div of my page. A test page is here: http://www.watereducationalliance.net/technology.asp (click on key info) In both IE7 and FF3, the lower two items of the accordion are not fully viewable, sliding in behind the footer. I suspect the solution is through CSS, but my attempts at placing a clear:both styled break tag after the last item of the accordion has not been successful and I'm unsure how to proceed. Ideas/suggestions/solutions gratefully accepted. Cheers, Bruce
[jQuery] Re: Finding elements with some ID
if you have div`s then, $('div[id^=myID_]') On 8 сент, 13:15, Olivier [EMAIL PROTECTED] wrote: How to find the elements with the id beginning by myID_ and terminated with any number like myID_25789.
[jQuery] Re: New Website in IE7
That screenshot to me looks like your IE isn't properly loading the external CSS needed perhaps clear out your temp files and try again Screenshot of what i see (and it's all good) http://i34.tinypic.com/2573a4p.jpg
[jQuery] Re: Finding elements with some ID
Docs: http://docs.jquery.com/ Selectors: http://docs.jquery.com/Selectors Attributes filters http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue
[jQuery] first day in week - datepicker
Hello, i need help. I 'm trying what fatepicker can do and I want change the day, when week starts in calendar. I want monday to be first day in week, but I really don't know hwo to do that. Do you have any ideas? elf
[jQuery] Re: Tabs ui links
Sorry, I meant Klaus! I get called David a lot Daniel On 7 sep, 11:22, Klaus Hartl [EMAIL PROTECTED] wrote: You need to ajaxify those links after the content has been loaded: $(function() { $('#example').tabs({ load: function(e, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); }); --Klaus On Sep 1, 12:52 pm,DanielBeard[EMAIL PROTECTED] wrote: Hi everyone, I am using jQuery UItabsversion 3.0. I am calling thetabscontent via Ajax, but the links inside thetabsdon't open inside thetabs, instead they load into a new page. Is there any way to make my links load via Ajax into the current tab? Thanks, Daniel
[jQuery] Re: shadowbox resize iframe after content loads
That's basically what I've been experimenting with in the FireBug console, it results in a permission denied error being logged to the console. On Sep 5, 1:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have just googled around for some time and found this in the jquery docs:http://docs.jquery.com/Traversing/contents- click example so var w = $ (#shadowbox_content).contents().find(#getsizefromthis).width() var h = $ (#shadowbox_content).contents().find(#getsizefromthis).height() // do something else with them I tested this in firebug and it thrown an error that read the information of this element... Just try it yourself maybe it works! On 5 Sep., 13:48, Gordon [EMAIL PROTECTED] wrote: Thanks for the help, this is a good start as it lets me hook into shadowbox load, but I'm still stuck with the other side of the problem. What I need to do is grab the width and height of an element contained within the iFrame and resize the elements that contain the iFrame based on those sizes. As the iFrame is displaying content from off-site it's causing a permission denied error (or at least I think that's what's causing it). On Sep 5, 9:52 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Maybe you can use the onFinish callback:http://mjijackson.com/shadowbox/doc/api.html $(window).load(function(){ var options = { onFinish:function() { // do what you want here // resize the shadowbox etc... } }; Shadowbox.init(options); }); On 5 Sep., 10:15, Gordon [EMAIL PROTECTED] wrote: Can nobody help out with this? On Sep 3, 12:06 pm, Gordon [EMAIL PROTECTED] wrote: On our website I am using a shadowbox to view videos hosted on another site in the product page window. The problem is that recently the company hosting the videos have started providing several different size of videos. All the different video pages, however, have an element with an ID of container as the only child of the body element (in 2 cases it's a table, in a third a div, but all have an id of container). I found that if I can manually resize the shadowbox by getting the clientwidth and clientheight of the #container element and setting the width and height of the shadowbox to these values I can get the shadowbox to perfectly contain the video without excess space. The problem is that I can't find a way of grabbign the width and height from within a script and applying the new size. I tried typing $('#shadowbox_content').content().find ('#container') into the firebug console and got a permission denied error. Additionally, the iFrame doesn't exist until the shadowbox opens, so I need to find a way to get the iframt content when the iframe loads but to do it wit han iframe that doesn't exist until the containing shadowbox opens. Can anyone help? The only other solution I have it to just make the shadowbox big enough to hold any video size, but then there's a lot of white space in the shadowbox when the video is smaller than this. Here are a few pages that use the shadowbox that show the problem: http://www.pcwb.com/catalogue/item/A0234261- Biggest sizehttp://www.pcwb.com/catalogue/item/3DCONX01- Most 3D Connexion videoshttp://www.pcwb.com/catalogue/item/WAC123- Most videos on the site are this size
[jQuery] UI Datepicker change class on callback
Hi everyone, I am using the great UI Datepicker plugin to manage a property rental website. Using the National days technique, I am able to parse data from an XML file and show the days that the property is not available in red. So far so good, but I also need to allow the owners to change those days, for which I am using the callback function. I can send an AJAX GET to my server with the date selected as a parameter and my serverside script can make the change from available to non-available, but I also need to change the class of the current selection to red if it is non-available and vice-versa without loading the whole calendar again. How would this be done? Thanks, Daniel
[jQuery] Re: How to load JQuery Cycle script first/quicker?
I tried the css code with no change, here is the result and perhaps you can say if there is something not implemented as described above: Web page code (from PHP page): div id=top_area div id=slideshow class=pics align=center ?php for ($counter = 0; $counter $images_count; $counter++) { ? img class=top_image src=images/images_processed/?php echo $images[$counter]-filename ? alt=?php echo $images[$counter]- object_name ? / ? } ? /div /div CSS related code: #top_area { height:300px; background-color:#1b1b1b; position:relative; } .top_image { max-height:280px; max-width:766px; padding: 10px; } .pics { position:absolute; left:0px; top:0px; } Javascript code in page header: script type=text/javascript $(function() { $('#slideshow').cycle({ timeout: 8000, speed: 3000 }); }); /script
[jQuery] How to use jGrowl's theme option?
Hello, does anyone have an example how to use jGrowl's theme option? I want to use display error messages in red and tried the following: $.jGrowl('My error message',{theme: 'jgError'}); with the following in my css file: .jgError { color: red; } but it didn't work. I am obviously doing something wrong here. Does anyone have an example of how to do it right? Thanks for your help W. Rösler
[jQuery] Re: Finding elements with some ID
On 8 sep, 13:18, Ca-Phun Ung [EMAIL PROTECTED] wrote: Olivier wrote: How to find the elements with the id beginning by myID_ and terminated with any number like myID_25789. Try this: $('*[id^=myID_]').filter(function(){ return (/\_[0-9]+$/).test($(this).attr('id')); }); Thak you all for these all good solutions
[jQuery] Re: first day in week - datepicker
Try this: $.datepicker.setDefaults( { firstDay: 1 } ); I haven't test it... default value: firstDay: 0 // 0 == sunday; 6 == saturday On 8 Sep., 13:46, Lukas Polak [EMAIL PROTECTED] wrote: Hello, i need help. I 'm trying what fatepicker can do and I want change the day, when week starts in calendar. I want monday to be first day in week, but I really don't know hwo to do that. Do you have any ideas? elf
[jQuery] Re: How to load JQuery Cycle script first/quicker?
Thanks for your corrections, it made a difference but sometimes one of the images is showing out on the right side instead of below as before. I removed the css entries that were in the wrong place and added your css instead. Please try it our and see if you notice it. Thanks again!
[jQuery] Re: Tabs ui links
Thank you very much Karl, that worked perfectly! Daniel On 7 sep, 11:22, Klaus Hartl [EMAIL PROTECTED] wrote: You need to ajaxify those links after the content has been loaded: $(function() { $('#example').tabs({ load: function(e, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); }); --Klaus On Sep 1, 12:52 pm,DanielBeard[EMAIL PROTECTED] wrote: Hi everyone, I am using jQuery UItabsversion 3.0. I am calling thetabscontent via Ajax, but the links inside thetabsdon't open inside thetabs, instead they load into a new page. Is there any way to make my links load via Ajax into the current tab? Thanks, Daniel
[jQuery] Fwd: Dialog
Hi, I'm just learning how to use jquery and really like the Modal Dialog with Overlay widget. ( http://dev.jquery.com/view/trunk/ui/demos/functional/#ui.dialog) I'm having problems getting it to work though, and am unsure what I'm doing wrong. I want a dialog box with a form in it to pop up when text LogMeIn is clicked. The code runs until: alert(Hi); Then the status bar at the bottom says Done but has the yellow triangle beside it denoting that the code didn't complete correctly, and the *div*id= *LID *does not appear. *Here is my JavaScript (**LogInDialog.js**):* $(*document*).*ready*(*function*(){ $(*#LIDlink*).*click*(*function*(){ *alert*(*Hi*); $(*#LID*).*dialog*({ *modal*: *true*, *overlay*: { *opacity*: 0.5, *background*: *black* } }); //Taken from http://dev.jquery.com/view/trunk/ui/demos/functional/#ui.dialog //Then select Modal Dialog with Overlay from the combo box and click on view source }); }); *Here is my HTML:* *link* href=*ZA.css* rel=*stylesheet* type=*text/css* */* *script* type=*text/javascript* src=* Javascript/jquery-1.2.6.min.js/script* *script* type=*text/javascript* src=* Javascript/LogInDialog.js/script* * * *- - - - - - - * *h4* id=*LIDlink* class=*CSLink*LogMeIn*/h4* *div* id=*LID * *form* name=*'logmeinsupport'* action=*'** https://secure.logmeinrescue.com/Customer/Code.aspx**'* method=*'post'* *table* *trtd*Enter your 6-digit PIN code: */tdtdinput* type=* 'text'* name=*'Code'* value=*''* *//td/tr* *trtd* colspan=*'2'input* type=*'submit'* value=*'Connect to technician'* *//td/tr* */table* *input* type=*'hidden'* name=*'tracking0'* maxlength=*'64'* value= *''* */* *!-- optional -- * *input* type=*'hidden'* name=*'language'* maxlength=*'5'* value=* ''* */* *!-- optional --* *input* type=*'hidden'* name=*'hostederrorhandling'* value=*''* * /* *!-- optional --* */form* */div* *Here is my CSS:* *#LID** {* *display**:* none*;* *background-color**:* *#8194CC**;* *width**:* *375*px*;* *height**:* *75*px*;* *border**:* *#cc* solid *2*px*;* *padding**:* *4*px*;* *margin**:* *0*px*;* *z-index**:* *2**;* *position**:* absolute*;* */*top: -90px; left: 300px;*/* *}* *#LIDlink** {* *cursor**:* pointer*;* *display**:* block*;* *width**:* *110*px*;* *background-color**:* green*;* *}* I've spent many hours trying to figure out what I'm doing wrong, but have not come up with the solution. Any help would be appreciated. Thanks, Brad -- Brad McIntyre
[jQuery] Re: Disappearing accordion elements
Your #footer has an padding-top of 25px so you have to set the margin- bottom of the div#ui-tabs-4 to 25px or just remove the position:absolute style in your #footer. On 8 Sep., 13:22, Bruce MacKay [EMAIL PROTECTED] wrote: Hi folks, I'm having trouble with lower elements (correct usage of the term???) of disappearing under the footer div of my page. A test page is here:http://www.watereducationalliance.net/technology.asp (click on key info) In both IE7 and FF3, the lower two items of the accordion are not fully viewable, sliding in behind the footer. I suspect the solution is through CSS, but my attempts at placing a clear:both styled break tag after the last item of the accordion has not been successful and I'm unsure how to proceed. Ideas/suggestions/solutions gratefully accepted. Cheers, Bruce
[jQuery] Re: Validate Input of type File
I tried to add the following: errorPlacement: function(error, element) { if (element.is(input[type=file])) error.insertAfter(element.next()); else error.insertAfter(element); }, But still does not work. Could someone tell me how to solve this problem? Thanks, Miguel On Sep 8, 7:30 am, shapper [EMAIL PROTECTED] wrote: Please, anyone? Thanks, Miguel On Sep 7, 10:57 pm, shapper [EMAIL PROTECTED] wrote: Hi, I tried and it is working ... well kind of. I am using FileStyle JQuery plugin to style the file input:http://www.appelsiini.net/projects/filestyle So the generated code (note the error message that is working): label for=PathFicheiro/label input class=file style=display: inline; width: 320px;/ div style=background: transparent url(../../Assets/Image/PT/ FileUpload_Button.jpg) no-repeat scroll right center; overflow: hidden; width: 20px; height: 15px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: - moz-initial; display: inline; position: absolute; input id=Path class= type=file value= name=Path style=position: relative; height: 15px; width: 320px; display: inline; cursor: pointer; opacity: 0; margin-left: -142px;/ label class=Error for=Path generated=trueSelect a document/label /div The error message is in the HTML markup as you can see but it is not visible. Any idea of how to solve this? Thanks, Miguel On Sep 7, 10:48 am, Jörn Zaefferer [EMAIL PROTECTED] wrote: Yes, just check the input value. You could use the validation plugin for that:http://bassistance.de/jquery-plugins/jquery-plugin-validation/ The demo here has two file inputs that get validated:http://jquery.bassistance.de/validate/demo/errorcontainer-demo.html Jörn On Sat, Sep 6, 2008 at 11:39 PM, shapper [EMAIL PROTECTED] wrote: Hello, Is it possible to validate a input of type File? I mean that I would like to test if the user checked a file ... nothing else. Thanks, Miguel
[jQuery] Using an external parser with MarkItUp
Hi, Not sure if this is the right place to ask, but here goes nothing. I have a small php/jQuery framework in which I would like to use the seemingly excellent MarkItUp tool. The users want to use MarkDown as their content markup language, and I would like to oblige - but the documentation for typing MarkItUp instance is a bit thin on the ground... I have a PHP Markdown parser, and I know where to put the parser file, and how to let MarkItUp know where the parser file is but, I have no idea how to pass the variable and indeed process the request! I can get the preview to return a text file, but somehow it's not invoking the parser file as either PHP or javascript. Does anyone have experience of using an external parser with MarkItUp? TIA, R
[jQuery] Re: shadowbox resize iframe after content loads
Hi Gordon, Someone else can correct me if I'm wrong (please), but as I understand it, if the content within the iframe comes from a different domain, you won't be able to manipulate it via JavaScript. This is a cross- site security feature of JavaScript / browsers. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 8, 2008, at 8:20 AM, Gordon wrote: That's basically what I've been experimenting with in the FireBug console, it results in a permission denied error being logged to the console. On Sep 5, 1:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have just googled around for some time and found this in the jquery docs:http://docs.jquery.com/Traversing/contents- click example so var w = $ (#shadowbox_content).contents().find(#getsizefromthis).width() var h = $ (#shadowbox_content).contents().find(#getsizefromthis).height() // do something else with them I tested this in firebug and it thrown an error that read the information of this element... Just try it yourself maybe it works! On 5 Sep., 13:48, Gordon [EMAIL PROTECTED] wrote: Thanks for the help, this is a good start as it lets me hook into shadowbox load, but I'm still stuck with the other side of the problem. What I need to do is grab the width and height of an element contained within the iFrame and resize the elements that contain the iFrame based on those sizes. As the iFrame is displaying content from off-site it's causing a permission denied error (or at least I think that's what's causing it). On Sep 5, 9:52 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Maybe you can use the onFinish callback:http://mjijackson.com/shadowbox/doc/api.html $(window).load(function(){ var options = { onFinish:function() { // do what you want here // resize the shadowbox etc... } }; Shadowbox.init(options); }); On 5 Sep., 10:15, Gordon [EMAIL PROTECTED] wrote: Can nobody help out with this? On Sep 3, 12:06 pm, Gordon [EMAIL PROTECTED] wrote: On our website I am using a shadowbox to view videos hosted on another site in the product page window. The problem is that recently the company hosting the videos have started providing several different size of videos. All the different video pages, however, have an element with an ID of container as the only child of the body element (in 2 cases it's a table, in a third a div, but all have an id of container). I found that if I can manually resize the shadowbox by getting the clientwidth and clientheight of the #container element and setting the width and height of the shadowbox to these values I can get the shadowbox to perfectly contain the video without excess space. The problem is that I can't find a way of grabbign the width and height from within a script and applying the new size. I tried typing $('#shadowbox_content').content().find ('#container') into the firebug console and got a permission denied error. Additionally, the iFrame doesn't exist until the shadowbox opens, so I need to find a way to get the iframt content when the iframe loads but to do it wit han iframe that doesn't exist until the containing shadowbox opens. Can anyone help? The only other solution I have it to just make the shadowbox big enough to hold any video size, but then there's a lot of white space in the shadowbox when the video is smaller than this. Here are a few pages that use the shadowbox that show the problem: http://www.pcwb.com/catalogue/item/A0234261- Biggest sizehttp://www.pcwb.com/catalogue/item/3DCONX01 - Most 3D Connexion videoshttp://www.pcwb.com/catalogue/item/WAC123- Most videos on the site are this size
[jQuery] $(xx).load can't load css and js in html file on Chrome??
Hi all, I use $(xx).load to load a html file that has its own css and js, on IE and Firefox, it work good, but on Google Chrome, it can't load css and js in the html file, how can I fix it? example: subpage.htm: html script type=text/javascript alert( Hello World ); /script style type=text/css . /style body div . div /body /html I use: $(xx).load( subpage.htm ); alert ( $(xx).html() ); on IE and Firefox,it alert Hello World and show: style type=text/css . /style div . div but on Chrome it only show: div . div no alert, no style..
[jQuery] Re: Superfish - display2 deep and have mouseover for anything deeper
Thanks, the current class option is pretty cool and will be useful. Maybe this outline of the vertical navigation I am looking for will explain better. Level 1 and 2 always display. *level 1 **level 2 ***(hidden till mouseover of level 2) level 3 ***(hidden till mouseover of level 2) level 3 **level 2 *level 1 **level 2 ***(hidden till mouseover of level 2) level 3 *level 1
[jQuery] $(xx).load can't load css and js in html file on Chrome??
Hello all, I use $(xx).load to load a html file that has its own css and js, on IE and Firefox, it works fine, but on Google's Chrome, I found that it can't load css and js in the html file. how can I fix it ? subpage.htm: style type=text/css . /style div/div in IE and Firefox: $(xx).load(subpage.htm); alert( $(xx).html() ); it shows: style type=text/css . /style div/div but in Chrome it shows: div/div the style lost:(
[jQuery] Tabs and focus() input-Elements issue
Hi list We use Klaus Hartls' Tabs in a company intranet application. It's just awesome. But there is a little confusion about setting a focus on an input- field (ie. $('#myInput').focus() ). It works well when calling the Tab directly, but it would not focus when calling from the tab(s) itself. I just tested it with the demo pages from Klaus and there it would not work either. Does someone have an example or an idea of how to get around this? Thanks in adv. QT
[jQuery] Re: first day in week - datepicker
I have looked at the UI Functional Demos and found anotherway to do it: $(#datepicker).datepicker({ firstDay: 1 }); with my first solution all datepicker would start at monday and so only the #datepicker. On 8 Sep., 14:57, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Try this: $.datepicker.setDefaults( { firstDay: 1 } ); I haven't test it... default value: firstDay: 0 // 0 == sunday; 6 == saturday On 8 Sep., 13:46, Lukas Polak [EMAIL PROTECTED] wrote: Hello, i need help. I 'm trying what fatepicker can do and I want change the day, when week starts in calendar. I want monday to be first day in week, but I really don't know hwo to do that. Do you have any ideas? elf
[jQuery] ZKOSS uses scriptaculous
We cannot include jquery.js in a ZK page, because of $ I deleted the $ = jQuery definitions and now ik can use jQuery in a ZK Page. I cannot use the minimized version though, because it's a bit encrypted Maybe leave this shortcut to the higher level, let applicationbuilders define $ to there liking $ = jQuery should not be part of the library Regards, Huub
[jQuery] [validate] custom validation trigger
Hallo, i would like to validate a formfield. Valid values are 01, 02 31, like all possible days of a month. The field validation should start after blur (like default) and after the second sign was inserted(also in the first lazy-mode). When the values are valid, the next form field should be onfocus automatically. Is this a possible behaviour of the plugin? At this point i dont have an idea, how to start Thx in advance Boris
[jQuery] Re: ZKOSS uses scriptaculous
this should be useful for you: http://docs.jquery.com/Using_jQuery_with_Other_Libraries Alexandre Plennevaux LAb[au] http://www.lab-au.com On Mon, Sep 8, 2008 at 3:30 PM, Huub [EMAIL PROTECTED] wrote: We cannot include jquery.js in a ZK page, because of $ I deleted the $ = jQuery definitions and now ik can use jQuery in a ZK Page. I cannot use the minimized version though, because it's a bit encrypted Maybe leave this shortcut to the higher level, let applicationbuilders define $ to there liking $ = jQuery should not be part of the library Regards, Huub
[jQuery] Re: ZKOSS uses scriptaculous
Maybe leave this shortcut to the higher level, let applicationbuilders define $ to there liking And it is. by using noConflict http://docs.jquery.com/Using_jQuery_with_Other_Libraries include the jQuery file *first*, wire up the no conflict, then continue including other stuff (scriptalicious or whatever)
[jQuery] Re: [validate] custom validation trigger
The plugin doesn't support customizing event in that manner. But you can always implement your own event handling, disabling the defaults if they interfere, and trigger validation manually. Something like this: $(#dayfield).keyup(function() { if (this.value.length = 2 $(this).valid()) { $(#nextfield).focus(); } }); That assumes you've defined max=31 as a rule for dayfield elsewhere. Details about the valid method are here: http://docs.jquery.com/Plugins/Validation/valid Jörn On Mon, Sep 8, 2008 at 4:49 PM, casavecchio [EMAIL PROTECTED] wrote: Hallo, i would like to validate a formfield. Valid values are 01, 02 31, like all possible days of a month. The field validation should start after blur (like default) and after the second sign was inserted(also in the first lazy-mode). When the values are valid, the next form field should be onfocus automatically. Is this a possible behaviour of the plugin? At this point i dont have an idea, how to start Thx in advance Boris
[jQuery] How to select a specific descendant of curent object
div id=box span class=child span class=grandchildhi grandma/span /span /div my question is how reach the .grandchild from .box? in theory, i can just use selector $(#box .grandchild) but this is not much handy when you already have selected the box object and pass it to some function for example... so i gues some travesting method may be avalaible to handle this. i found children(), but it can only reach immediate children of curently selected object (so in this my case, the grandchild is out of reach). so is there a travesting method, or any other method which could select any descendant of curent element? thx in advice
[jQuery] Re: ZKOSS uses scriptaculous
h:script src=../script/jquery.js /h:script h:script jQuery.noConflict(); alert(jQuery(#${search.uuid}).attr(value)) /h:script works great thanks. On Sep 8, 4:54 pm, MorningZ [EMAIL PROTECTED] wrote: Maybe leave this shortcut to the higher level, let applicationbuilders define $ to there liking And it is. by using noConflict http://docs.jquery.com/Using_jQuery_with_Other_Libraries include the jQuery file *first*, wire up the no conflict, then continue including other stuff (scriptalicious or whatever)
[jQuery] Re: selectors in $.post return with HTML context
Sure thing. Here is the whole ubiquity (http://labs.mozilla.com/2008/08/ introducing-ubiquity/) command in its current form. The relevant section is at the end. CmdUtils.CreateCommand({ name: tag-cloud, takes: {body_of_text: noun_arb_text}, description: Replaces selected text with a frequency-based tag cloud., preview: Creates a tag cloud out of selected text., execute: function(statusText) { if(statusText.text.length 100) { displayMessage(You probably want to selecet more text to make a decent cloud); return; }; var updateUrl = http://tagcrowd.com/index.pl;; var updateParams = { name: tagcrowd, text: statusText.text, doStemming: yes }; jQuery.post(updateUrl, updateParams, function(ajdata) { displayMessage(jQuery(textarea:first, ajdata).val()); }, html); } }); The page I'm POST-ing to, and getting the contents of is: http://tagcrowd.com/index.pl Basically I just want to use a selector on that returned page, but passing it in as the context doesn't seem to work . . .or I'm doing it wrong. Thanks. :) On Sep 7, 6:13 pm, Michael Geary [EMAIL PROTECTED] wrote: Can you post a link to a test page that illustrates what you're trying to do and what isn't working? It's pretty hard to tell what might be wrong without seeing things like the HTML that the $.post() returns. -Mike From: [EMAIL PROTECTED] I'm having trouble using a subsequent selector on an HTML page returned from $.post, while trying to write a Ubiquity command. If I log or display ajdata, as returned from the $.post, it contains the HTML page, as expected, and shows up as a jQuery object in Firebug. What I want to do is use a jQuery selector to extract a named textarea within the returned HTML, so I plug in the object as the context and provide a selector, as below: jQuery.post(updateUrl, updateParams, function(ajdata) { CmdUtils.log(jQuery(textarea[name=cloudsource], ajdata).val()) }, html); Firebug just gives me unknown for the response. If I remove the slector, and just pass ajdata to CmdUtils.log, then I see a jQuery object in Firebug. At first I thought my selector was in error, but even changing it to obvious things like body, div, etc produced the same undefined in Firebug, so I guess I'm misunderstanding how context works for jQuery. Any insight would be appreciated.
[jQuery] Re: How to load JQuery Cycle script first/quicker?
Actually it seems to be working after I modified your code slightly to this (added semicolons): #slideshow { position: relative; } #slideshow img { position: absolute; top:0; left:0; display:none; } #slideshow img:first-child { display:block; }
[jQuery] Re: addSlide with Next/Previous pagination using Cycle Plugin
I just checked this out in ff and if you go 'next', it works, but if you click 'prev' and keep going backwards, you'll notice that you will have slides 1, 2, 1, 8, 7, 6, So clicking on either button does the adding of additional images, but they are only available after you clicked, hence if you go backwards, you jump to the 2nd image instead of 8. You can also observe this in html view of firebug. Actually this is quite obvious, since the option 'before' runs just before it reacts to your click, so the new images (added with addSlide) are not available until that point! I have the same problem trying to have my own pager, only 2 imgs within the html, and the rest added via js. On first interaction only the initial 2 can be interacted with... Hope it will be fixed soon! :) Thanks, Suhi
[jQuery] Re: Superfish: onBeforeShow and onHide callback functions
Hi Joel, I'm using your last version of superfish but I'm having trouble closing the menu with the same effects. So right now to show it i have a slideDown and a fadeIn ({opacity:'show',height:'show'}), and I want to close it with a slideUp and a fadeOut... I've tried in many ways but it seems none of them were accepted, any suggestion of how to do it? Thanks in advance!
[jQuery] Re: $(xx).load can't load css and js in html file on Chrome??
What's the actual code? I'm assuming you're not actually using 'xx' as your selector because that would never work. That format is reserved for accesing a specific tag. If you want to access a class, or id, then you'd need to prepend the 'xx' with either a . for a class, or # for an id. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JOVE Sent: Monday, September 08, 2008 9:09 AM To: jQuery (English) Subject: [jQuery] $(xx).load can't load css and js in html file on Chrome?? Hello all, I use $(xx).load to load a html file that has its own css and js, on IE and Firefox, it works fine, but on Google's Chrome, I found that it can't load css and js in the html file. how can I fix it ? subpage.htm: style type=text/css . /style div/div in IE and Firefox: $(xx).load(subpage.htm); alert( $(xx).html() ); it shows: style type=text/css . /style div/div but in Chrome it shows: div/div the style lost:(
[jQuery] Re: shadowbox resize iframe after content loads
That's what I feared, but I was hoping there was a way around it. On Sep 8, 2:18 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi Gordon, Someone else can correct me if I'm wrong (please), but as I understand it, if the content within the iframe comes from a different domain, you won't be able to manipulate it via JavaScript. This is a cross- site security feature of JavaScript / browsers. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 8, 2008, at 8:20 AM, Gordon wrote: That's basically what I've been experimenting with in the FireBug console, it results in a permission denied error being logged to the console. On Sep 5, 1:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have just googled around for some time and found this in the jquery docs:http://docs.jquery.com/Traversing/contents- click example so var w = $ (#shadowbox_content).contents().find(#getsizefromthis).width() var h = $ (#shadowbox_content).contents().find(#getsizefromthis).height() // do something else with them I tested this in firebug and it thrown an error that read the information of this element... Just try it yourself maybe it works! On 5 Sep., 13:48, Gordon [EMAIL PROTECTED] wrote: Thanks for the help, this is a good start as it lets me hook into shadowbox load, but I'm still stuck with the other side of the problem. What I need to do is grab the width and height of an element contained within the iFrame and resize the elements that contain the iFrame based on those sizes. As the iFrame is displaying content from off-site it's causing a permission denied error (or at least I think that's what's causing it). On Sep 5, 9:52 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Maybe you can use the onFinish callback:http://mjijackson.com/shadowbox/doc/api.html $(window).load(function(){ var options = { onFinish:function() { // do what you want here // resize the shadowbox etc... } }; Shadowbox.init(options); }); On 5 Sep., 10:15, Gordon [EMAIL PROTECTED] wrote: Can nobody help out with this? On Sep 3, 12:06 pm, Gordon [EMAIL PROTECTED] wrote: On our website I am using a shadowbox to view videos hosted on another site in the product page window. The problem is that recently the company hosting the videos have started providing several different size of videos. All the different video pages, however, have an element with an ID of container as the only child of the body element (in 2 cases it's a table, in a third a div, but all have an id of container). I found that if I can manually resize the shadowbox by getting the clientwidth and clientheight of the #container element and setting the width and height of the shadowbox to these values I can get the shadowbox to perfectly contain the video without excess space. The problem is that I can't find a way of grabbign the width and height from within a script and applying the new size. I tried typing $('#shadowbox_content').content().find ('#container') into the firebug console and got a permission denied error. Additionally, the iFrame doesn't exist until the shadowbox opens, so I need to find a way to get the iframt content when the iframe loads but to do it wit han iframe that doesn't exist until the containing shadowbox opens. Can anyone help? The only other solution I have it to just make the shadowbox big enough to hold any video size, but then there's a lot of white space in the shadowbox when the video is smaller than this. Here are a few pages that use the shadowbox that show the problem: http://www.pcwb.com/catalogue/item/A0234261- Biggest sizehttp://www.pcwb.com/catalogue/item/3DCONX01 - Most 3D Connexion videoshttp://www.pcwb.com/catalogue/item/WAC123- Most videos on the site are this size
[jQuery] Re: [validate] custom validation trigger
Hy Jörn, thx for the unbelieveble fast reply. I just wrote kind of oldstyle js-function, doing the same. And the blur of that function triggered validation, too. Didn't thought, it could be so easy. But your solution is much more elegant. Boris On 8 Sep., 17:07, Jörn Zaefferer [EMAIL PROTECTED] wrote: The plugin doesn't support customizing event in that manner. But you can always implement your own event handling, disabling the defaults if they interfere, and trigger validation manually. Something like this: $(#dayfield).keyup(function() { if (this.value.length = 2 $(this).valid()) { $(#nextfield).focus(); } }); That assumes you've defined max=31 as a rule for dayfield elsewhere. Details about the valid method are here:http://docs.jquery.com/Plugins/Validation/valid Jörn On Mon, Sep 8, 2008 at 4:49 PM, casavecchio [EMAIL PROTECTED] wrote: Hallo, i would like to validate a formfield. Valid values are 01, 02 31, like all possible days of a month. The field validation should start after blur (like default) and after the second sign was inserted(also in the first lazy-mode). When the values are valid, the next form field should be onfocus automatically. Is this a possible behaviour of the plugin? At this point i dont have an idea, how to start Thx in advance Boris
[jQuery] [tooltip] Does not show up in IE
Hello, I'm struggling with the latest version of tooltip, i can't get it working in IE. Tho it's showing up perfectly in Opera and FF. This is the code: $(option).livequery(function(){ $(this).each(function(i){ var str = $(this).text(); if (str.length 20) { $(this).text(str.substr(0, 18) + ...); $(this).tooltip({ track: true, delay: 0, showURL: false, fixPNG: true, bodyHandler: function() { newstr = ; for (var counter = 0;counter = str.length; counter++ ) { if (counter % 60 == 0 counter != 0) { newstr = newstr + br /; } newstr = newstr + str.substring(counter-1, counter); } alert(newstr); return b + newstr + /b; } }); } }); }); I've included the bgiframe plugin,as well as i simply tried to use $ (option).tooltip(); (without livequery and all the stuff around) It won't show up whatsoever. The appropriate CSS entries have also been made. Also if you notice the alert, it is executed in opera and FF, but it doesn't show up in IE7/IE6. The funny thing is that the demo page of the tooltip plugin works flawlessly with IE. I would appreciate any leads to solve this problem.
[jQuery] Help please on Using ajax url as ID
Hello, I'm sure this is an easy thing but I'm just not finding what i need to fix and understand this Could some one help me fix this ... $.ajax({ url: test.html, cache: false, success: function(html){ $(body).append('div class=resizable style=background- color:#FF;div class=drag-handlespan style=float:left; line- height:25px;WindX/spanimg src=../../close.png class=close style=float:right; alt=Close width=24 height=24//divdiv class=boxCONTENTS id='+url+'/divbr/'); }); $(#url).append(html); } }); thank you for the help here... jeremyBass
[jQuery] Selecting a checkbox by clicking anywhere on a row
Hi there, I'm trying to make a page which automatically toggles a checkbox when you click anywhere on the row. Here's a version I've cut down to the bare bones to illustrate http://dev.savingforchildren.co.uk/mjs/row_select.epl It seems to work fine unless the user actually clicks on the checkbox itself. In this case it seems that it actually gets toggled twice and so reverts to its original state. Any suggestions on the cleanest / simples way to avoid this? (I can think of a few messy ways) Thanks Michael
[jQuery] Re: fastfind menu question
Really no-one who is willing to help me. Roelof On 7 sep, 11:52, roelof [EMAIL PROTECTED] wrote: Nobody who have a example for me ? Roelof On 6 sep, 19:04, roelof [EMAIL PROTECTED] wrote: Hello, For mij website i like to use this script. But i can't find how to implement this. Can someone tell me that, Roelof- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven -
[jQuery] passing data between draggables droppables
Hi all, i need some help from the gurus, so i'm asking here ;-) first of all description of the elements in the page: 1. i have div initialized as draggable like this .draggable({ containment: 'document', opacity: '50', helper: 'clone', start: function () { $.tooltip.block(); }, stop: function (ev, ui) { $.tooltip.block(); }, dragdata: [panel_def.id, i] // setting custom data inside options object }); 2. i have defined many dropzones inside other divs (every one is initialized as droppable) .droppable({ accept: '.bm_dim_name', activeClass: 'bm_droppable_active', over: over_handler, out: out_handler, tolerance: 'pointer', drop: drop_handler, mydata: [dzip, dzpid, dzisp, dzhdid, dzbt]// setting custom data inside options object }); as you can see i'm settting data for draggable and droppable divs. My problem is that in the older version of the ui.droppable.js i was able to read draggable element data(ui.draggable.options.dragdata[0]) inside drop callback. Now there is an error because ui.draggable has no options nor dragdata member. I've compared these two versions of the ui.droppable.js and there are lot of changes. I can't quite figure out how to handle or pass custom data(for draggable element) to drop callback. I need to access draggable element data inside droppable drop callback :-). All examples i've gone through are using .attr(memberName, data) to set or pass data. I don't think this is the best way how to solve this. Any help or suggestion how to set custom data to these elements correct/nice/fast way? Thanks.
[jQuery] Re: $(xx).load can't load css and js in html file on Chrome??
I' sorry, xx just a example, in actually I'm using $ (#content).load(), but the point of this topic is about .load() on Chrome.
[jQuery] Re: How to select a specific descendant of curent object
$('#box').find('.grandchild'); Greeg wrote: div id=box span class=child span class=grandchildhi grandma/span /span /div my question is how reach the .grandchild from .box? in theory, i can just use selector $(#box .grandchild) but this is not much handy when you already have selected the box object and pass it to some function for example... so i gues some travesting method may be avalaible to handle this. i found children(), but it can only reach immediate children of curently selected object (so in this my case, the grandchild is out of reach). so is there a travesting method, or any other method which could select any descendant of curent element? thx in advice
[jQuery] Re: $(xx).load can't load css and js in html file on Chrome??
Gotcha. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jove Sent: Monday, September 08, 2008 10:41 AM To: jQuery (English) Subject: [jQuery] Re: $(xx).load can't load css and js in html file on Chrome?? I' sorry, xx just a example, in actually I'm using $ (#content).load(), but the point of this topic is about .load() on Chrome.
[jQuery] autocomplete questions
Just a couple of things that I would like to know if it's possible: Can you submit additional parameters based on the value of another input field? Can you return all autocomplete results on the focus of the field? More info and a test page are available here: http://education.llnl.gov/test/
[jQuery] Re: New jQuery Website...
It was launched the Friday before last. You can thank Scott Jehl for all the hard work he did! --John On Mon, Sep 8, 2008 at 12:58 PM, Chris Jordan [EMAIL PROTECTED] wrote: I really like the look of the new jQuery website. When did it get launched? My hats off to the designers! It looks fantastic!! :o) Chris -- http://cjordan.us
[jQuery] Re: New jQuery Website...
Yes, it does look great! Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Jordan Sent: Monday, September 08, 2008 12:58 PM To: jQuery Group Subject: [jQuery] New jQuery Website... I really like the look of the new jQuery website. When did it get launched? My hats off to the designers! It looks fantastic!! :o) Chris -- http://cjordan.us No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date: 9/8/2008 7:01 AM
[jQuery] New jQuery Website...
I really like the look of the new jQuery website. When did it get launched? My hats off to the designers! It looks fantastic!! :o) Chris -- http://cjordan.us
[jQuery] IE 6 error message
I'm getting an error message on IE 6 for my selectCombo plugin. However, the message is so not helpful. Does anyone else have experience with this error message: Could not set the selected property. Unspecified error here is the code in question: http://jqueryselectcombo.googlecode.com/files/jquery.selectCombo1.2.5.js here is a test page: http://lasso.pro/selectCombo/
[jQuery] Help with ajaxForm in tabs, file uploads fail with strange error
Hi, I'm going crazy with file upload ans ajaxform when the file field is in a tab. When I click on submit button I got this error in firefox console: form.submit is not a function (?)()()jquery.form.js (riga 223) [Break on this error] form.submit(); I've put a sample page here: http://lab.gianiaz.com/jquery/file_upload_in_tab/index.php Thank you in advance.
[jQuery] Re: Determine if a Javascript has loaded?
Brad has a great idea there. To really protect your page, you need to take one more step. (I assume you have other content on the page, right?) If ibegin.com is down in a way that results in a slow timeout instead of an immediate unavailable response, it will delay loading the rest of your page until the browser times out. To fix this, move the weather gadget out of your page and into an IFRAME. That way, no matter what goes wrong at ibegin.com, it will never affect the rest of your page. Inside the IFRAME, you can use code similar to Brad's. Here's a working test page: http://mg.to/test/ibegin/ibegin.html http://mg.to/test/ibegin/ibegin.html The iframe for this page is in: http://mg.to/test/ibegin/weatherframe.html http://mg.to/test/ibegin/weatherframe.html And here's a broken test page. It's the same code with a deliberate error in the ibegin URL: http://mg.to/test/ibegin/wunder.html http://mg.to/test/ibegin/wunder.html That deliberate error is actually in the iframe code, so it uses a different copy of the iframe just for testing: http://mg.to/test/ibegin/weatherframe1.html http://mg.to/test/ibegin/weatherframe1.html You'll notice it loads a Weather Underground gadget instead of just a static image. That seems more useful than a static image, and the chances of both weather services being down seems pretty low. (And in that case the rest of your page would still load fine because of the iframe.) For reference, here's the iframe tag in ibegin.html: iframe frameborder=0 style=width:220px; height:320px; overflow:hidden; src=weatherframe.html /iframe And here's the complete HTML for the iframe (weatherframe.html): !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN html lang=en head title/title /head body scroll=no style=margin:0; padding:0; script type=text/javascript src=http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/custom.js http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/custom.jsbackground _color=transparentcolor=093384width=200padding=0border_width=0border_co lor=transparentfont_size=18font_family=inheritshowicons=1 background_color=transparentcolor=093384width=200padding=0border_width= 0border_color=transparentfont_size=18font_family=inheritshowicons=1 /script script type=text/javascript if( ! document.getElementsByTagName('div').length ) document.write( 'div style=text-align:center;', 'a href=http://www.wunderground.com/US/AK/Ninilchik.html?bannertypeclick=infob ox http://www.wunderground.com/US/AK/Ninilchik.html?bannertypeclick=infobox ', 'img src=http://banners.wunderground.com/weathersticker/infobox/language/www/US/ AK/Ninilchik.gif border=0 alt=Click for Ninilchik, Alaska Forecast height=108 width=144', '/a', '/div' ); /script /body /html As you can see, the code doesn't use jQuery, and it doesn't use a 2 second timeout either. There's no need for any of that, and you wouldn't want the overhead of loading jQuery in this little iframe anyway. Script tags are executed in the order in which they appear in the source. When the second script tag is run, the first one (loaded from ibegin.com) has already completed execution and created its DIV elements - or failed to execute, whichever the case may be. So the second script tag can immediately test for the div that the first one creates, and if it's not there it does a document.write to add the Weather Undergound gadget instead. -Mike From: bcbounders Brad, Interesting approach... I like it! Now I'll see if I can get this to work on the site... like replacing the missing widget with a static image or something... so the page doesn't have a gaping hole where the weather's supposed to be (which is what was happening when iBegin was down and the widget wouldn't load, on-and-off all day a few days ago). Thanks a lot!!! - John On Sep 7, 6:22 pm, Brad [EMAIL PROTECTED] wrote: Here is a different approach. Include the javascript source for the weather.ibegin.com in the body of your page. On load run a delayed function to see if it has written its forecast to your page. I ran this on a test page and it worked. I could never get the ibegin source to fail, therefore I had to change the script source to something else likehttp://foo.weather.ibegin.com/... to simulate failure. BTW, I was playing with the widget, so my example gets a different forecast than yours. script var ibeginHTML; function ibeginLoaded() { ibeginHTML = $(#ibegin div).html(); if (ibeginHTML == null) { alert('Widget not loaded'); // You'd do something useful here like insert your missing widget image } } function ibeginTest() { // Give the widget a few seconds to load
[jQuery] fixing a few append items
Hello, it's hard to tell if i made a mistake in post so if there is a double I'm sorry... anyways... I'm trying to get this script to work... script type=text/javascript $(function(){ $.ajax({ url: test.html, cache: false, success: function(html){ $ ('body').append('div class=resizable style=background- color:#FF;div class=drag-handlespan style=float:left; line- height:25px;WindXnbsp;nbsp;(drag me)/spanimg src=../../ close.png class=close style=float:right; alt=Close width=24 height=24//divdiv class=boxCONTENTS id=test/div/divbr/ '), $(#test).append(html); } }); var globalIndex = 1; $(.resizable).resizable({start: function() { $(this).css(z-index, + +globalIndex); }, handles: all, autoHide: true, transparent: true, helper: proxy , ghost: true }).click(function() { $(this).css(z- index, ++globalIndex); }).draggable({start: function() { $ (this).css(z-index, ++globalIndex); }, handle: .drag- handle }).hover( function () { $(this).addClass('scalefx');}, function () { $(this).removeClass('scalefx');} ); $(.close).click(function() { $(.scalefx).toggle(scale, {}, 200); }).hover( function () { $(this).css(cursor, pointer);}, function () { $(this).css(cursor, default); }); $AJAXCONTENT='h1Test/h1h1Test/h1h1Test/h1h1Test/ h1h1Test/h1'; $(#replaceME).append('div style=width:100%; height:100%;'+ $AJAXCONTENT+'/div'); }); /script It's hlaf way going right... it's the appended box that is not working... thats the fourth boxes... the static one are working not sure why... thanks for the help here... jeremyBass the link http://www.sjrmc.org/Scripts/jquery.ui-1.6b/demos/functional/Untitled-1.html
[jQuery] Re: fastfind menu question
Here you go... http://labs.activespotlight.net/jQuery/menu_demo.html hope that helps here... Have a great day jeremyBass On Sep 6, 10:04 am, roelof [EMAIL PROTECTED] wrote: Hello, For mij website i like to use this script. But i can't find how to implement this. Can someone tell me that, Roelof
[jQuery] Re: New jQuery Website...
I don't know if this is just me but the site is all kinds of broken... I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs... I'd give a url but ... well it's almost everywhere... cool idea though... On Sep 8, 10:03 am, Rick Faircloth [EMAIL PROTECTED] wrote: Yes, it does look great! Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Jordan Sent: Monday, September 08, 2008 12:58 PM To: jQuery Group Subject: [jQuery] New jQuery Website... I really like the look of the new jQuery website. When did it get launched? My hats off to the designers! It looks fantastic!! :o) Chris --http://cjordan.us No virus found in this incoming message. Checked by AVG -http://www.avg.com Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date: 9/8/2008 7:01 AM
[jQuery] Redirect interupts ajax call
I have the below code, and it works, until I put the js redirect in. Why is this happening? I thought the, function gets called after a succesful ajax call ... anyway a bit of help would be greatly appreciated. $(document).ready(function(){ var url = '/scripts/orders.php'; var returnUrl = '/admin/dashboard'; function finish( message ) { $(#status).html(message); $(#status).effect(highlight, {color: green}, 1000); document.location.href = returnUrl; } $(#approved).click(function(){ $.get(url, { action: approved, orderId: $(#orderId).val() }, finish( 'approved' ) ); }); });
[jQuery] Re: Help please on Using ajax url as ID
Caught a few errors... current code... $(#replaceME).append('div style=width:100%; height:100%;'+ $AJAXCONTENT+'/div'); }); $.ajax({ url: test.html, cache: false, success: function(html){ $(body).append('div class=resizable style=background- color:#FF;div class=drag-handlespan style=float:left; line- height:25px;WindX/spanimg src=../../close.png class=close style=float:right; alt=Close width=24 height=24//divdiv class=boxCONTENTS id='+$url+'/divbr/'), $(#+$url).append(html); } }); but here is the location of the test file... http://www.sjrmc.org/Scripts/jquery.ui-1.6b/demos/functional/Untitled-1.html thanks for any help jeremyBass On Sep 8, 8:59 am, jeremyBass [EMAIL PROTECTED] wrote: Hello, I'm sure this is an easy thing but I'm just not finding what i need to fix and understand this Could some one help me fix this ... $.ajax({ url: test.html, cache: false, success: function(html){ $(body).append('div class=resizable style=background- color:#FF;div class=drag-handlespan style=float:left; line- height:25px;WindX/spanimg src=../../close.png class=close style=float:right; alt=Close width=24 height=24//divdiv class=boxCONTENTS id='+url+'/divbr/'); }); $(#url).append(html); } }); thank you for the help here... jeremyBass
[jQuery] Re: jqModal and IE problems
The issue is that you are using position: relative on one of the parent elements. Thanks, Jayson On Aug 30, 4:38 pm, MorningZ [EMAIL PROTECTED] wrote: hmmm.. missed that option and that did indeed fix my problem i do wonder why that option isn't true by default... oh well, at least i know the answer now
[jQuery] Validate and FileStyle problem. Could someone, please, help me out?
Hello, I am using JQuery Validate plugin to validate a input of type file. I am also styling the same input using FileStyle plugin: http://www.appelsiini.net/projects/filestyle The error message is added to the HTML markup but it is not visible. The generated HTML code is: label for=PathFicheiro/label input class=file style=display: inline; width: 320px;/ div style=background: transparent url(../Image/FileUpload.jpg) no-repeat scroll right center; overflow: hidden; width: 20px; height: 15px; -moz-background-clip: -moz-initial;- moz-background-origin: -moz-initial; -moz-background-inline-policy: - moz-initial; display: inline; position: absolute; input id=Path class= type=file value= name=Path style=position: relative; height: 15px; width: 320px; display:inline; cursor: pointer; opacity: 0; margin-left: -142px;/ label class=Error for=Path generated=trueSelect a document/label /div I am using the following code: $(input[type=file]).filestyle({ image: ../Image/FileUpload.jpg, imageheight: 15, imagewidth: 20, width: 320 }); $(#Create).validate({ errorClass: Error, errorElement: label, errorPlacement: function(error, element) { if (element.is(input[type=file])) error.insertAfter(element.next()); else error.insertAfter(element); }, rules: { Path: { accept: flv|gif|jpg|png|swf, required: true } }, messages: { Path: { accept: Use only files with the following extensions flv, gif, jpg, png ou swf, required: Select a document } } }); Could someone, please, help me in solving this problem? Thanks, Miguel
[jQuery] Re: autocomplete questions
Yes, I saw that little enter then back space. That's horrible user interface to rely upon. Users wouldn't know that and I'd hate to tell them to do that. I'm not sure how I would accomplish your proposed work-around. On 9/8/08 10:24 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For your question 2, if you type something into the last field, and then hit backspace it will show the whole list - so the 0 character setting is working. Without diving into the autocomplete library, I'd wager that it is triggering on keyup. You want to add or modify the handler so that it also fires on focus instead of just keyup. Alternatively you could possibly kludge it by adding an on focus handler that just creates a keyup event. On Sep 8, 9:51 am, Shelane [EMAIL PROTECTED] wrote: Just a couple of things that I would like to know if it's possible: Can you submit additional parameters based on the value of another input field? Can you return all autocomplete results on the focus of the field? More info and a test page are available here: http:// education.llnl.gov/test/
[jQuery] Re: Trying to fix jQeury
Jeremy, this should help explain it: Why http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_wor king_after_an_AJAX_request.3F do my events stop working after an AJAX request? -Mike Hello, I tried to get this to work right... Have the first three(stactic)div's working right. You can drag, resize and close... but the fourth one is not working... can anyone spot why... ?? The end goal is to have all this be created on the fly; the boxes and the ajax content inside the boxes... thank you for the help... Have a great one jeremyBass
[jQuery] Re: autocomplete questions
For Can you submit additional parameters based on the value of another input field? http://docs.jquery.com/Plugins/Autocomplete#Dependencies_between_fields
[jQuery] Re: New jQuery Website...
After my comment, I noticed the same thing as I drilled down into the site. The home page looks fine on IE 7, but I went to a tutorial page, and the page was somewhat garbled. Looks like the CSS layout could use some tweaking. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jeremyBass Sent: Monday, September 08, 2008 1:26 PM To: jQuery (English) Subject: [jQuery] Re: New jQuery Website... I don't know if this is just me but the site is all kinds of broken... I'mean in almost everywere... this is 2 IE7's and 1 IE6's on 3 pcs... I'd give a url but ... well it's almost everywhere... cool idea though... On Sep 8, 10:03 am, Rick Faircloth [EMAIL PROTECTED] wrote: Yes, it does look great! Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Jordan Sent: Monday, September 08, 2008 12:58 PM To: jQuery Group Subject: [jQuery] New jQuery Website... I really like the look of the new jQuery website. When did it get launched? My hats off to the designers! It looks fantastic!! :o) Chris --http://cjordan.us No virus found in this incoming message. Checked by AVG -http://www.avg.com Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date: 9/8/2008 7:01 AM No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.169 / Virus Database: 270.6.17/1655 - Release Date: 9/8/2008 7:01 AM
[jQuery] Re: autocomplete questions
This worked. Thanks. Now, if I can just get something for question 2 :-) On 9/8/08 10:45 AM, MorningZ [EMAIL PROTECTED] wrote: For Can you submit additional parameters based on the value of another input field? http://docs.jquery.com/Plugins/Autocomplete#Dependencies_between_fields
[jQuery] Re: $(xx).load can't load css and js in html file on Chrome??
According to the W3C standard, style elements can only go in the head. It's a dumb rule, but it's the rule. IE and Firefox are happy to put the style in the body, but Safari won't do it (it ignores styles when setting innerHTML) and I assume Chrome, which is based on WebKit, does the same. You have to split your loaded file into separate HTML and CSS, and append a link rel=stylesheet or style to the head for the CSS. It's a pain, but it is the standard so it's hard to fault WebKit. On Sep 8, 11:27 am, Andy Matthews [EMAIL PROTECTED] wrote: Gotcha. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jove Sent: Monday, September 08, 2008 10:41 AM To: jQuery (English) Subject: [jQuery] Re: $(xx).load can't load css and js in html file on Chrome?? I' sorry, xx just a example, in actually I'm using $ (#content).load(), but the point of this topic is about .load() on Chrome.
[jQuery] Re: Selecting a checkbox by clicking anywhere on a row
add return false; to your click handler to keep the click from getting to the checkbox itself. Danny On Sep 8, 10:55 am, Michael Smith [EMAIL PROTECTED] wrote: Hi there, I'm trying to make a page which automatically toggles a checkbox when you click anywhere on the row. Here's a version I've cut down to the bare bones to illustrate http://dev.savingforchildren.co.uk/mjs/row_select.epl It seems to work fine unless the user actually clicks on the checkbox itself. In this case it seems that it actually gets toggled twice and so reverts to its original state. Any suggestions on the cleanest / simples way to avoid this? (I can think of a few messy ways) Thanks Michael
[jQuery] [validate] delayed validation
Hi I have a text field which is evaluated on its onblur event and corrected by inserting the default year. So I might enter '0508' and it will convert to '05/08/2008' onblur. The validate plugin is evaluating the field's value before my plugin can change it so it says 'Please enter a valid date', as '0508' isn't a valid date. I do have my plugin binding to the onblur event before validate (appears first in $.ready) so I am wondering if there is a recommended approach for something like this? Thank you Mike
[jQuery] Re: Tabs and focus() input-Elements issue
I don't understand yet. Can you explain the difference of calling the Tab directly and calling from the tab(s) itself, ideally with code samples? --Klaus On Sep 8, 4:34 pm, qt [EMAIL PROTECTED] wrote: Hi list We use Klaus Hartls' Tabs in a company intranet application. It's just awesome. But there is a little confusion about setting a focus on an input- field (ie. $('#myInput').focus() ). It works well when calling the Tab directly, but it would not focus when calling from the tab(s) itself. I just tested it with the demo pages from Klaus and there it would not work either. Does someone have an example or an idea of how to get around this? Thanks in adv. QT
[jQuery] Re: autocomplete questions
For #2 perhaps the .search option will do the trick? http://docs.jquery.com/Plugins/Autocomplete/search perhaps wire that up to the focus event of the textbox
[jQuery] Re: autocomplete questions
Adding the following resulted in the search string being sent to the server, but the results weren't displayed (I can see the results with Firebug): $('#topic1').focus(function(){ $('#topic1').search(); }); On 9/8/08 11:59 AM, MorningZ [EMAIL PROTECTED] wrote: For #2 perhaps the .search option will do the trick? http:// docs.jquery.com/Plugins/Autocomplete/search perhaps wire that up to the focus event of the textbox
[jQuery] Re: How to select a specific descendant of curent object
Wouldnt this work too?$(#box .grandchild). Glen On Mon, Sep 8, 2008 at 8:27 AM, Ca-Phun Ung [EMAIL PROTECTED] wrote: $('#box').find('.grandchild'); Greeg wrote: div id=box span class=child span class=grandchildhi grandma/span /span /div my question is how reach the .grandchild from .box? in theory, i can just use selector $(#box .grandchild) but this is not much handy when you already have selected the box object and pass it to some function for example... so i gues some travesting method may be avalaible to handle this. i found children(), but it can only reach immediate children of curently selected object (so in this my case, the grandchild is out of reach). so is there a travesting method, or any other method which could select any descendant of curent element? thx in advice
[jQuery] Fire events programmatically
Sometimes it's needed to create an event programmatically. (Which is different from running an event function (triggering) This can be done by the following fire code var el=document.getElementById(ID1) fire(el,'change') function fire(evttype) { if (document.createEvent) { var evt = document.createEvent('HTMLEvents'); evt.initEvent( evttype, false, false); el.dispatchEvent(evt); } else if (document.createEventObject) { el.fireEvent('on' + evttype); } } looks like this trick is not yet in jQuery, perhaps for a reason? Huub Regards
[jQuery] making a advance image map....
Hi I am trying to make a image map of the U.S I would like to know what's the best way to tackle this. I already have the image I am going to try and work with. I already made the html code of it. I would like to know if javascript can help me any to make a interactive map of the U.S I want to try and get a data feed or weather and be able to mimick a current weather map while this map still being a image map meaning every state is clickable and can have a tool tip pop up and show text which would say the states name.
[jQuery] Re: Superfish: Gap between top level menu and popup..
change the default .for the horizontal menu of sf-menu a { padding: . 75em 1em;} to .25em 1em and a gap will appear from the menu to where the drop down appears. I was implementing your comment about reducing the height of the menu by reducing the top and bottom padding on the anchor elements. What are the spots on the default css to reduce the height?
[jQuery] Re: Help please on Using ajax url as ID
URLs contain characters that aren't allowed in IDs. the spec (http:// www.w3.org/TR/html401/types.html#type-name) says that IDs must use only a-Z, 0-9, _, : and . -micah On Sep 8, 9:11 am, jeremyBass [EMAIL PROTECTED] wrote: Caught a few errors... current code... $(#replaceME).append('div style=width:100%; height:100%;'+ $AJAXCONTENT+'/div'); }); $.ajax({ url: test.html, cache: false, success: function(html){ $(body).append('div class=resizable style=background- color:#FF;div class=drag-handlespan style=float:left; line- height:25px;WindX/spanimg src=../../close.png class=close style=float:right; alt=Close width=24 height=24//divdiv class=boxCONTENTS id='+$url+'/divbr/'), $(#+$url).append(html); } }); but here is the location of the test file...http://www.sjrmc.org/Scripts/jquery.ui-1.6b/demos/functional/Untitled... thanks for any help jeremyBass On Sep 8, 8:59 am, jeremyBass [EMAIL PROTECTED] wrote: Hello, I'm sure this is an easy thing but I'm just not finding what i need to fix and understand this Could some one help me fix this ... $.ajax({ url: test.html, cache: false, success: function(html){ $(body).append('div class=resizable style=background- color:#FF;div class=drag-handlespan style=float:left; line- height:25px;WindX/spanimg src=../../close.png class=close style=float:right; alt=Close width=24 height=24//divdiv class=boxCONTENTS id='+url+'/divbr/'); }); $(#url).append(html); } }); thank you for the help here... jeremyBass
[jQuery] Re: Determine if a Javascript has loaded?
Mike, WOW! Thanks so much! This is TOTALLY the kind of thing I was looking for. Thanks for taking the time to do such a thorough mock-up! You ROCK, dude! Thanks... can't wait to go try this out! - John On Sep 8, 10:18 am, Michael Geary [EMAIL PROTECTED] wrote: Brad has a great idea there. To really protect your page, you need to take one more step. (I assume you have other content on the page, right?) If ibegin.com is down in a way that results in a slow timeout instead of an immediate unavailable response, it will delay loading the rest of your page until the browser times out. To fix this, move the weather gadget out of your page and into an IFRAME. That way, no matter what goes wrong at ibegin.com, it will never affect the rest of your page. Inside the IFRAME, you can use code similar to Brad's. Here's a working test page: http://mg.to/test/ibegin/ibegin.htmlhttp://mg.to/test/ibegin/ibegin.html The iframe for this page is in: http://mg.to/test/ibegin/weatherframe.htmlhttp://mg.to/test/ibegin/weatherframe.html And here's a broken test page. It's the same code with a deliberate error in the ibegin URL: http://mg.to/test/ibegin/wunder.htmlhttp://mg.to/test/ibegin/wunder.html That deliberate error is actually in the iframe code, so it uses a different copy of the iframe just for testing: http://mg.to/test/ibegin/weatherframe1.htmlhttp://mg.to/test/ibegin/weatherframe1.html You'll notice it loads a Weather Underground gadget instead of just a static image. That seems more useful than a static image, and the chances of both weather services being down seems pretty low. (And in that case the rest of your page would still load fine because of the iframe.) For reference, here's the iframe tag in ibegin.html: iframe frameborder=0 style=width:220px; height:320px; overflow:hidden; src=weatherframe.html /iframe And here's the complete HTML for the iframe (weatherframe.html): !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN html lang=en head title/title /head body scroll=no style=margin:0; padding:0; script type=text/javascript src=http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/custom.js http://weather.ibegin.com/js/us/ak/ninilchik/0/0/1/1/0/custom.jsback... _color=transparentcolor=093384width=200padding=0border_width=0border_c o lor=transparentfont_size=18font_family=inheritshowicons=1 background_color=transparentcolor=093384width=200padding=0border_width = 0border_color=transparentfont_size=18font_family=inheritshowicons=1 /script script type=text/javascript if( ! document.getElementsByTagName('div').length ) document.write( 'div style=text-align:center;', 'a href=http://www.wunderground.com/US/AK/Ninilchik.html?bannertypeclick=infob ox http://www.wunderground.com/US/AK/Ninilchik.html?bannertypeclick=infobox', 'img src=http://banners.wunderground.com/weathersticker/infobox/language/www/US/ AK/Ninilchik.gif border=0 alt=Click for Ninilchik, Alaska Forecast height=108 width=144', '/a', '/div' ); /script /body /html As you can see, the code doesn't use jQuery, and it doesn't use a 2 second timeout either. There's no need for any of that, and you wouldn't want the overhead of loading jQuery in this little iframe anyway. Script tags are executed in the order in which they appear in the source. When the second script tag is run, the first one (loaded from ibegin.com) has already completed execution and created its DIV elements - or failed to execute, whichever the case may be. So the second script tag can immediately test for the div that the first one creates, and if it's not there it does a document.write to add the Weather Undergound gadget instead. -Mike From: bcbounders Brad, Interesting approach... I like it! Now I'll see if I can get this to work on the site... like replacing the missing widget with a static image or something... so the page doesn't have a gaping hole where the weather's supposed to be (which is what was happening when iBegin was down and the widget wouldn't load, on-and-off all day a few days ago). Thanks a lot!!! - John On Sep 7, 6:22 pm, Brad [EMAIL PROTECTED] wrote: Here is a different approach. Include the javascript source for the weather.ibegin.com in the body of your page. On load run a delayed function to see if it has written its forecast to your page. I ran this on a test page and it worked. I could never get the ibegin source to fail, therefore I had to change the script source to something else likehttp://foo.weather.ibegin.com/... to simulate failure. BTW, I was playing with the widget, so my example gets a different forecast than yours. script var ibeginHTML; function ibeginLoaded() { ibeginHTML = $(#ibegin
[jQuery] Re: autocomplete questions
Sorry I wasn't very clear, I don't mean to have your users do that, I mean it gave you a clue how that function worked. You need to add an on-focus event to the field that then bubbles a key- up event that will trigger the autocomplete for the user. http://docs.jquery.com/Release:jQuery_1.2/Events On Sep 8, 11:07 am, Shelane Enos [EMAIL PROTECTED] wrote: This worked. Thanks. Now, if I can just get something for question 2 :-) On 9/8/08 10:45 AM, MorningZ [EMAIL PROTECTED] wrote: For Can you submit additional parameters based on the value of another input field? http://docs.jquery.com/Plugins/Autocomplete#Dependencies_between_fields
[jQuery] Re: Selecting a checkbox by clicking anywhere on a row
Try the following code: $('.myrow').children().click(function() { if ($(this).children('[EMAIL PROTECTED]').length == 0) { var check_id = '#' + $(this).parent().attr('id') + 'checkbox'; $(check_id).attr('checked', !$(check_id).attr('checked')); } }); On Sep 8, 8:55 am, Michael Smith [EMAIL PROTECTED] wrote: Hi there, I'm trying to make a page which automatically toggles a checkbox when you click anywhere on the row. Here's a version I've cut down to the bare bones to illustrate http://dev.savingforchildren.co.uk/mjs/row_select.epl It seems to work fine unless the user actually clicks on the checkbox itself. In this case it seems that it actually gets toggled twice and so reverts to its original state. Any suggestions on the cleanest / simples way to avoid this? (I can think of a few messy ways) Thanks Michael