Re: [jQuery] Re: Having hard time with customizing scroll bars
Yes you can - did you see the os examples? this plugin has an extensive set of demos and is extremely versatile http://www.kelvinluck.com/assets/jquery/jScrollPane/examples.html http://www.kelvinluck.com/assets/jquery/jScrollPane/examples.html - S 2010/1/16 swfobject_fan guru4v...@gmail.com Thanks dave, but I can't change the look of the scroll bars with this right? I was looking for something similar to flexcroll. http://www.hesido.com/web.php?page=customscrollbar On 16 Jan, 19:49, Dave Methvin dave.meth...@gmail.com wrote: Where can I find more about those plugins? This search turned up jScrollPane, looks like that is what you want. http://lmgtfy.com/?q=jquery+scroll+plugin
[jQuery] [Superfish] Left side dropdown menu
Hi, I have 3 level menu. I want the sub menus to be open in left direction instead of right. Because the menu is in top right corner of the website, and when submenu are displayed. They goes outside the website window and browser shows the scroll bar, which doesnt look nice. I hope, u guys understand what i m trying to say. Please take a look at the screenshot to get the exact idea. http://i48.tinypic.com/2sa1dv9.jpg Thanks
Re: [jQuery] .hide and .show div's
Look at jquerys find functions Sent from my iPhone On 11 Nov 2009, at 12:36, David pr davidpric...@gmail.com wrote: Hello, Could you help me please. I have a list of hotel which I .hide and .show div's to show more or less info. so i have div class=Hide-BAT1 ... to div class=Hide-Bat55 … when the user press a button I use the code var Hcode = $(this).attr(custom); $('div.Hide-' + Hcode).toggle(); but when the page loads how do I hide this div automatically ? I have used for (i = 0; i = 70; i++) { $(div.Hide-BAT + i).hide(); } But its slow and probably not the best way to do it ? Hope you can help and this makes sense. Regards David
Re: [jQuery] Iterating over a list
$(this).fadeOu(duration, function() { Typo Sent from my iPhone On 8 Nov 2009, at 07:27, Michel Belleville michel.bellevi...@gmail.com wrote: $(this).fadeOu(duration, function() {
Re: [jQuery] Re: Why jQuery is not working on my page ?
li#Story would be more efficient Sent from my iPhone On 5 Nov 2009, at 22:24, vmrao maheshpav...@gmail.com wrote: I just got rid of unnecessary '(function($){ ' and it worked. On Nov 5, 5:17 pm, vmrao maheshpav...@gmail.com wrote: Here is my code. I have included jQuery library. script (function($){ $(document).ready(function(){ $('ul.News li[id*=Story]').each(function() { alert('test'); }); });}); /script ul class=News li id=Story1My Stroy1/li li id=Story2My Stroy2/li li id=Story3My Stroy3/li li id=MiscMiscelaneous/li /ul
[jQuery] Re: images show before jquery and cycle plugin work their magic
Charlie, Thanks for the reply, unfortunately the changes you suggested do not seem to make a difference. Please refer to my previous link to see the same issue happening with the changes applied. On Oct 22, 7:21 am, Charlie charlie...@gmail.com wrote: try giving the carousel UL a huge width , say 10,000 px, and carousel wrapper set height, width and overflow : hidden this is done by the script also but until script fully fires your css should make up for it Sam wrote:I'm not entirely sure that some of these fixes apply to my situation as I'm not using cycle plugin. I am having the same issue as the original poster however, please see for yourself.http://samgabellshoots.com/Any pointers on how to fix or at least 'hide' the issue until after load would be greatly appreciated :) On Oct 21, 4:40 pm, Mike Alsupmal...@gmail.comwrote:I've had this issue before. As Karl suggests, I was able to fix it by giving the parent element (the one calling the cycle plugin) a fixed height (the height of the images you're cycling) and an overflow of hidden in the CSS. If the slides are of different heights, set the height to the height of the first slide.Another approach is to have a CSS rule that hides all but the first slide.
[jQuery] Re: Get file specific parts from input file type
jquery ajax and php On Thu, Oct 22, 2009 at 8:47 PM, Buntu J buntu.w...@gmail.com wrote: Hi, I need to get the filename, basename, dirname using jQuery. Can anyone please let me know if there is any utility that will take care of windows/mac/linux file paths. Thanks
[jQuery] Re: images show before jquery and cycle plugin work their magic
I am having the same issue that Thor describes, and although I have tried the fixes suggested by Karl I have been unable to fix the issue. Maybe there is a different way to achieve the goal? Perhaps there is a way to pre-load the entire jcarousel container and then place it in the page rather then have it build the carousel as it loads? Cheers, Sam On Oct 20, 6:35 pm, Karl Swedberg k...@englishrules.com wrote: If you have large images, they would take longer to load. No way around that. One thing you can do to avoid having the images span down the page is to add a style declaration for them in your stylesheet: position:absolute; I believe the cycle plugin sets the cycled elements to position:absolute as a safeguard in case it hasn't been done in the css already, but you should really do that yourself in the stylesheet. Also, make sure you set the container element to position: relative (if it's position: absolute, you can keep it that way) and set its overflow property hidden and give it explicit height and width. You still might see images loading one after the other, but at least they'll be overlapping, confined within the same space as dictated by the height and width of the container element. There are ways to get around this last issue, too, but first see how my suggestions so far work for you. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Oct 20, 2009, at 7:38 PM, thor wrote: Hi, I am looking for assistance with a loading problem and my apologies if this is beyond the scope of this group. I am running the lastest jQuery and Jquery cycle plugin. I haven't done any customization per se only trying to get the two components to work. I am at the point where things seem to work, however when the page loads all 4 images in my DIV span down the page and then merge into one at the end of the page load. I've seen other implementation of these 2 components but the images don't flash first and then merge. Do you believe I need to create another function or put some more logic into my page to have it load correctly. My goal would be to have everything seemlessly loaded from the start. I've explored the document.ready function and believe I have it in the correct location of my site. No matter what though other parts of the page load first I realize there are a lot of unknown variables but maybe someone has an idea? My site is clippervacations.com and I am going to change out the current homepage banners with jquery functionality. Nothing is LIVE right now, but perhaps someone can get an idea. Thanks, Thor
[jQuery] Re: images show before jquery and cycle plugin work their magic
I'm not entirely sure that some of these fixes apply to my situation as I'm not using cycle plugin. I am having the same issue as the original poster however, please see for yourself. http://samgabellshoots.com/ Any pointers on how to fix or at least 'hide' the issue until after load would be greatly appreciated :) On Oct 21, 4:40 pm, Mike Alsup mal...@gmail.com wrote: I've had this issue before. As Karl suggests, I was able to fix it by giving the parent element (the one calling the cycle plugin) a fixed height (the height of the images you're cycling) and an overflow of hidden in the CSS. If the slides are of different heights, set the height to the height of the first slide. Another approach is to have a CSS rule that hides all but the first slide.
[jQuery] Facebox Youtube stopVideo
I've got a page that opens a youtube video with facebox. The facebox closes correctly but the video doesn't stop playing. So the sound carries on even if the video isn't visible: This is the code I've tryed: div id=ytVid style=display: none div id=ytapiplayer You need Flash player 8+ and JavaScript enabled to view this video. /div /div script type=text/javascript // ![CDATA[ // allowScriptAccess must be set to allow the Javascript from one // domain to access the swf on the youtube domain var params = { allowScriptAccess: always, bgcolor: #cc }; // this sets the id of the object or embed tag to 'myytplayer'. // You then use this id to access the swf and make calls to the player's API var atts = { id: myytplayer }; swfobject.embedSWF(http://www.youtube.com/v/ma9I9VBKPiw? border=0amp;enablejsapi=1amp;playerapiid=ytplayer, ytapiplayer, 425, 344, 8, null, null, params, atts); $(document).bind('close.facebox', function() { document.getElementById(myytplayer).stopVideo(); }) //]] /script
[jQuery] Re: Replace image with SWF onClick
you want to replace them when the user clicks the anchor tag? or replace the anchor tag onload? http://flowplayer.org/documentation/users-guide.html http://flowplayer.org/documentation/users-guide.html - S 2009/10/17 knal knalp...@gmail.com Hi group, I'm trying to achieve something (which doesn't seem to difficult to me) but i can't get it to work; I want to embed video's through a swf-videoplayer on my website. The idea is that i have (say 750 * 400 px) images wrapped in links. The links point at the videofile. If the user clicks the link, i want to replace the link+image by the swf video with the same dimensions... Hope this kind of makes sense. Thanks in advance, Knal
[jQuery] Why no color animation built in?
I was just wondering, why doesn't jQuery have color animations built- in to the library? JavaScript has hexadecimal number literals (0xaabbcc), so it could be the way to define colors in the params argument object. An array literal could also be used to set colors. Why is it that jQuery hasn't implemented this by default?
[jQuery] Re: Why no color animation built in?
Well why don't they bundle this in with the jQuery standard library? On Oct 16, 11:21 am, Charlie charlie...@gmail.com wrote: jQueryUi has color animationshttp://jqueryui.com/demos/animate/ Sam wrote:I was just wondering, why doesn't jQuery have color animations built- in to the library? JavaScript has hexadecimal number literals (0xaabbcc), so it could be the way to define colors in the params argument object. An array literal could also be used to set colors. Why is it that jQuery hasn't implemented this by default?
[jQuery] Validating Australian ABN numbers
ABN - Australian Business Numbers I knew they had to be numeric and 11 digits. Then i found this: http://www.ato.gov.au/businesses/content.asp?doc=/content/13187.htmpc=001/003/021/002/001mnu=610mfp=001/003st=cy=1 Which explains quite nicely how to validate a number. So I thought I would share this: function abnValidate(value, element){ if (value.length != 11 || isNaN(parseInt(value))) return false; var weighting = [10,1,3,5,7,9,11,13,15,17,19]; var tally = (parseInt(value[0]) - 1) * weighting[0]; for (var i = 1; i value.length; i++){ tally += (parseInt(value[i]) * weighting[i]); } return (tally % 89) == 0; } jQuery.validator.addMethod( 'abnValidate', abnValidate, 'This ABN is not valid' );
[jQuery] Re: append()
or $(#id_percent_complete).parent().parent() On Oct 13, 2:04 pm, Simon Morris moz...@gmail.com wrote: Hello, I'm having some problems understanding the append() function. What I'd like to do is select an element using it's ID and add a row to the table with a HTML form element. The table is dynamically generated using a Django template ( form.as_table() ) so I'm not able to alter the original HTML markup too much. If I had a table like this... trthlabel for=id_task_nameTask Name:/label/thtdinput type=text name=task_name id=id_task_name //td/tr trthlabel for=id_percent_completePercent complete:/label/thtdinput type=text name=percent_complete id=id_percent_complete //td/tr trthlabel for=id_start_dateStart Date:/label/thtdinput type=text name=start_date id=id_start_date //td/tr trthlabel for=id_finish_dateFinish Date:/label/thtdinput type=text name=finish_date id=id_finish_date //td/tr trthlabel for=id_costCost:/label/thtdinput type=text name=cost id=id_cost //td/tr trthlabel for=id_historyTask History:/label/thtdtextarea id=id_history readonly=True rows=10 cols=40 name=history/textarea/td/tr ... I could select the right part of the markup with $(#id_percent_complete).append(trthNew Label/thtdNew Form Element/td/tr) But as the documentation says it appends to the inside of the matched element, rather than adding it to the end. Because the element I have selected is a input it attaches my new content inside a /input which isn't the result I am after. Apologies if the above is confusing - can anyone help? Thanks ~sm
[jQuery] Re: What is the more correct/efficient selector?
$(select).change(function() { alert($(this).attr(value)); }); On Tue, Oct 13, 2009 at 4:00 PM, Mike mgor...@gmail.com wrote: $(select).change(function() { alert($(select option:selected).val()); }); OR $(select).change(function() { alert($(this).attr(value)); }); I am specifically looking at the selector used in the alert. From my testing the result in the same correct values to be displayed.
[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?
How to change the default position of an error message in Jquey form validation plugin? This is easy to do. Just create a label element where you want the error message to appear. If the field you are validating is called foo your label would look like: label for=foo class=errorThis field is required/label You must put class=error or if you have overridden the default error class name you should set it to whatever you changed it too. You also need to have the error message in the label as validate will now ignore whatever is defined in the messages config (i think??). You can put that label anywhere on the page... probably still has to be inside the form.
[jQuery] Re: Binding a unique single and double click command
Thanks for the help! I nailed it with the following: $('.todo_item h2').live('click', function() { clicks++; x = $(this); if (clicks == 1) singleClick = setTimeout(function() { clicks = 0; showExtra(x); }, 300); if (clicks == 2) { clearTimeout(singleClick); clicks = 0; editInPlace(x); }; });
[jQuery] jQuery slideup/slidedown iphone (3rd click bug)
I'm currently porting works website for iphone. I've wrote some jquery for sliding up/down divs: $(document).ready(function(){ //Corners $('#insideContainer').corner('20px'); $('p.link a').removeAttr('href'); $('p.link a').css('cursor','pointer'); $('p.link a').click(function(){ $('p.link a').css('color','#ff'); $(this).css('color','#dd'); var page = $(this).attr('id'); var contentDiv = $(this).attr('rel'); $('#'+contentDiv).load(page +' #toload'); $('.content').slideUp(1500); $('#'+contentDiv).slideDown(500); }); }); It works well until I open the 3rd unique div. (opening and closing 2 unique divs multiple times works perfectly :s). When the 3rd individual div is opened it slides down approximately 5 pixels and freezes Any help would be great
[jQuery] Re: jQuery slideup/slidedown iphone (3rd click bug)
The site can be viewed at http://d2d.samstestdomain.com On Sep 30, 4:27 pm, Sam Doyle sammeh@gmail.com wrote: I'm currently porting works website for iphone. I've wrote some jquery for sliding up/down divs: $(document).ready(function(){ //Corners $('#insideContainer').corner('20px'); $('p.link a').removeAttr('href'); $('p.link a').css('cursor','pointer'); $('p.link a').click(function(){ $('p.link a').css('color','#ff'); $(this).css('color','#dd'); var page = $(this).attr('id'); var contentDiv = $(this).attr('rel'); $('#'+contentDiv).load(page +' #toload'); $('.content').slideUp(1500); $('#'+contentDiv).slideDown(500); }); }); It works well until I open the 3rd unique div. (opening and closing 2 unique divs multiple times works perfectly :s). When the 3rd individual div is opened it slides down approximately 5 pixels and freezes Any help would be great
[jQuery] Binding a unique single and double click command
I'm trying to write some jQuery to do the following: If a user clicks once on an object, do X. If a user clicks twice on an object, do Y, but not X. I've been having some trouble with this as, obviously, a double-click will trigger the single-click twice. Here is a failed attempt: $('.todo_item h2').live('click', function() { var startTime = new Date(); $(this).mousedown(function() { var endTime = new Date(); if (Math.abs(endTime - startTime) 300) { editInPlace } else { showExtra } }); }); where editInPlace and showExtra are some functions I have defined elsewhere in the document. This method, however, relies on a second click, or mousedown at least, to work, which fails if the user only clicks once. I have also looked into setTimeout but without any fruitful results. Anyone have any suggestions on how to code thsi?
[jQuery] Re: select cannot check checkboxes' states
$(input[type=checkbox]:checked).each(function()...); On Thu, Sep 24, 2009 at 9:59 AM, Xi Shen davidshe...@googlemail.com wrote: hi, i have a group of check boxes, and i want to iterator over all the checked ones. i use the following code, but without luck. $(input[type=checkbox][checked=true]).each(function()...); can someone give a better solution? -- Best Regards, David Shen http://twitter.com/davidshen84/ http://meme.yahoo.com/davidshen84/
[jQuery] jQuery crashing the page
I've got 2 pages: a current events page and a past events page the current events page loads fine as there is only about 10 events the past events page takes about 30 seconds to load and will crash if u click your mouse in the loading time The pages are near identical the only difference is the query that selects the events ( versus ) The page loads immediately without: script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.2/jquery.min.js/script But when i put it back in the above happens. Any ideas welcome! PC I'm using jQuery.roundedcorners. Sam
[jQuery] Re: Recommend a JS enabled/browser growler script/plug-in?
$.browser On Sep 21, 5:38 pm, ldexterldesign m...@ldexterldesign.co.uk wrote: Cheers man. And the browser detection..? Thanks, On Sep 21, 5:14 pm, Liam Potter radioactiv...@gmail.com wrote: use noscript and conditional comments. ldexterldesign wrote: // This site works best with JavaScript enabled and not using Internet Explorer. Take your pick of the others instead: Firefox, Google Chrome, Safari, Opera... Anyone? :P Thanks,
[jQuery] Re: jQuery(window).width() not registering sizes lower than 497 in Firefox.
I just ran this: script type=text/javascript !-- $('body').css('width','100px'); $('body').append('br /'+$('body').width()); -- /script and it yielded the correct result in firefox 3.5.3 On Sep 21, 8:03 pm, indigo0086 indigo0...@gmail.com wrote: I'm working on implementing a menu and need to have information when the menu size is larger than the width of the window. The problem is that pas a certain point, jQuery(body).width() keeps registering 497, despite being much smaller than that. Has anyone had this issue
[jQuery] Re: [Attrib external not working...]
$(document).ready(function(){ $(a rel='external').attr(target,_blank); });
[jQuery] Re: [Attrib external not working...]
$(document).ready(function(){ $(a [rel='external]').attr(target,_blank); }); Sorry
[jQuery] Re: Browser sniffing - the correct way?
Often the best solution is to simply avoid troublesome features. I think this article explains the concept well http://www.alistapart.com/articles/testdriven as simple as possible but not simpler 30,000 registered at TNL.net that would be an awful lot to check; which is why checking is the user supports the correct implementation of box model or cssFloat depending on what your using is much smarter - S 2009/9/21 RobG robg...@gmail.com On Sep 18, 1:32 am, ldexterldesign m...@ldexterldesign.co.uk wrote: [...] This still leaves the issue of targeting browsers with JS/jQuery. You still seem to be missing the message: trying to compensate for browser quirks by detecting specific browsers is a flawed strategy. Browser detection is usually based on the user agent string, of which there are over 30,000 registered at TNL.net. A friend of mine just recommend:http://www.quirksmode.org/js/detect.html Don't use it. Don't even consider detecting specific browsers for javascript quirks. For HTML or CSS hacks, go to relevant forums. Often the best solution is to simply avoid troublesome features. -- Rob
[jQuery] Re: jQuery PDF Viewer?
I have'nt tried this but it does look goodhttp://pdfobject.com/ - S 2009/9/16 benji++ bheneg...@speakeasy.net I'm looking for something that can display a PDF in a way similar to a typical jQuery image gallery (or a desktop PDF viewer, e.g. Acrobat or Preview). I tried out Mike Alsup's jQuery Media Plugin (www.malsup.com/jquery/media/), thinking that the iframe player might do the trick. But of course, I still get the default browser behavior for a PDF, which in most cases (like Firefox) is to not display it at all. Works great in Safari, though, especially with the AdobePDFViewer.plugin. So does anyone know of something that could enable PDFs to be displayed on the page?
[jQuery] error in ie7 ie8 only
js code: function jLinkCall(e, a, o) { var jUrl = null, jArgs = null, obTitle = ''; // console.info('jLinkCall'); // console.info(e); // console.info(a); // console.info($(o).attr('href')); jUrl = $(o).attr('href') + ''; jUrl = jUrl.replace(/.html/, ''); if($(o).attr('title')) obTitle = $(o).attr('title'); // block with growl //$('#body').growlUI('Growl Notification', 'Have a nice day!'); $('.body').block({ message: 'img src=/img/2-0.gif /', css: { border: '1px solid #FFF; background: #FFF;' }}) $.post('./json.php?p='+jUrl, null, jLinkComplete, json) // convert the html url to json url // process the json object // oncomplete call jLinkComplete } function jLinkComplete(data, status) { // console.info('jLinkComplete'); // console.info(data.titleStr); // console.info(status); $('body').attr('class', '').addClass(data.titleStr); $('.body').empty().html(data.contentStr).unblock(); init(); } set up in dom ready $('.tabs a').live('click', function(event, args) { jLinkCall(event, args, this); event.preventDefault(); event.stopPropagation(); return false; }); This is an issue that only is apparent in ie7 8 all works without issue in other browsers - not ie 6 though (but who cares) any ideas? - S
[jQuery] Re: error in ie7 ie8 only
following up on that when debugging I can continue through the error and it works as expected. but with debugging off the process is interrupted - S 2009/9/15 Sam Sherlock sam.sherl...@gmail.com js code: function jLinkCall(e, a, o) { var jUrl = null, jArgs = null, obTitle = ''; // console.info('jLinkCall'); // console.info(e); // console.info(a); // console.info($(o).attr('href')); jUrl = $(o).attr('href') + ''; jUrl = jUrl.replace(/.html/, ''); if($(o).attr('title')) obTitle = $(o).attr('title'); // block with growl //$('#body').growlUI('Growl Notification', 'Have a nice day!'); $('.body').block({ message: 'img src=/img/2-0.gif /', css: { border: '1px solid #FFF; background: #FFF;' }}) $.post('./json.php?p='+jUrl, null, jLinkComplete, json) // convert the html url to json url // process the json object // oncomplete call jLinkComplete } function jLinkComplete(data, status) { // console.info('jLinkComplete'); // console.info(data.titleStr); // console.info(status); $('body').attr('class', '').addClass(data.titleStr); $('.body').empty().html(data.contentStr).unblock(); init(); } set up in dom ready $('.tabs a').live('click', function(event, args) { jLinkCall(event, args, this); event.preventDefault(); event.stopPropagation(); return false; }); This is an issue that only is apparent in ie7 8 all works without issue in other browsers - not ie 6 though (but who cares) any ideas? - S
[jQuery] Re: error in ie7 ie8 only
seems this may be relevant [1] but I can't find where I can parseInt - might be a plugin that is causing the issue I am using blockui - I thought that noticing that blockui uses this sz() which parses the int - maybe I need to make another plugin use sz() this results from the following $('.tabs a, a.groove').live('click', function(event, args) { jLinkCall(event, args, this); event.preventDefault(); event.stopPropagation(); return false; }); [1] http://stackoverflow.com/questions/933564/jquery-widthval-error-in-ie-invalid-argument - S 2009/9/15 Sam Sherlock sam.sherl...@gmail.com following up on that when debugging I can continue through the error and it works as expected. but with debugging off the process is interrupted - S 2009/9/15 Sam Sherlock sam.sherl...@gmail.com js code: function jLinkCall(e, a, o) { var jUrl = null, jArgs = null, obTitle = ''; // console.info('jLinkCall'); // console.info(e); // console.info(a); // console.info($(o).attr('href')); jUrl = $(o).attr('href') + ''; jUrl = jUrl.replace(/.html/, ''); if($(o).attr('title')) obTitle = $(o).attr('title'); // block with growl //$('#body').growlUI('Growl Notification', 'Have a nice day!'); $('.body').block({ message: 'img src=/img/2-0.gif /', css: { border: '1px solid #FFF; background: #FFF;' }}) $.post('./json.php?p='+jUrl, null, jLinkComplete, json) // convert the html url to json url // process the json object // oncomplete call jLinkComplete } function jLinkComplete(data, status) { // console.info('jLinkComplete'); // console.info(data.titleStr); // console.info(status); $('body').attr('class', '').addClass(data.titleStr); $('.body').empty().html(data.contentStr).unblock(); init(); } set up in dom ready $('.tabs a').live('click', function(event, args) { jLinkCall(event, args, this); event.preventDefault(); event.stopPropagation(); return false; }); This is an issue that only is apparent in ie7 8 all works without issue in other browsers - not ie 6 though (but who cares) any ideas? - S
[jQuery] Re: error in ie7 ie8 only
narrowed down but not solved this causes error in ie $('.body').block({ message: 'img src=/img/2-0.gif /', css: { border: '1px solid #FFF; background: #FFF;' }}) yet this works $('.body').block({ message: 'h1Processing/h1', css: { border: '3px solid #a00' } }); so bit of further investigation and I now understand it css: { border: '1px solid #FFF; background: #FFF;' } needed to be (no semi colons and make the css setting a JSON object - ff et al are more forgiving) css: { border: '1px solid #FFF', background: '#FFF' } - S 2009/9/15 Sam Sherlock sam.sherl...@gmail.com seems this may be relevant [1] but I can't find where I can parseInt - might be a plugin that is causing the issue I am using blockui - I thought that noticing that blockui uses this sz() which parses the int - maybe I need to make another plugin use sz() this results from the following $('.tabs a, a.groove').live('click', function(event, args) { jLinkCall(event, args, this); event.preventDefault(); event.stopPropagation(); return false; }); [1] http://stackoverflow.com/questions/933564/jquery-widthval-error-in-ie-invalid-argument - S 2009/9/15 Sam Sherlock sam.sherl...@gmail.com following up on that when debugging I can continue through the error and it works as expected. but with debugging off the process is interrupted - S 2009/9/15 Sam Sherlock sam.sherl...@gmail.com js code: function jLinkCall(e, a, o) { var jUrl = null, jArgs = null, obTitle = ''; // console.info('jLinkCall'); // console.info(e); // console.info(a); // console.info($(o).attr('href')); jUrl = $(o).attr('href') + ''; jUrl = jUrl.replace(/.html/, ''); if($(o).attr('title')) obTitle = $(o).attr('title'); // block with growl //$('#body').growlUI('Growl Notification', 'Have a nice day!'); $('.body').block({ message: 'img src=/img/2-0.gif /', css: { border: '1px solid #FFF; background: #FFF;' }}) $.post('./json.php?p='+jUrl, null, jLinkComplete, json) // convert the html url to json url // process the json object // oncomplete call jLinkComplete } function jLinkComplete(data, status) { // console.info('jLinkComplete'); // console.info(data.titleStr); // console.info(status); $('body').attr('class', '').addClass(data.titleStr); $('.body').empty().html(data.contentStr).unblock(); init(); } set up in dom ready $('.tabs a').live('click', function(event, args) { jLinkCall(event, args, this); event.preventDefault(); event.stopPropagation(); return false; }); This is an issue that only is apparent in ie7 8 all works without issue in other browsers - not ie 6 though (but who cares) any ideas? - S
[jQuery] Re: KFManager v1.0
great work Ken on the mce page the normal mce manager opens for me - and as Cyril said the page is title FCK on the fck page you open KFManager by clicking in the text box above the editor whereas the mce example does not have a way of opening kfmanager it would be better to replace normal function of the image icon (and other media too eg flash) witht the kfmanager - S 2009/8/20 Cyril Lopez loveisthe...@gmail.com On your tinyMce page : http://trinhvietcuong.com/ken/tinymce.html you have KFManager for FCKeditor as page label... -- Cyril Lopez Développeur web www.nethik.fr 2009/8/20 Ken kenpha...@gmail.com without license GPL, MIT. I'm happy when you want to use and develop KFM 2009/8/20 Meroe whme...@gmail.com Well yea. Let's say I want to put this into a commercial app. I need to know the type of license this was released under so I can make a decision and be legit The download has no license information..GPL? MIT? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Ken Phan Sent: Wednesday, August 19, 2009 3:15 PM To: jQuery (English) Subject: [jQuery] Re: KFManager v1.0 u want licensing terms ? On Aug 19, 2:54 am, Meroe whme...@gmail.com wrote: What are the licensing terms? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Ken Phan Sent: Tuesday, August 18, 2009 12:21 PM To: jQuery (English) Subject: [jQuery] KFManager v1.0 KFManager (Ken's File Manager) is a plugin of jquery. It uses AJAX to manage image files in a web browser and it was developed to help programmer gently in the file manager. It is easy to use demo http://trinhvietcuong.com/ken/index.html -- -- - Administrator : Ken Phan Websmater : www.goldengate.com.vn Listen to music is free : www.enghe.info Ajax pagination: www.goldengate.com.vn/pagination jQuery navigation: www.goldengate.com.vn/navigation MP3 Ajax Flash webplayer: www.goldengate.com.vn/mp3 Blog me: http://my.opera.com/kenphan19/blog/ --
[jQuery] Re: Check if movie (.mp4) is finished
I think you'd have to load a swf and have that call back to the page (via ex interface) when its completed hth - S 2009/7/25 Eswip i...@fairmedia.nl Hi everyone, I'm using the jQuery Media Plugin to play a movie (.mp4) on a page when a button is clicked. But I want to remove the embed from the DOM when the movie is finished. Is this possible? And in what way? I searched on the group here and googled, but I found nothing. Regards, Eswip
[jQuery] (validate) No-URL
I used the URL checker in the Plugins/Validation, to create a no-url checker. This can be useful to prevent some spam from coming through in a form. nourl: function(value, element) { return this.optional(element) || !(/^(https?|ftp):\/\/[a-z]| \d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[! \$'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d| [1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\. (\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0- \uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])* ([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF \uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0- \uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$'\(\)\*\+,;=]|:|@)+(\/(([a-z]| \d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[! \$'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF \uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$'\(\)\*\+,;=]|:|@)| [\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/ i.test(value));},
[jQuery] Re: Flash movie not playing in IE6, but working fine in firefox google chrome
Have you tried the google group for swfobject? - S 2009/6/23 krishna1...@gmail.com krishna1...@gmail.com Hi All, I have used the swfobject.js file its methods to play a flash movie in my webpage. It works fine when I open the page in firefox chrome but does not work in IE-6. Below is the code i used: script type=text/javascript src=%= request.getContextPath() %/js/ swfobject.js/script script type=text/javascript function loadSWF(url) { var flashvars = { autostart: false, thumb: videos/call/FirstFrame.png, thumbscale: 45 }; swfobject.embedSWF(url, flashcontent, 440, 300, 9.0.0,expressInstall.swf, flashvars); } /script div id=flashcontent/div Please help me on this.
[jQuery] Re: Using Zend IDE with jquery
I gave up with eclipse in favour of netbeans. However this is for Eclipse PDT but uses 1.2.6 http://www.langtags.com/jquerywtp/ The netbeans jquery addon also uses 1.2.6 I wonder how much of a chore it would be updating them to 1.3.2? I have not looked into doing it - S 2009/6/13 Josh Powell seas...@gmail.com zend with eclipse has some plugins. I don't use them though, so I'm not sure where to get them. On Jun 12, 2:13 pm, Arun arun5672...@yahoo.com wrote: Hi, Has anyone ever tried using the zend ide with jquery? Any comments on this would be appreciated. Arun
[jQuery] Re: image for public usage
see these http://docs.jquery.com/Design_and_Identity http://blog.jquery.com/2006/11/07/jquery-button-contest-winners/ - S 2009/5/4 Tim Johnson t...@johnsons-web.com Since jQuery is one of my tools - I'd like an appropriately public image to use on my website. Are any available? thanks tim
[jQuery] Re: $().someFunction(); -- The First Pair of Parentheses?
$ == jQuery to make jQuery work when other js frameworks are also in use you can make jQuery() work too - avoiding conflicts the first set of parenthis are for passing params to the jquery object AFAIK When setting defaults for jquery plugins the parenthis are not required. I don't know if they are optional here or not - plugin defaults are variables used by plugins, which extend the jquery object (props methods) - S 2009/5/3 kiusau kiu...@mac.com .getBrowserInformation
re[jQuery] moveAttr('href') on document load?
$(function() { $('#add a').removeAttr('href'); }); What's wrong with this code? I want to remove all href's from a tags onload of a document. Still a bit new to jQuery so sorry for this silly question! Just been trying to figure it out for ages. The links are in a div with id add. Thanks for all the help! Sam -- View this message in context: http://www.nabble.com/removeAttr%28%27href%27%29-on-document-load--tp23355653s27240p23355653.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: re[jQuery] moveAttr('href') on document load?
Awesome, thanks! That works exactly how I want it!:) -- View this message in context: http://www.nabble.com/removeAttr%28%27href%27%29-on-document-load--tp23355653s27240p23358695.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: re[jQuery] moveAttr('href') on document load?
Thanks Charlie! That did the trick :) Charlie Tomlinson wrote: removeAttr() will take the whole href property out of the tag lt;a href=something.phpgt; Testlt;/agt; will become lt;agt; Testlt;/agt; if you want to keep href property you could overwrite the href values $('#add a').attr('href','#'); produces lt;a href=#gt; Testlt;/agt; Sam Granger wrote: $(function() { $('#add a').removeAttr('href'); }); What's wrong with this code? I want to remove all href's from a tags onload of a document. Still a bit new to jQuery so sorry for this silly question! Just been trying to figure it out for ages. The links are in a div with id add. Thanks for all the help! Sam -- View this message in context: http://www.nabble.com/removeAttr%28%27href%27%29-on-document-load--tp23355653s27240p23358784.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Modifying element on drop into sortable list
Hi everyone, I've got a Draggable list working in conjunction with a Sortable list. When I drag an item from the draggable to the sortable list I want to modify the contents of the list. The code I'm using right now is: $(#list li).draggable({ connectToSortable: #page ol, containment: window, helper: clone, revert: true, revertDuration: 0, appendTo: body }); $(#page ol).sortable({ handle: .drag_handle, receive: function(event, ui) { $(ui.item).css('background','red'); } }); Instead of modifying the dropped element it actually modifies the source element in the draggable list. I've tried using ui.helper instead of ui.item but this has no effect whatsoever. Can anyone suggest a different way of going about this? Thanks in advance! Sam
[jQuery] Re: new version of loopedSlider is out! Looking for feed back
- S 2009/4/30 Nathan nsear...@gmail.com Yes that is very possible and pretty easy. Just download and include the jQuery Easing Plugin into your page: http://gsgd.co.uk/sandbox/jquery/easing/ And lets say you want to add easeInOutExpo easing to the slide animation. Just find the two lines that have: $(o.slides,obj).animate({left: m}, o.slidespeed,function(){ You'll want to add easeInOutExpo after the instance of o.slidespeed like this: $(o.slides,obj).animate({left: m}, o.slidespeed, easeInOutExpo, function(){ You can do the same thing after o.autoHeight and o.fadespeed. That'll do it. Let me know how that works for you. On Apr 30, 4:59 am, betweenbrain m...@betweenbrain.com wrote: Nathan, Very cool! Is it possible to use this in conjunction with something like easing to add a little effect to the transition? Keep up the great work! Matt On Apr 29, 9:55 am, Nathan nsear...@gmail.com wrote: Just released a new version of loopedSlider and am looking for some feedback. loopedSlider is a plugin made for jQuery that solves a simple problem, the looping of slide content. It was created to be easy to implement, smooth and most of all end the content rewind that most other content sliders suffer from. New in version 0.5 Re-coded from the ground up Even easier to implement Use DIVs, LIs or ? Smoother animation Container click for next feature And the most requested feature, auto interval Examples a href=http://nathansearles.com/loopedslider/example-1.html; target=_blankSimple example using images and DIVs/a a href=http://nathansearles.com/loopedslider/example-2.html; target=_blankSimple text and auto height example using LIs/a a href=http://nathansearles.com/loopedslider/example-3.html; target=_blankMultiple sliders and auto play example/a Downloadhttp://code.google.com/p/loopedslider/
[jQuery] Re: Getting started with jQuery
try the following http://www.learningjquery.com/category/levels/beginner www.*slideshare*.net/simon/*jquery*-in-15-minutes http://www.slideshare.net/remy.sharp/prototype-jquery-going-from-one-to-the-other - S 2009/4/20 yrstruly anthony.apol...@gmail.com Hello Can somebody maybe please give me a basic code to start testing jQuery, cause the beginners code on this site is not doing anything for me? Thank you
[jQuery] Re: script tag in HTML
script src=IPMS%20Library_files/frameset.js type=text/javascript /script and script type=text/javascript changing type to text/javascript - this is why nothing occurs removing the language attribute. its not required if you testing locally on a windows machine then paths with \ can work but moving them to a server they need to be /. Testing locally ie will give you some restictions and security warnings will appear. also if you test locally you can have your project in a folder and use / with relative paths fro there. Removing spaces from files and directories is a headache saver - S 2009/4/3 michael.marri...@ausawd.com michael.marri...@ausawd.com How can I refer to multiple sources of javascript in my HTML. For example if in my HTML I already have a line such as : script language=JavaScript src=IPMS%20Library_files/frameset.js type=text/jscript /script Then I want to put in script language=JavaScript src=H:\IPMS\Library Project \jquery-1.3.2.min.js type=text/jscript /script I have tried to change the type to be say type = text\Myjscript and then the following; script language=JavaScript type=text/Myjscript $(document).ready(function(){ $(a).click(function(event){ alert(Thanks for visiting!); event.preventDefault(); }); }) \script But when I click on a link in my page I don't get the message Thanks for visiting.
[jQuery] Closing Ajax Requests
I couldn't find anything on this in the jQuery documentation. Is there a way to close all jQuery ajax requests? I've built a bit of comet- like long polling ajax script, but it seems as though Internet Explorer is keeping these long polling requests open when I refresh or redirect to another page. Sense IE has a 2 connections per domain limit, the client would have to wait till the long polling is complete (which takes roughly 1 minute) before the other pages load. So what I need is a way to stop all ajax requests so I can place it in a onbeforeunload event. Anyone know of a way that I can stop all jQuery ajax requests?
[jQuery] Re: Cool Flash-like Menu Effect
*not exaclty that but this could be a lead for you **www.cssjuice.com/lavalamp-jquery-sliding-menu/ and Nathan Borror's playgroundblues.com has a menu vertical but simular to the Aex Buga site * look at the animate functions - S 2009/3/31 DesignerNotCoder thecoopersm...@gmail.com http://www.alexbuga.com/v8/ Notice the menu to the upper right and how it slides as it follows the mouse across the icons. I have been searching for an open source for this, but I'm not sure how to define it. Any ideas? Thx
[jQuery] Re: Keeping jquery codes up to date - best practise?
The risk with linking to a latest build is that something will break when the linked-to version of jquery changes. Imagine for instance that you made heavy use of @selectors, and were running live with these when the change was made from 1.2 to 1.3. Your site would break. Such eventualities as this are not impossible in the future. I'd always recommend linking to a specific version of the code and testing your site before upgrading the live version of jQuery, that way you eliminate the possibility of bugs creeping in. Your site has a dependency on a specific version of jQuery to function, and you need to ensure that it still works when upgraded. S On Mar 22, 3:37 pm, mkmanning michaell...@gmail.com wrote: You can link to the latest major number, for examplehttp://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js gets you 1.3.2; it will automatically update to the next 1.#.# version when available. http://ajax.googleapis.com/ajax/libs/jquery/1.2/jquery.min.js Gets you 1.2.6 (the latest version with the minor 2) http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js gets you 1.2.3 explicitly The one thing to be careful about is if you have code that is version dependent, (e.g. jQuery UI), it may fall out of sync with Google's update. On Mar 22, 3:54 am, Microbe geeky@gmail.com wrote: Thanks for that, but if you use it, aren't you linking to a specific version number? Their example is path:http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js; So what happens if right though my code I call that file and then 1.3.3 comes out?
[jQuery] Re: jquery website broken?
I have checked in ie6 box model issue with naviagtion and some really small text, but nothing really that bad. Will try to check it ie7 later. I did notice that the following url has a 500 error http://plugins.jquery.com/project/Plugins/name the other two links with it are fine. - S 2009/3/18 Paul Woolcock paulwoolcoc...@gmail.com Works for me too, Vista Ultimate + IE7. On Wed, Mar 18, 2009 at 9:21 AM, MorningZ morni...@gmail.com wrote: What do you see as broken? the page looks and operates fine for me in IE7 (Windows Server 2008 and IE7) On Mar 18, 9:11 am, iain.wa...@googlemail.com iain.wa...@googlemail.com wrote: Hi, I really want to start using jquery in some places to replace mootools, however i find it extremely difficult to persuade clients to go with jquery when the jquery website athttp:// docs.jquery.com/Main_Page is completely broken in IE7. Is there any reason for this? -- Paul Woolcock pwool...@umflint.edu paulwoolcoc...@gmail.com
[jQuery] [validate] ASP.Net style validation group
Hi folks, I couldn't find any solutions to this. I needed the validate plugin to have validation group like functionality for use on asp.net webforms (because asp.net only allows one form). I'm not much a javascript programmer but I had a crack at it anyway. After stumbling in the dark for a bit I have something (that i havent tested much) that appears to work. Wasn't as hard as I thought it would be :) The syntax for defining the group like behaviour is: valgroups : { test : { buttons : [ '%= SaveButton.UniqueID %' ], fields : [ '%= Firstname.UniqueID %', '%= Surname.UniqueID %' ] }, foo : { buttons : [ '%= SaveButton2.UniqueID %' ], fields : ['%= Company.UniqueID %', '%= Postcode.UniqueID %' ] } }, The absence of the valgroups definition just validates everything. The need for a label of the 'groups' is somewhat questionable as I don't reference it anywhere. I didn't want to have to add onclick code or special attributes to my buttons so I just associate the buttons directly with the field subset. When validating seperate groups the behaviour I've added hides all error messages and field highlights for fields in the other groups. You can view/download the code here: http://plugins.jquery.com/files/issues/jquery.validate.js__0.txt I'd say it's likely that I've broken something but so far so good.
[jQuery] Re: Total Noob needs help please with emailing on clicking of links
surely google analytics and jquery gatracker in addition to RobG suggestion to qualify what google reports Then you can have google analytics send dat in pdf every week - S 2009/3/13 RobG rg...@iinet.net.au On Mar 13, 7:52 am, KillerKellerjr killerkelle...@gmail.com wrote: [...] I am looking to get some code to that will email someone ever time different links are clicked on a page. Basically to report back so someone can keep track of when educational videos are watched so we can keep track of total educational hours, its required by our company. Tracking link clicks in the browser is a really bad way to do that. You don't know that the link was followed or that the video was watched - it is quite possible visitors will follow the link and watch the video *without* clicking on it. Some other (server side) method based on streaming the content will likely give a much more accurate result. -- Rob
[jQuery] [autocomplete] hasFocus is bugged in certain cases in IE
Hello, I've observed this behaviour in IE7. Using Jörn Zaefferer autocomplete plugin. If you reload/refresh the page and the focus is automagically (a function of the browser) given to the autocomplete field the focus event doesn't fire. Hence hasFocus is zero and if you start typing the results are never displayed. A workaround I have made (this might be a bit too simplistic?) is in the event handler for the onkeypress/down event I've just added this one line at the top: hasFocus=1; (expanded sample): $input.bind(($.browser.opera ? keypress : keydown) + .autocomplete, function(event) { hasFocus = 1; // track last key pressed lastKeyPressCode = event.keyCode; switch (event.keyCode) { //... and so on... It seems reasonable to expect that if sometime is typing in the field then it has focus. Debugging javascript in IE is just not fun :(
[jQuery] jQuery UI 1.6rc6 - how to sort tabular data?
I know you can't actually sort tables, it's kinda broken. I can easily sort UL lists, but whenever I try to use float: left and width: XXXem to give set widths to each span, e.g.: lispan class=id32/span span class=nameBob Jenkins/span/ li #list li { clear: left; } #list li span { float: left; background: #ddd; margin: 1px; } #list li span.id { width: 2em; } #list li span.name { width: 12em; } #list li span.desc { width: 12em; } Well, the float: left seems to break sortable(). If I remove the float left, it works fine. How do I make each SPAN an exact set width? The only thing that seems to work is float:left combined with setting the 'width'. I'm just trying to make my UL look like a table so sortable() will work. Thanks..
[jQuery] Re: jQuery UI 1.6rc6 - how to sort tabular data?
Sorry, just realized this may be misleading. jQuery UI Sortable allows you to REORDER items in a list. I am looking to have a user drag/reorder items in a table, basically. On Mar 3, 4:20 pm, Sam H samh1...@gmail.com wrote: I know you can't actually sort tables, it's kinda broken. I can easily sort UL lists, but whenever I try to use float: left and width: XXXem to give set widths to each span, e.g.: lispan class=id32/span span class=nameBob Jenkins/span/ li #list li { clear: left;} #list li span { float: left; background: #ddd; margin: 1px;} #list li span.id { width: 2em;} #list li span.name { width: 12em;} #list li span.desc { width: 12em; } Well, the float: left seems to break sortable(). If I remove the float left, it works fine. How do I make each SPAN an exact set width? The only thing that seems to work is float:left combined with setting the 'width'. I'm just trying to make my UL look like a table so sortable() will work. Thanks..
[jQuery] Re: What can we use in place of $.browser?
Its better to detect features not browsers; that said detecting a single browser such as ie6 I would use conditional comments feeling assured that the code is not interfering with other bits http://www.sitepoint.com/forums/showthread.php?t=455334 2009/2/25 Liam Potter radioactiv...@gmail.com ok, lets say I wanted to target IE6 only, how would I do that with support? Aaron Gundel wrote: http://docs.jquery.com/Utilities/jQuery.support jQuery now uses feature detection. There are some good links to explain in the post above. It is still possible to detect which browser is being used (plain old js) but jQuery support will probably be removed at some point in the future. On Wed, Feb 25, 2009 at 5:23 AM, Liam Potter radioactiv...@gmail.com wrote: I thought this as well, $.browser still works, as many plugins use it, but I'm interested in what we should be using. fambi wrote: Having just upgraded to 1.3.2, I've realised that the $.browser utility has been deprecated. Does this mean it is no longer possible to identify which browser is being used?
[jQuery] jquery.listnav
I have an index page with 1270 list items being processed by listnav, and loading the page takes about 15 seconds. Without listnav turned on, the page loads in less than a second. Is there a way to speed up the indexing through caching? Or a setting that would use pre-populated LI classes?
[jQuery] Re: jquery.listnav
Thanks for the quick response. It does seem to be okay in IE7, but slow in FF3.1 and Chrome. I also added the timeout as you indicated, but that did not seem to have an effect. My research showed it was in the last phase of the init process, where it decides whether to show all or click on a letter. If I set the options to includeAll, but don't specify a letter, FF loads faster initially, but the first letter click shows the delay. - Sam
FW: [jQuery] Re: Returning Javascript
Basically, my ajax loads each page. If i want to put javascript in that page the javascript does not run. Can i eval the whole response? Html and everything? Or do i have to filter out the javascript? Maybe it would be easier to make the jquery load another script in a file? If this is possible? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of James Sent: 17 February 2009 21:25 To: jQuery (English) Subject: [jQuery] Re: Returning Javascript I'm not understanding what you're trying to do. You just want your AJAX to return Javascript code and have it executed? If so, you can use the eval() function, but be careful of the source of your Javascript. On Feb 16, 10:30 pm, s.flemin...@googlemail.com s.flemin...@googlemail.com wrote: I am trying to write my first application, and am trying to use jquery to help me along my travels. I have setup my application to work so all pages are loaded via ajax, using anchor's as navigation. However on some pages that i return using the AJAX i want to be able to run code. This works on firefox, however it does not work on anything else. So really my question is: How do i run javascript code from an ajax response? p form action=ajax/forms.php method=post id=myform Title: input type=text name=title / input type=submit value=Submit name=submit / /form /p script type=text/javascript // attach handler to form's submit event alert(Javascript); $('#myform').submit(function() { // submit the form alert(form submitted); // return false to prevent normal browser submit and page navigation return false; }); /script In the above, i only get an alert saying Javascript in firefox. Any other browser and it does not work. Please help!
[jQuery] Adding an LI element to an OL
Hi everyone, I've got an ordered list (OL) containing several LI items, currently arranged in alphabetical order. How hard would it be to create a new LI element, and put it in the right alphabetical position based on its value? Sam
[jQuery] Re: Adding an LI element to an OL
Hi Michael, Thanks for replying. The sort won't need to be done very often at all so I imagine that your solution would be ideal. Having a bit of trouble getting it to work though: $(#group_add).livequery('submit',function() { var group_name = $(this).children(#group_title).val(); var myvar = 'hello'; var group_array = []; if(group_name != '') { $(#group_list).children(li).each(function() { group_array[] = this.text(); }); group_array[] = group_name; group_array.sort(); alert(group_array); } return false; }); It seems like the function called by each() can't access the group_array[] array. How do I change the scope of group_array to allow me to add elements to it within my each() function? Or is there a better way of going about it? Sam On Feb 10, 8:51 pm, Michael Lawson mjlaw...@us.ibm.com wrote: How often are you going to be doing this sort? You could just say that when you add something to the list, pull them all out and put them into an array, sort the array and then put it back out cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Sam Hastings sam.hasti...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/10/2009 03:50 PM Subject: [jQuery] Adding an LI element to an OL Hi everyone, I've got an ordered list (OL) containing several LI items, currently arranged in alphabetical order. How hard would it be to create a new LI element, and put it in the right alphabetical position based on its value? Sam graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: Checkbox selection
Thanks! I'll give your suggestions a shot :-)
[jQuery] Checkbox selection
Hi everyone, I've got an HTML table like this: table tr tdFoo/td tdBar/td tdBaz/td tdinput type=checkbox //td /tr /table What I'd like to do is toggle the checkbox's checked state when any of the cells in its row are clicked. I've tried this a thousand different ways and can't get it working and was wondering if someone here would be kind enough to help. Many thanks :-) Sam Hastings
[jQuery] jQuery UI Dialog - how to hide 'X' close box?
Is there any way with jQuery UI Dialog to not show the X close box in the titlebar? (what if I want to show a message dialog that the user cannot close, such as a Loading... dialog)
[jQuery] Re: jQuery UI Dialog - how to hide 'X' close box?
Perfect - thanks! On Feb 4, 10:32 am, Richard D. Worth rdwo...@gmail.com wrote: See this thread http://groups.google.com/group/jquery-ui/browse_thread/thread/9c8fbe3... for some examples. - Richard On Wed, Feb 4, 2009 at 11:24 AM, Liam Potter radioactiv...@gmail.comwrote: css Sam H wrote: Is there any way with jQuery UI Dialog to not show the X close box in the titlebar? (what if I want to show a message dialog that the user cannot close, such as a Loading... dialog)
[jQuery] slideUp/Down jumpy in Firefox 3 but not in IE7?
I don't remember if it was like this in jQuery 1.2, but I have 1.3.1 and I can clearly see that slideDown/Up is much smoother in IE7 than in Firefox 3. Is it just me?
[jQuery] Manipulating form field attributes
Hi everyone, I'm trying to use the following code to change input type=text / to input type=hidden / where the element has the classname navtitle. $(.navtitle).each(function() { this.type = hidden; }); This code works fine in Firefox but has no effect at all in IE. Can anyone help me please? Sam Hastings
[jQuery] Re: jquery and minify
Thanks Ariel. I have found out that http://code.google.com/p/minify/ retains comments when that are like /*! */ also I have seen that sometimes jQuery has this style of comment already 2009/1/31 Ariel Flesler afles...@gmail.com You should keep the headers somewhere, preferably close to the code. Something like this: /** * jQuery */ (function($){...}); /** * Plugin 1 */ (function($){...}); /** * Plugin 2 */ (function($){...}); -- Ariel Flesler http://flesler.blogspot.com On Jan 29, 10:53 pm, Sam Sherlock sam.sherl...@gmail.com wrote: Having just seen this sitehttp://www.highpointvillage.co.uk; running it through yslow (it got an f 50/100), one way to improve it would be reducing the http requests - but:- Would combining the scripts on a site like this with minify be contrary to the license of jQuery? could jquery be minifed in a file with the comment header retained at the top of combined file? or would one have to have a jquery.js file minified with comment header intact and combine the plugins?
[jQuery] Re: High Point Village Website
That is a great piece of work, a huge amount of http requests - but appeared pretty seamless 2009/1/29 ksun kavi.sunda...@gmail.com Could see only intro in IE On Jan 29, 12:58 pm, kim3er rich...@dogma.co.uk wrote: Hi, I've just finished working on a new web site using jQuery 1.3.1 and would appreciate feedback. http://www.highpointvillage.co.uk/ Rich
[jQuery] jquery and minify
Having just seen this site http://www.highpointvillage.co.uk running it through yslow (it got an f 50/100), one way to improve it would be reducing the http requests - but:- Would combining the scripts on a site like this with minify be contrary to the license of jQuery? could jquery be minifed in a file with the comment header retained at the top of combined file? or would one have to have a jquery.js file minified with comment header intact and combine the plugins?
[jQuery] Re: jquery 1.2.6 focus problem?
works fine for me with 1.2.6 and 1.3.1 also works here as expected http://www.whitehouse.gov/contact/ - using 1.2.6 works as expected Perhaps theres a gremlin in you code somewhere - do you have a link to see the issue? 2009/1/26 chris robinson stuff...@gmail.com Hey all, Our project is using 1.2.6, but we seem to have an issue with calling: $('#some-textbox-id').focus(); The element focuses properly, but it seems like the next time you press the tab key the focus completely disappears and you have to hit it several times to get it back into the flow of the document rather then going to the next focusable element in the DOM. Is this a bug or am I missing something? If you click back onto the document and focus on something it will resume the natural behavior. thanks, -Chris
[jQuery] New 1.3 feature, native event delegation??
John Resig said of 1.3: I only posted last week about how event delegation can help you to optimize your code and it looks like jQuery will do it for you now, which means that any event handlers you add to a group of elements will automatically be added to matching elements when you create them. Yet I'm not seeing this functionality. Within my $(document).ready() func, I do this: $('.do_it').click(function() { ...stuff... }); Yet if I dynamically create new items using class=do_it, the above function is not automatically attached to them. I have to once again, after dynamically creating new items, perform the $('.do_it').click() again. I thought 1.3 was supposed to eliminate this. Am I doing something wrong?
[jQuery] Re: jQuery 1.3 Released
Happy Birthday jQuery, and hats off to all involved those charts look real impressive - 30% faster; this sizzle must be hot :) Am looking forward to using it 2009/1/14 jQuery Lover ilovejqu...@gmail.com Super !!! Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Wed, Jan 14, 2009 at 7:45 PM, John Resig jere...@gmail.com wrote: Hey Everyone - jQuery 1.3 is out! Full details here: http://blog.jquery.com/2009/01/14/jquery-13-and-the-jquery-foundation/ Happy 3rd Birthday, jQuery! --John
[jQuery] Re: $(window).bind('resize', fn) not working in IE
TI'm injecting jQuery into any webpage (via a bookmarklet). This works fine, but for some strange reason $(window).bind(resize) doesn't work with IE. No errors, just doesn't fire the event. To see this, execute this code while on any webpage (using Firebug Javascript Console): //load jQuery var js = document.createElement('script'); js.type = text/javascript; js.src = http://localhost/js/jquery-1.3.js;; document.body.appendChild(js); //this is strange: $ is undefined until a setTimeout. //even stranger: setTimeout must be at least 50 (for me) setTimeout(function(){ //change all link colors to random. var r = function(){ var hex = Math.floor(Math.random()*255*255*255).toString(16); while (hex.length6) hex = 0 + hex; hex = # + hex; $(a).css(color, hex); }; //bind it. resize wont work in IE. $(window).bind(resize, r); $(window).bind(scroll, r); r(); }, 50); On Jan 13, 9:32 pm, Dave Methvin dave.meth...@gmail.com wrote: Do you have a simple test case? Resize works for me in IE.
[jQuery] Re: $(window).bind('resize', fn) not working in IE
I believe I found the bug. Seems like that if you set window.onresize in IE before the document is completely loaded, it won't work. Whatever.
[jQuery] $(window).bind('resize', fn) not working in IE
Can anyone verify that $(window).bind('resize', fn) doesn't work in IE? $(window).bind('scroll', fn) works fine for me, but not resize. I'm using 1.2.6. Thanks.
[jQuery] Re: Capture a click outside of a specific object?
What you're describing is a pattern called event delegation. It is actually quite efficient, since you don't have to bind an event to each object, but rather 1 event to a larger object: $(document.body).click(function(){ var target = $(event.target); if (target.is(#foo)){ //its foo! } }); More info on event delegation: http://docs.jquery.com/Events/jQuery.Event -sam On Jan 13, 2:32 pm, riotbrrd k...@riotbrrd.com wrote: Hi all, Is there a simple way to capture a click event in a window/document and then determine whether the click was inside an element #foo, or outside of that element? Thanks! -Kim
[jQuery] Re: createElement, get its value
$('#grabMe') will search the document for an element with ID grabMe Have you added grabMe to the document? On Jan 13, 6:00 pm, CrustyDOD anze.stok...@gmail.com wrote: Hey! I've created one div with FlyDOM plugin which uses createElement function to add stuff to DOM. Now the problem is that once i add the element, i cannot access it in anyway. For example with FlyDOM plugin i create: div id=grabMeIt works!/div After the JS for creating element i have this: $('#grabMe').click(function() { alert($(this).html()); }); It doesn't work. There are no errors shown in Firebug, the element is in DOM, id is set. It's all there. Am i missing something here? I'm confused :S Using jquery 1.2.6
[jQuery] Re: Can't figure out how to traverse the DOM to these values...
I didn't read your whole post. However, you should read the docs to be sure functions are returning what you think they are returning. jQuery.attr(one param) will return a String of that attribute... so you cannot then call .val() because .val() is not a method that String has. jQuery.val() should work just fine for form inputs. jQuery.next(selector) returns the next SIBLING elements to each jQuery. If you're looking for elements inside jQuery then use .find(). Hope this helps. -sam On Jan 13, 7:29 pm, Rick Faircloth r...@whitestonemedia.com wrote: Starting from the input with the class update-button in the next to the bottom line of the HTML/CFML below, I'm trying to traverse one line up to the input with two classes, the second being the important one, update-input. I've tried using: $('.update-button).parent().next('.update-input').attr('value').val() to get the form field input placed into the field by the user. In other words, I'm trying to get the value the user puts into the field, which is the tour url. The next value I need to send via ajax is top div's id value on the first line below of the HTML/CFML. It's the div with a class of tour-info-div and I need it's id value, which is the mls_number. The #mls_number# is a ColdFusion variable. For this one, I tried: $('.update-button).parent().parent().attr('id').val() but I was getting an error on that one. I need to send those two values, the form field tour url user entry, and the mls_number as values through the ajax function. How would I write up these traversals? Thanks for any help! Rick Here's the HTML/CFML: div id=#mls_number# class=tour-info-div div id = address_id_#mls_number# style=width:300px; font-weight:bold;#street_number# #street_name#, #city#/div cfif not len(trim(#tour_url#)) div class=no-tourNo Tour Available/div cfelse div class=tour-urlCurrent Tour: nbsp; #tour_url#/div div class=options [ a href=#tour_url# target=_blankPreview/a ] nbsp; [ a class=update-link href='##'Update/a ] nbsp; [ a href= ##Delete/a ] /div /cfif div class=update-div divEdit Link:/div divinput class=textinput01 update-input size=80 value=#tour_url#/div divinput class=update-button type=button value=Update/div /div /div
[jQuery] How do I make a partial textarea autocomplete?
Hello, Is there an example of partial autocomplete? By 'partial' I mean, only a part of textarea gets suggestions. Users in my project are supposed to start a message in a textarea with 'Dear UserName' I want to make this UserName part either clickable like in Office documents custom fields, and when a user is editing this part I want to show a list of options (usernames from a database). I can work out the backend, but I have no clue where to begin to make such a textarea. Please help. Thanks a ton. Sam
[jQuery] Re: How do I make a partial textarea autocomplete?
There's document.selection property. It changes with document.onclick. To select an element dynamically, document.selection.createRange is available. There are other properties in the document.selection object. I found a good reference here: http://www.webreference.com/js/column12/crossbrowser.html Any suggestion how I should do that? On Dec 24, 6:47 pm, Kean shenan...@gmail.com wrote: Interesting idea, but, owing to your idea, I am more interested in knowing if there's a way to determine current active keyboard cursor offset in document. On Dec 24, 1:26 am, Sam Unplugged guptasamee...@gmail.com wrote: Hello, Is there an example of partial autocomplete? By 'partial' I mean, only a part of textarea gets suggestions. Users in my project are supposed to start a message in a textarea with 'Dear UserName' I want to make this UserName part either clickable like in Office documents custom fields, and when a user is editing this part I want to show a list of options (usernames from a database). I can work out the backend, but I have no clue where to begin to make such a textarea. Please help. Thanks a ton. Sam
[jQuery] Re: How do I make a partial textarea autocomplete?
Hi, This does make sense. However, can you tell me if its possible to autofire jQuery autocomplete dropdown and similarly to prevent autocomplete to show. I can use such a thingy to show autocomplete dropdown when user has typed 'Dear '. And after that I will not show autocomplete. Please tell me how this can this be done? Best Sam On Dec 24, 6:48 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I don't know of any dropin solution for that. I can only recommend to rethink your approach, eg. make the Dear static in front of the textarea and a seperate input inbetween. Jörn On Wed, Dec 24, 2008 at 10:26 AM, Sam Unplugged guptasamee...@gmail.com wrote: Hello, Is there an example of partial autocomplete? By 'partial' I mean, only a part of textarea gets suggestions. Users in my project are supposed to start a message in a textarea with 'Dear UserName' I want to make this UserName part either clickable like in Office documents custom fields, and when a user is editing this part I want to show a list of options (usernames from a database). I can work out the backend, but I have no clue where to begin to make such a textarea. Please help. Thanks a ton. Sam
[jQuery] Re: I wrote a YUI Multi FIle Compression Utility
Thank you. On Dec 23, 9:27 pm, K-BL axel...@aim.com wrote: Hey Guys, I just finished writing a YUI Multi-File Compression Utility. It's really simple, it just runs some CLI commands, but more importantly, it compiles entire directories and sub directories with a clean UI. For us IT guys, it makes quick site changes a breeze from source to compressed in just seconds. Anyway, find it here:http://jqueryplugins.weebly.com/yui-compressor-multi-file-utility.html If you like it, let me know. Also, source is available in C#. K-BL
[jQuery] Re: How do I make a partial textarea autocomplete?
Thanks Stephen (MorningZ). I really appreciate it. Best Sam On Dec 24, 8:29 pm, MorningZ morni...@gmail.com wrote: Super quick proof of concept http://paste.pocoo.org/show/96632/ On Dec 24, 10:03 am, MorningZ morni...@gmail.com wrote: What you ask is not going to be possible first and foremost you are overlooking the fact that you are going to lose focus (and therefore your selection and cursor position) when you click on the autocomplete's div of available selections do something like Jorn suggests, and with some well placed and well used CSS you can make it appear as one big textarea, even though it would be div, input and textarea On Dec 24, 9:54 am, Sam Unplugged guptasamee...@gmail.com wrote: Hi, This does make sense. However, can you tell me if its possible to autofire jQuery autocomplete dropdown and similarly to prevent autocomplete to show. I can use such a thingy to show autocomplete dropdown when user has typed 'Dear '. And after that I will not show autocomplete. Please tell me how this can this be done? Best Sam On Dec 24, 6:48 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I don't know of any dropin solution for that. I can only recommend to rethink your approach, eg. make the Dear static in front of the textarea and a seperate input inbetween. Jörn On Wed, Dec 24, 2008 at 10:26 AM, Sam Unplugged guptasamee...@gmail.com wrote: Hello, Is there an example of partial autocomplete? By 'partial' I mean, only a part of textarea gets suggestions. Users in my project are supposed to start a message in a textarea with 'Dear UserName' I want to make this UserName part either clickable like in Office documents custom fields, and when a user is editing this part I want to show a list of options (usernames from a database). I can work out the backend, but I have no clue where to begin to make such a textarea. Please help. Thanks a ton. Sam
[jQuery] Re: How do I make a partial textarea autocomplete?
I have one question tough, how is Facebook's implementation of autocomplete (when sending n message) allows us to add users. Can somebody explain how I can do that? Thanks. On Dec 24, 8:29 pm, MorningZ morni...@gmail.com wrote: Super quick proof of concept http://paste.pocoo.org/show/96632/ On Dec 24, 10:03 am, MorningZ morni...@gmail.com wrote: What you ask is not going to be possible first and foremost you are overlooking the fact that you are going to lose focus (and therefore your selection and cursor position) when you click on the autocomplete's div of available selections do something like Jorn suggests, and with some well placed and well used CSS you can make it appear as one big textarea, even though it would be div, input and textarea On Dec 24, 9:54 am, Sam Unplugged guptasamee...@gmail.com wrote: Hi, This does make sense. However, can you tell me if its possible to autofire jQuery autocomplete dropdown and similarly to prevent autocomplete to show. I can use such a thingy to show autocomplete dropdown when user has typed 'Dear '. And after that I will not show autocomplete. Please tell me how this can this be done? Best Sam On Dec 24, 6:48 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I don't know of any dropin solution for that. I can only recommend to rethink your approach, eg. make the Dear static in front of the textarea and a seperate input inbetween. Jörn On Wed, Dec 24, 2008 at 10:26 AM, Sam Unplugged guptasamee...@gmail.com wrote: Hello, Is there an example of partial autocomplete? By 'partial' I mean, only a part of textarea gets suggestions. Users in my project are supposed to start a message in a textarea with 'Dear UserName' I want to make this UserName part either clickable like in Office documents custom fields, and when a user is editing this part I want to show a list of options (usernames from a database). I can work out the backend, but I have no clue where to begin to make such a textarea. Please help. Thanks a ton. Sam
[jQuery] Re: Merry Xmass
Merry Christmas, all you smart people. On Dec 24, 6:20 pm, Lukas Polak polak.luka...@gmail.com wrote: Hi everybody, I don't want you interrupt, but I don't know if you already notice that today is 24th December so at least today you shoold stop working and relax :) Merry Christmas to all of you :) elf from Slovakia
[jQuery] Re: How do I make a partial textarea autocomplete?
Thanks Stephen. jQuery and all the smart people who use it simply don't stop to surprise me. Best Sam On Dec 24, 9:36 pm, MorningZ morni...@gmail.com wrote: It's pretty complicated CSS/JavaScript manipulation that textbox is all this HTML dd id=dd_to_field class=field div id=ids class=clearfix tokenizer tabindex=-1 span class=tokenizer_stretcher^_^/span span class=tab_stop input type=text/ /span /div /dd People out there have a;ready written code to mimic it in jQuery http://www.google.com/search?q=jquery+facebook+autocomplete On Dec 24, 11:24 am, Sam Unplugged guptasamee...@gmail.com wrote: I have one question tough, how is Facebook's implementation of autocomplete (when sending n message) allows us to add users. Can somebody explain how I can do that? Thanks. On Dec 24, 8:29 pm, MorningZ morni...@gmail.com wrote: Super quick proof of concept http://paste.pocoo.org/show/96632/ On Dec 24, 10:03 am, MorningZ morni...@gmail.com wrote: What you ask is not going to be possible first and foremost you are overlooking the fact that you are going to lose focus (and therefore your selection and cursor position) when you click on the autocomplete's div of available selections do something like Jorn suggests, and with some well placed and well used CSS you can make it appear as one big textarea, even though it would be div, input and textarea On Dec 24, 9:54 am, Sam Unplugged guptasamee...@gmail.com wrote: Hi, This does make sense. However, can you tell me if its possible to autofire jQuery autocomplete dropdown and similarly to prevent autocomplete to show. I can use such a thingy to show autocomplete dropdown when user has typed 'Dear '. And after that I will not show autocomplete. Please tell me how this can this be done? Best Sam On Dec 24, 6:48 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I don't know of any dropin solution for that. I can only recommend to rethink your approach, eg. make the Dear static in front of the textarea and a seperate input inbetween. Jörn On Wed, Dec 24, 2008 at 10:26 AM, Sam Unplugged guptasamee...@gmail.com wrote: Hello, Is there an example of partial autocomplete? By 'partial' I mean, only a part of textarea gets suggestions. Users in my project are supposed to start a message in a textarea with 'Dear UserName' I want to make this UserName part either clickable like in Office documents custom fields, and when a user is editing this part I want to show a list of options (usernames from a database). I can work out the backend, but I have no clue where to begin to make such a textarea. Please help. Thanks a ton. Sam
[jQuery] Re: Why won't this work?
what does not work? 2008/12/16 Rick Faircloth r...@whitestonemedia.com Why won't this... script type=text/javascript $(document).ready(function(){ $('#emailError').hide(); }); /script hide this... p id=emailError style=color:red;Please enter your email address./p ??? Rick
[jQuery] SuperFish - Load sub menu with Ajax
Hello. I put the superfish menu on my page and using the OnBeforeShow method, I am fetching menu items via ajax and placing the LI's in the current UL. I also see if there are children for the newly refreshed sub items and I nest a new UL sort of like this: if(item.subPageCnt 0){ subIndicator='span class=sf-sub-indicator #187;/span'; newUL='ul lia href=#aamenu item/a/ li/ul'; } theUL.append('lia href=' + item.url +' target=' + item.target + '' + item.displayName + subIndicator + '/ a' + newUL + '/li'); Those new children don't expand. So, guessing that you can't dynamically add structure to the menu. Questions: Is there a way I am missing which I can fetch structure dynamically? Is there a refresh method to redraw the menu dynamically? Any other suggestions for an ajax menu?
[jQuery] Re: Checking to see if a SWF is fully loaded
I think its better for flash to call an external function when its fully loaded 2008/12/5 Mike Miller [EMAIL PROTECTED] Hi, Need to find a way to use jquery to check whether or not a swf has been fully loaded before executing a javaScript function. M
[jQuery] Re: Notification when content was updated via AJAX
The Live Query plugin may help in this circumstance: http://plugins.jquery.com/project/livequery --Sam On Dec 1, 12:43 pm, Raphael [EMAIL PROTECTED] wrote: I'm having a little problem: There are two independent modules (I'm working in a drupal environment). Well, one module polls a table via AJAX request and the other module provides some services when a tr element has been clicked. BUT: On Pageload the click event is bound to the tr element. When the first module though polls in a new table, this table doesn't have the click event attached. What I need. My second module needs to somehow know when new content comes in via AJAX, so it can bind the click element to them. Is there some way to accomplish this? Thanks Raphael
[jQuery] How return value in jQuery ajax
i have function jQuery.ajax({ type: GET, url: url, data: queryString + 'btnSubmit=1', success: function(msg) { if(msg=0){ if(msg) { $(#errorid).val(); } else { $(#email).val(); document.getElementById(email).focus(); } } } }); how to get msg in othe javascript function function() { } how can i use out of one function in other javascript function OR how can i Stop one function from the other function
[jQuery] Re: Traversal: Aggressive next to blast through all parents?
Sorry - but your script causes an infinite loop for some reason. And jQuery's nextUntil doesn't work either, it doesn't survive past the end of the sibling tree. I need my function to go PAST the end of the list of siblings, up through parents, etc., all the way to the end of the document if need be. Example: body div id=mainText here - div id=buryburied/div div id=lastKidends here/div/div !-- end main -- div id=gotmegot me!/div /body $('.bury').crawl('.gotme') should actually return the gotme DIV. next(), nextAll(), and nextUntil() will all stop right after the lastKid DIV.
[jQuery] jQuery + jQuery.form ajaxForm file upload problems
Hi, I have made a basic test case with a few text inputs and it works perfect with just them. However if I add a file input to them the json object is sent to the browser as a file download and the success method is never hit. Anyone figure this out? I know the code that returns the json object is absolutely fine, it works perfect without the upload input. I'll show you my code with the file upload: !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; headmeta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /title Home Page /title script type=text/javascript src=/Content/Scripts/ jquery-1.2.6.min.js/script script type=text/javascript src=/Content/Scripts/ jquery.form.js/script script type=text/javascript // prepare the form when the DOM is ready $(document).ready(function() { var options = { iframe:true,// force iframe, since I'm using json target:'#hiddenText', // target needed? success: processJson, // post-submit callback url: '/Home/GetJsonObject/', // form action type: 'json' // json type }; // bind to the form's submit event $('#ajaxForm').submit(function() { // inside event callbacks 'this' is the DOM element so we first // wrap it in a jQuery object and then invoke ajaxSubmit $(this).ajaxSubmit(options); // always return false to prevent standard browser submit and page navigation return false; }); }); function showRequest(formData, jqForm, options) { return true; } // post-submit callback function processJson(data) { //eval the json object var jsonObject = eval('(' + data + ')'); var message = jsonObject.message; var title = jsonObject.heading; $('#title').html(title); $('#message').html(message); } /script /head body h2 id=titleTitle/h2 p id=messageMessage/p fieldset legendForm lulz/legend form id=ajaxForm action=/Home/Index method=post enctype=multipart/form-data label for=titleInputTitle:/labelbr / input type=text id=titleInput name=titleInput /br / label for=messageInputMessage:/labelbr / input type=text id=messageInput name=messageInput / br / label for=imageUploadImage Upload:/labelbr / input type=file id=imageUpload name=imageUpload /br / br / input type=submit id=submitButton name=submitButton value=Change Page » /br / /form textarea cols=30 rows=5 id=hiddenText style=/ textarea /fieldset /body /html
[jQuery] Re: jQuery + jQuery.form ajaxForm file upload problems
Hi Mike, thanks for the reply. It's sending it as application/json at the moment. I will try sending it as text/plain and get back to you. On Nov 12, 3:57 pm, Mike Alsup [EMAIL PROTECTED] wrote: I have made a basic test case with a few text inputs and it works perfect with just them. However if I add a file input to them the json object is sent to the browser as a file download and the success method is never hit. Is this happening on all browsers? What is the mime type of the response? Try setting it to text/plain. Mike
[jQuery] Re: jQuery + jQuery.form ajaxForm file upload problems
Hi, Sam again here. Just thought I'd let everyone know I had to change the headers to be content type HTML and it worked fine. On Nov 12, 4:02 pm, Sam Coughlin [EMAIL PROTECTED] wrote: Hi Mike, thanks for the reply. It's sending it as application/json at the moment. I will try sending it as text/plain and get back to you. On Nov 12, 3:57 pm, Mike Alsup [EMAIL PROTECTED] wrote: I have made a basic test case with a few text inputs and it works perfect with just them. However if I add a file input to them the json object is sent to the browser as a file download and the success method is never hit. Is this happening on all browsers? What is the mime type of the response? Try setting it to text/plain. Mike
[jQuery] Re: form submit without page refresh
this should be your solution http://www.malsup.com/jquery/form/ 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED] Hi Friends I just want to submit the form without page refresh i want to do this using j query, Am actually working in DRUPAL ,Tell me how to implement this in drupal,
[jQuery] Re: form submit without page refresh
whats the html - I saw the link and that form did not appear to have the event applied to the form perhaps this could be solved by checking that the id of the form is myForm. I know nothing of drupal I can check back to the link since its logged my ip and now tells me I have already voted visit the site etc 2008/11/10 bharani kumar [EMAIL PROTECTED] But , i want to implement in Drupal , Am not sure the below code correct, In this i want to add the JQuery, ?php function custom3_block($op='list',$delta=0){ switch($op){ case 'list': $blocks[0]['info'] = t('Custom 3'); return $blocks; case 'view': $output[] =t(Bharanikumar); $output[].=drupal_get_form('myForm'); $output[] .=' script type=text/javascript // wait for the DOM to be loaded $(document).ready(function() { alert(Tets) $(#myForm).ajaxForm(function() { alert(Thank you for your comment!); }); }); /script'; $block['content']=theme('hotelsearch_item_list',$output); return $block; } } function myForm(){ $modpath = drupal_get_path('module','custom3'); drupal_add_js($modpath . '/jquery-1.2.6.js','module'); //$form['#action']=url('comment.php'); $form['name']=array( '#type' = 'textfield', '#title' = t('name') ); $form['comment'] = array( '#type' = 'textarea', '#title' = t('comment'), '#required' = TRUE ); $form['submit'] = array( '#input' = TRUE, '#name' = 'op', '#type' = 'submit', '#submit' = TRUE, '#value' =t('submit') ); return $form; } On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote: this should be your solution http://www.malsup.com/jquery/form/ 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED] Hi Friends I just want to submit the form without page refresh i want to do this using j query, Am actually working in DRUPAL ,Tell me how to implement this in drupal, -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyer.hyperphp.com/
[jQuery] Re: form submit without page refresh
I think we are misunderstand each other a bit I asked to see you html - I saw the example and the form is not submitted by ajax I was asking if your form has an id of myForm eg form id=myForm would also be helpful if you could post link to example does not store ip's after submitting 2008/11/10 bharani kumar [EMAIL PROTECTED] Hi u see , in that page is loading / redirecting know, But my thing is without page reloading to submit the form, Got my point , one more thing , am having some jquery script , which working fine (without page refresh to form submiting) But i need the help in, i want to use the jquery in Drupal, On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote: whats the html - I saw the link and that form did not appear to have the event applied to the form perhaps this could be solved by checking that the id of the form is myForm. I know nothing of drupal I can check back to the link since its logged my ip and now tells me I have already voted visit the site etc 2008/11/10 bharani kumar [EMAIL PROTECTED] But , i want to implement in Drupal , Am not sure the below code correct, In this i want to add the JQuery, ?php function custom3_block($op='list',$delta=0){ switch($op){ case 'list': $blocks[0]['info'] = t('Custom 3'); return $blocks; case 'view': $output[] =t(Bharanikumar); $output[].=drupal_get_form('myForm'); $output[] .=' script type=text/javascript // wait for the DOM to be loaded $(document).ready(function() { alert(Tets) $(#myForm).ajaxForm(function() { alert(Thank you for your comment!); }); }); /script'; $block['content']=theme('hotelsearch_item_list',$output); return $block; } } function myForm(){ $modpath = drupal_get_path('module','custom3'); drupal_add_js($modpath . '/jquery-1.2.6.js','module'); //$form['#action']=url('comment.php'); $form['name']=array( '#type' = 'textfield', '#title' = t('name') ); $form['comment'] = array( '#type' = 'textarea', '#title' = t('comment'), '#required' = TRUE ); $form['submit'] = array( '#input' = TRUE, '#name' = 'op', '#type' = 'submit', '#submit' = TRUE, '#value' =t('submit') ); return $form; } On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote: this should be your solution http://www.malsup.com/jquery/form/ 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED] Hi Friends I just want to submit the form without page refresh i want to do this using j query, Am actually working in DRUPAL ,Tell me how to implement this in drupal, -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyer.hyperphp.com/ -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyer.hyperphp.com/