[jQuery] Re: An idiot's question about returning results from a form submission
Wow, Brian, thanks so much for taking the time. I really appreciate it. On Sep 3, 8:06 pm, brian bally.z...@gmail.com wrote: On Thu, Sep 3, 2009 at 10:23 PM, Alanalanmand...@gmail.com wrote: Thanks, Brian. I appreciate it. As mentioned, the document has the following script references in head... script src=script.js/script script src=jquery.js/script script src=jquery.form.js/script As a result of a user action, JavaScript (from script.js) generates a form and inserts it into the html of a table cell. It also calls the Ajax form function to register the form. The code looks like this... function generateForm() { // Create form content = 'form id=imageUploader1 name=imageUploader1 action=upload-image.php method=post enctype=multipart/form-data \n'; content += ' input id=userID name=userID type=hidden value=' + userID + .1 + '\n'; content += ' input id=sourceFile name=sourceFile type=file size=20 style=font-size:8pt;\n'; content += ' brinput type=submit value=Upload Photo #1 style=margin-top:2pt; font-size:8pt;\n'; content += '/form\n'; // Insert form parent.client.document.getElementById(clientAreaCell).innerHTML = content; // Set Ajax form handler $('#imageUploader1').ajaxForm(function() { alert(You just uploaded using Form 1); }); } First thing I suggest: just create the form as normal HTML and put it in a div that's hidden. You can use jQuery to fillin the value of the hidden field: $('#userID').val('whatever') When you want to show the form, just toggle the div it's in. In reality, there are multiple forms but they're all alike. In each form, the user has a single browse button (to choose a photo to upload) and then clicks a Submit button. The .#, following the userID, tells me which of four allowable photos is being uploaded. As shown, as soon as Submit it clicked, upload-image.php is run. After verifying a legitimate user id, the following code runs: if ((($_FILES['sourceFile']['type'])=='image/pjpeg') || (($_FILES ['sourceFile']['type'])=='image/jpeg')) { $filename = '/big/dom/directoryname/photos_temp/' . $_FILES ['sourceFile']['name']; // Upload if(@move_uploaded_file($_FILES['sourceFile']['tmp_name'], $filename)) { // Resize setMemoryLimit($filename); $destination = /big/dom/directoryname/photos/' . $newPhotoID . '.jpg'; resizeImage ($filename, $destination, 140, 110, 5); The important thing to note here is that $destination is likely a path from root, not web_root. I can't say for sure without knowing what this resizeImage() function is. But it's a fair bet that the path is from server root. What you need to pass back to the client is the equivalent path from web_root (ie. DOCUMENT ROOT) // Delete original unlink($filename); $result = $newPhotoID; Here, you've only got the name of the image (not even the extension). Again, you'll want to send the path from web_root. } else { $result = failure; } } else { $result = reject; } Not shown above: $newPhotoID will be generated by concatenating the userID (retrieved from $_REQUEST['userID']) with the server time in order to create a unique file name; and resizeImage is a separate function for reducing the photo into a thumbnail. At the end of the PHP code, the following is generated: html body ?php echo $result; ? /body /html This is from the pre-Ajax days. You should have just: echo $result; And make sure there is no whitespace after the closing ? Better yet, leave off the closing ? altogether. PHP will be ok without it and it avoids nasty surprises. Back to the JavaScript, the Ajax form handler presents a dialog box. All of the above currently works. What I'm hoping to do, instead, is parse the result from the server. If it's a file name, I'll do what you mentioned (i.e., use JavaScript to change the src property of an img control). If the result is failure, I'll know that something happened with the image processing on the server. And, if the result is reject, I'll know there was something wrong with the upload (e.g., the user wasn't
[jQuery] Parse html content and convert untaged links and emails to hyper links
Hi, The plugin should parse In a HTML page once loaded and convert any link and email without a href tag to a proper clickable link... For example: a). google.com should be converted to a href=http://google.com; target=_blankgoogle.com/a b). exam...@example.com should become a href=mailto:exam...@example.com;exam...@example.com/a Regards, Santosh
[jQuery] Re: Using jQuery to see if CSS is disabled.
mumbojumbo wrote: Hello All, I'm trying to code a site using progressive enhancement methods. It's built upon standards-compliant CSS and HTML and JS. I'm using jQuery on the site to animate some elements on hover etc. Now, when CSS and JS is disabled, it's all good. But, If CSS is disabled and JS is still enabled, the js still manipulates the elements and it's not what I want. I was wondering if anybody knew anything about this. I can't seem to find anything about this... I guess you could try to look at a known css property of a known element (let's say the background-image property of the element containing your sites logo or something even more generic) and check if that has the value you expect. I haven't tried anything like that, though. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Form is always submitting
Thanks for reply. But as you can see in the code, I want to submit form but on some conditions (which are in IF clause). Right now it is going/executing 'SUBMIT' function when I click on the button. Thanks On Sep 4, 11:45 am, Cold Flame theumairsha...@gmail.com wrote: Hi, If you set value of type attribute to button instead of submit the form will not submit. Like if you want to make an ajax call on send message button. i.e input type=button class=button value=Send Message To Shipper name=smts id=smts/ Regards Umair Shahid On Sep 4, 11:03 am, Bluesapphire ahmadsaa...@gmail.com wrote: Hi! Kindly visit following link: http://www.articlecon.com/sitesdemo/ship/viewquote.php?mid=1 When I click 'Send Message To Shipper' button, Form is submitted, where as I placed following jQuery code to stop submission. script type=text/javascript jQuery(document).ready(function(){ var Mts, clk, sShow; jQuery('#smts').click(function(){ alert('Click'); Mts = 1; }); jQuery('#recFrm').submit(function(){ return false; /* alert('Out Of Mts Submit'); if(Mts){ alert('In Submit sMts'); jQuery('#act').val('SMTS'); jQuery(this).attr('action', 'submit/followup.php'); return true; } else{ return false; } */ }); }); /script Can some one guide me what and where Iam doing wrong. Thanks in advance- Hide quoted text - - Show quoted text -
[jQuery] Re: Form is always submitting
Hi, You can call the submit function of the form on any event. jQuery('#smts').click(function(){ alert('Click'); //Form Submit function call. }); On Sep 4, 1:15 pm, Bluesapphire ahmadsaa...@gmail.com wrote: Thanks for reply. But as you can see in the code, I want to submit form but on some conditions (which are in IF clause). Right now it is going/executing 'SUBMIT' function when I click on the button. Thanks On Sep 4, 11:45 am, Cold Flame theumairsha...@gmail.com wrote: Hi, If you set value of type attribute to button instead of submit the form will not submit. Like if you want to make an ajax call on send message button. i.e input type=button class=button value=Send Message To Shipper name=smts id=smts/ Regards Umair Shahid On Sep 4, 11:03 am, Bluesapphire ahmadsaa...@gmail.com wrote: Hi! Kindly visit following link: http://www.articlecon.com/sitesdemo/ship/viewquote.php?mid=1 When I click 'Send Message To Shipper' button, Form is submitted, where as I placed following jQuery code to stop submission. script type=text/javascript jQuery(document).ready(function(){ var Mts, clk, sShow; jQuery('#smts').click(function(){ alert('Click'); Mts = 1; }); jQuery('#recFrm').submit(function(){ return false; /* alert('Out Of Mts Submit'); if(Mts){ alert('In Submit sMts'); jQuery('#act').val('SMTS'); jQuery(this).attr('action', 'submit/followup.php'); return true; } else{ return false; } */ }); }); /script Can some one guide me what and where Iam doing wrong. Thanks in advance- Hide quoted text - - Show quoted text -
[jQuery] Reverse slideUp/slideDown
When using slideDown, you will see the content. Using slideUp will hide the content. Now I want to use slideUp to view the content, so it will start from nothing and slide to an object from bottom to top. Is there a good way to do this, or should I fox it with animate and scrollTop?
[jQuery] How to handle onmouseover event with keyboard
Hi Team, How to handle onMouseOver event with keyboard. Scenario: With JQuery, onMouseOver on a plus symbol, small banner with some text content will be shown, it has been working with Mouse(input device), but same effect has been expecting from keyborad tab ordering on to that particular plus symbol. Please provide the solution. Regards, Aravind.
[jQuery] Remote Success message
Hi, I'm trying to figure out how to display a Success Message upon remote returning 'true'. Yes, I know this can be done with success: function() {}, however I have multiple fields that I want to use this on, and I want to display more than just a generic message. Let's say I have a Username and Email field, both of which are being validated remotely (via remote), and I want to display a Success message (Username not in use, Email not in use, respectively). Is there anyway I can do this? Can I retrieve the label information that would be unique to Username or Email fields, then use that to identify the fields and dynamically generate the words 'Username' and 'Email'? Is there a default message for remote returning 'true'? I know there's a default one for 'false', I don't get the point behind adding one and not the other... Any help would be appreciated, thanks.
[jQuery] jQuery Superfish Problem
Hello, iam a new here. I will creat a jQuery menu on my typo3 site but still some problems. I have add the jQuery in the head of the site and all needed scripts! Then i give the ul a class name ul class=sf-menuli/li/ul ... Here a link to the side: http://typo3.lexmarketing.eu/ Best regards Swoboda Thomas
[jQuery] Detect form change
Hi all ! I'm looking for a way to detect form change in jQuery. For exemple I display a big and dynamic form pre-filled with values and splitted in tabs. I would like that when some form values in a tab is changed an icon appears showing that a save is needed. I also would like to have an alert if the user click on the menu without saving. Is there an existing plugin or has someone already done this kind of things ? Thanks for your advices
[jQuery] spritemenu customise
hello everyone, i found quite interesting the spritemenu (http:// www.distinctcorp.com.au/jquery/spritemenu.html) idea and used it on my website. It works quite fine, but i'd like to ad some functionality: when the user click on a menu element, i want it to remain selected (in hover state completed). So, here's the function: code (function($){ $.fn.spritemenu = function(settings) { var settings = $.extend({}, $.fn.spritemenu.defaults, settings); return this.each(function() { var aniParamsOrig = {}; var aniParamsBack = {}; $(this).children(settings.buttonselector).each(function(index) { var $mainlink = $(this).children('a'); $mainlink.parent().children('ul').css('opacity',0).hide(); $mainlink .css('display','block') .css('position','relative') .css('width',settings.buttonwidth) .css('height',settings.buttonheight) .css('background-image','url('+settings.grid+')') .css('background-repeat','no-repeat') .css('background-position',((0-index) * settings.buttonwidth)+'px 0px') .css('z-index',settings.zindex) .append('span/span').children('span') .css('display','block') .css('position','absolute') .css('top',0) .css('left',0) .css('width',settings.buttonwidth) .css('height',settings.buttonheight) .css('background-image','url('+settings.grid+')') .css('background-repeat','no-repeat') .css('background-position',((0-index) * settings.buttonwidth)+'px ' + (-1*settings.buttonheight) + 'px') .css('z-index',(settings.zindex+1)); aniParamsOrig[settings.animate] = $mainlink.children('span').css (settings.animate); aniParamsBack[settings.animate] = 0; $mainlink.children('span').css(settings.animate,0).hide(); }).hover(function () { $(this).children('a').children('span').stop().show().animate (aniParamsOrig, {queue: true, duration: settings.speed, easing: settings.easing, complete: function() { $(this).parent().parent().children('ul').stop().show().animate ({opacity: 1}, {queue: true, duration: 'slow'}); }}); }, function () { $(this).children('a').children('span').stop().animate (aniParamsBack, {queue: true, duration: settings.speed, easing: settings.easing, complete: function() { $(this).hide().parent().parent().children('ul').stop().animate ({opacity: 0}, {queue: true, duration: 'slow'}).hide(); }}); } ).click(function(){ /*alert(pop);*/ $(this).parent().children('li').children('a').children('span').stop ().animate(aniParamsBack, {queue: true, duration: settings.speed, easing: settings.easing}); $(this).children('a').children('span').stop().show().animate (aniParamsOrig, {queue: true, duration: settings.speed, easing: settings.easing}); }); }); } $.fn.spritemenu.defaults = { grid: 'menugrid.png', buttonwidth: 100, buttonheight: 100, buttonselector: 'li', zindex: 10, speed: 'slow', easing: 'swing', animate: 'opacity' }; function abort() { arguments[0] = 'spritemenu: ' + arguments[0]; throw format.apply(null, arguments); } function format(str) { for (var i = 1; i arguments.length; i++) str = str.replace(new RegExp('\\{' + (i-1) + '}', 'g'), arguments [i]); return str; } })(jQuery);/code My add is relative to the .click section i report here: code .click(function(){
[jQuery] Re: How to handle onmouseover event with keyboard
If you want to achieve the functionality of mouse over on an element as you press tab from key board. Then try onfoucs event of that element. When u press tab foucs is set on the next ordered element. Regards On Sep 4, 10:18 am, Aravind - User experience aravind.dok...@gmail.com wrote: Hi Team, How to handle onMouseOver event with keyboard. Scenario: With JQuery, onMouseOver on a plus symbol, small banner with some text content will be shown, it has been working with Mouse(input device), but same effect has been expecting from keyborad tab ordering on to that particular plus symbol. Please provide the solution. Regards, Aravind.
[jQuery] Hidden div height width
Hi all Can any one tell me is it possible to get the height and width of a hidden div. I have to apply animation to a hidden div. But is don't know how to do this. Thanks Rupak
[jQuery] Re: jquery menu that works with ie6 (plugin?)
Do you know how to enable the top level links in the jdmenu? I never could get the top level links in the menu to work once i applied the jdmenu to a unordered list. On Aug 21, 4:09 pm, con-man-jake jakedim...@gmail.com wrote: Did it. Works like a charm! Thanks again Jack. jake On Aug 21, 9:27 am, con-man-jake jakedim...@gmail.com wrote: Thank you Jack, I'll give it a world. jake On Aug 20, 5:27 pm, Jack Killpatrick j...@ihwy.com wrote: I've used this in a bunch of sites that had to work in IE6: http://jdsharp.us/jQuery/plugins/jdMenu/ - Jack con-man-jake wrote: Can anyone recommend a jquery menu plug that works with ie6? I have a menu done with uls and lis with pure css. It doesn't work with ie6 (because it's pure css.) I went through the list of jquery plugins, but most of them are fancy (as in iPod like menu and what have you...) I only need a simple straight-forward horizontal menu with vertical sub-level menus (multi level deep) all activated with a mouseover event (I suppose, I can control the event with which the menu is triggered.) At any rate, I just did not want to keep downloading, learning and trying different plugins; I just want to save time on this. Any help is appreciated. jake- Hide quoted text - - Show quoted text -
[jQuery] Re: Hidden div height width
Thanks for the quick reply . The problem is that i cannot use visibility:hidden or position absolute. On Fri, Sep 4, 2009 at 3:42 PM, joey santiago federico.pr...@yahoo.itwrote: exactly... but if you hide it with visibility:hidden, then you still see an empty space on the page... you should hide it by setting his absolute position to top and left negative values, or (probably better?) using z-index property. hope it's useful! :) On 4 Set, 12:04, Cold Flame theumairsha...@gmail.com wrote: Hi Rupak, if div is hidden using css display:none then you can't get its height or width because logically that element is that drawn on the browser. While if u hide the div using css visibility:hidden then u can get the height and width of the element. Regards Umair Shahid On Sep 4, 3:45 pm, Rupak rupakn...@gmail.com wrote: Hi all Can any one tell me is it possible to get the height and width of a hidden div. I have to apply animation to a hidden div. But is don't know how to do this. Thanks Rupak
[jQuery] Re: Detect form change
Here is a plugin that may get you started. http://bit.ly/cZQ9K
[jQuery] Re: Hidden div height width
Hi Rupak, if div is hidden using css display:none then you can't get its height or width because logically that element is that drawn on the browser. While if u hide the div using css visibility:hidden then u can get the height and width of the element. Regards Umair Shahid On Sep 4, 3:45 pm, Rupak rupakn...@gmail.com wrote: Hi all Can any one tell me is it possible to get the height and width of a hidden div. I have to apply animation to a hidden div. But is don't know how to do this. Thanks Rupak
[jQuery] Re: Hidden div height width
exactly... but if you hide it with visibility:hidden, then you still see an empty space on the page... you should hide it by setting his absolute position to top and left negative values, or (probably better?) using z-index property. hope it's useful! :) On 4 Set, 12:04, Cold Flame theumairsha...@gmail.com wrote: Hi Rupak, if div is hidden using css display:none then you can't get its height or width because logically that element is that drawn on the browser. While if u hide the div using css visibility:hidden then u can get the height and width of the element. Regards Umair Shahid On Sep 4, 3:45 pm, Rupak rupakn...@gmail.com wrote: Hi all Can any one tell me is it possible to get the height and width of a hidden div. I have to apply animation to a hidden div. But is don't know how to do this. Thanks Rupak
[jQuery] Re: Hidden div height width
why not position absolute ? rupak mandal wrote: Thanks for the quick reply . The problem is that i cannot use visibility:hidden or position absolute. On Fri, Sep 4, 2009 at 3:42 PM, joey santiago federico.pr...@yahoo.it mailto:federico.pr...@yahoo.it wrote: exactly... but if you hide it with visibility:hidden, then you still see an empty space on the page... you should hide it by setting his absolute position to top and left negative values, or (probably better?) using z-index property. hope it's useful! :) On 4 Set, 12:04, Cold Flame theumairsha...@gmail.com mailto:theumairsha...@gmail.com wrote: Hi Rupak, if div is hidden using css display:none then you can't get its height or width because logically that element is that drawn on the browser. While if u hide the div using css visibility:hidden then u can get the height and width of the element. Regards Umair Shahid On Sep 4, 3:45 pm, Rupak rupakn...@gmail.com mailto:rupakn...@gmail.com wrote: Hi all Can any one tell me is it possible to get the height and width of a hidden div. I have to apply animation to a hidden div. But is don't know how to do this. Thanks Rupak
[jQuery] Re: KFManager v1.0
Hi, Can you please share on how to config this to run in localhost. I tried but the folder and file section has the loading.gif displayed and nothing else. Thanks! On Aug 19, 7:03 am, Meroe whme...@gmail.com wrote: I was able to get this working. I'm now integrating with codeigniter to see how it does there. On Aug 18, 4:06 pm, Web Specialist especialista...@gmail.com wrote: Good job. Awesome! Cheers Marco Antonio On Tue, Aug 18, 2009 at 1:20 PM, Ken Phan kenpha...@gmail.com wrote: 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
[jQuery] possible to override inline onchange() event?
I have a select box with an inline onchange() event that reloads the page. Using jQuery I've created a $('#myForm select').live('change', function (e){...}) event handler to intercept the onchange() behavior and even though I have e.preventDefault() and e.stopPropagation() after my jquery event runs the inline onchange() is still triggered... Am I missing something here? I realize I could easily remove the onchange() from the code but ideally I shouldn't edit the HTML directly and just override it using jquery... Thanks!
[jQuery] Has anyone now how to simplify the following expression by avoiding using attr(id)
Has anyone now how to simplify the following expression by avoiding using attr(id) alert($(#+$(obj).attr(id)+~p:last).attr(id)); I need this because not every image could have an id. script language=javascript type=text/javascript function ExpandCollapseOnLeftPanel(obj) { if ($(obj).attr(src) == /Content/Images/arrow_bot.gif) { // expand $(obj).attr(src, /Content/Images/arrow_side.gif); $(# + $(obj).attr(id) + ~p:last).css(display, block); } else //collapse { $(obj).attr(src, /Content/Images/arrow_bot.gif); $(# + $(obj).attr(id) + ~p:last).css(display, none); } } /script div class=blok img id=iTA src=/Content/Images/arrow_bot.gif alt= class=l_ar onclick=ExpandCollapseOnLeftPanel(this) / p id=p1 Tracking activities /p p style=display:none a href=#home/abr / movie...@lucy,@Bob(3)br / @Canlis table for 2 at ..(1)br / /p /div
[jQuery] Auto play Accessible News Slider
Can anybody tell me how i Make the Accessible News Slider from http://www.reindel.com/accessible_news_slider/#jquery_resources to switch slide after e.g. 4 sec. ?
[jQuery] ArgumentOutOfRange Exception
Hi, All I use jquery 1.2.6 in one of my projects and it will call some webmethods without arguments. it works properly in my dev machine. However, ArgumentOutOfRange Exception (parameter: length) will be thrown after deployment. Any idea? Thanks in advance. Snippet like: $.ajax({ type: POST, url: Mywebpage/Mywebmethod, data: {}, contentType: application/json; charset=utf-8, dataType: json, success: function(result) { } });
[jQuery] Re: error when uploading files
I had the same problem, just rename the submit button to something else, an example: input id=submitButton type=submit value=update name=submitButton/ On Sep 2, 8:27 pm, undertow qode.qr...@gmail.com wrote: I get an error Error: Form elements must not be named submit. when i have a form with the ability touploadfiles. If afileis selected foruploadi get the error, and not when there is nofileforupload. why is that? what difference does it make if there is a submit button?
[jQuery] Preventing browser scrollbars from bumping content in slideDown()
Say I have a site that's centered on the page, and do $ (#some_content).slideDown(). If the appearance of the new content means that the page no longer fits in the browser window, scrollbars will appear, and so the available page width decreases slightly, and so my centered content jumps left while it's sliding down. Is there a decent workaround for this? Best I can figure out at the moment is to persuade the browser to always display scrollbars, which isn't exactly ideal.
[jQuery] Re: unblockUI() problems in IE
It seems to bug because i am using a form Ive tried the form tag inside the div and outside the div like below. If i take out the form tag, it goes away fine without issues. script src=js/jquery.js/script script src=js/jquery.blockUI.js/script script $(function() { $.blockUI({ message: $('#question'), css: { width: '275px' } }); $('#btnClose').click($.unblockUI); }); /script form action= method=post id=editForm div id=question style=display:none; cursor: default;z-index:200 input type=button id=btnClose value=close /div /form There must be something more to your page that is getting in the way. The simple code you posted works fine for me: http://www.malsup.com/jquery/block/sep04.html
[jQuery] Re: Form is always submitting
jQuery('#recFrm').submit(function(){ return false; If you put a breakpoint on that line you will see it is never invoked. Your form has an id of recfrm, not recFrm.
[jQuery] Re: jQuery Superfish Problem
You don't have any submenus. On Sep 4, 3:48 am, Lexmarketing gmt...@gmail.com wrote: Hello, iam a new here. I will creat a jQuery menu on my typo3 site but still some problems. I have add the jQuery in the head of the site and all needed scripts! Then i give the ul a class name ul class=sf-menuli/li/ul ... Here a link to the side:http://typo3.lexmarketing.eu/ Best regards Swoboda Thomas
[jQuery] Re: error when uploading files
I get an error Error: Form elements must not be named submit. when i have a form with the ability to upload files. If a file is selected for upload i get the error, and not when there is no file for upload. why is that? what difference does it make if there is a submit button? This is a browser quirk and it makes a difference because some browsers promote form element names to be properties of the form object completely overriding property/functions of the same name than already exist. In the case of file uploads, the form plugin needs to invoke the native submit function on the form, but it will be unable to do so (in IE) if there is an element named submit. So the alert is meant to help you out. Mike
[jQuery] Re: unblockUI() problems in IE
Yeah take out the html head body tags in your example, and in IE you should get the error i was talking about. just leave the script tags and the div. On Sep 4, 8:25 am, Mike Alsup mal...@gmail.com wrote: It seems to bug because i am using a form Ive tried the form tag inside the div and outside the div like below. If i take out the form tag, it goes away fine without issues. script src=js/jquery.js/script script src=js/jquery.blockUI.js/script script $(function() { $.blockUI({ message: $('#question'), css: { width: '275px' } }); $('#btnClose').click($.unblockUI); }); /script form action= method=post id=editForm div id=question style=display:none; cursor: default;z-index:200 input type=button id=btnClose value=close /div /form There must be something more to your page that is getting in the way. The simple code you posted works fine for me: http://www.malsup.com/jquery/block/sep04.html- Hide quoted text - - Show quoted text -
[jQuery] Re: slide one div out left while sliding one in right
I tried animate before I found the slide effect and obviously it isn't quite that simple if the slide effect won't work. On Aug 29, 7:56 am, Anoop kumar V anoopkum...@gmail.com wrote: You can also try to use animate which is part of jquery core. Look up some examples on the jquery website, there are quite simple. -Anoop On 8/29/09, Charlie charlie...@gmail.com wrote: there are lots of plugins to do this look for carousel or scroll in a plugin search jCarousel and scrollable are 2 excellent ones that come to mind as well as scrollto W. Young wrote: A good example of the behavior I want is on the firefox addons home pagehttps://addons.mozilla.org/en-US/firefox/?application=firefox At the top, there is a pane for viewing the content of three items at a time with a back and forward button to scroll through. I need a similar way to slide one item at a time. On Aug 26, 10:16 am, W. Young wayland.yo...@docupak.com wrote: I have a container div with two inner divs. I have one inner div visible taking up 100% of the visible area and another hidden div. I want the visible div to slide to the left while simultaneously sliding the other div in from the right. This works fine except that while the right div is sliding in, it appears below the left div. How can this be done? Here is the code: script type=text/javascript src=js/jQuery/jquery.js/script script type=text/javascript src=js/jQuery/effects.core.js/ script script type=text/javascript src=js/jQuery/effects.slide.js/ script script type=text/javascript $(document).ready(function() { $(#slide).click(function() { $(#leftDiv).hide('slide', { direction: 'left' }, 1000); $(#rightDiv).show('slide', { direction: 'right' }, 1000); return false; }); }); /script div id=container style=height: 100px; div id=leftDiv style=float: left; border: solid 1px black; height: 100px; width: 100%; spansome text to slide out left/span /div div id=rightDiv style=float: left; display: none; border: solid 1px black; height: 100px; width: 100%; spansome text to slide in right/span /div /div div style=clear: both; height: 100px; input id=slide type=button value=Slide / /div -- Thanks, Anoop
[jQuery] jCarousel: restart the carousel
Hi all, I'm using jCarousel as a video playlist. There's a total of 8 items, 6 shown at load. The playlist plays item to item in the carousel until the last one. Once the last item is played, the first item starts playing again. As I need the carousel to scroll to the first item when the playlist is restarted I've done: $(#playlistInner).css({left : 0px}); The DOM: ul id=playlistInner class=jcarousel-skin-mytv lia id=item1 class=playlist_item .. And this seems to work, the carousel scrolls to the first item, BUT previous button is enabled and when you click on the button the carousel shows the spaces for two empty items. Please see the attached image, it shows what happens: http://www.vivocom.es/test/scrollToFirstItem.jpg What else do I have to do for the carousel to scroll correctly to the first item?? Thanks a ton in advance!
[jQuery] Re: An idiot's question about returning results from a form submission
When you say... Then, in your JS function, test the returned text for failure or reject first, or parse the JSON object and create a new image tag with the supplied src, width, height. ... what's the exact code for parsing the JSON object within my current structure? For instance, I currently submit the form and post a static dialog box with the code... $('#imageUploader1').ajaxForm(function() { alert(You just uploaded using Form 1); }); My PHP code now concludes with the following: echo json_encode(array (result = success, photoID = $newPhotoID)); I tried replacing my static alert with the following alert (just to make sure I'm seeing the data): $('#imageUploader1').ajaxForm(function() { var data = eval('(' + data + ')'); alert(You just uploaded using Form 1 and the result was + data.result); }); Unfortunately, that's not working. What am I missing? Since I'm using jquery and jquery form as is, I can't see how to specify the JSON info (as I would be able to do if I was manually doing the form submission. Thanks, as always.
[jQuery] New iPhone-style button plug-in released...
We've just released another jQuery plug-in which emulates the iPhone-style button used to toggle settings on/off. The plug-in works with both checkbox and radio button groups and we've worked hard to make this a complete plug-in. While there are several similar plug-ins, we couldn't find one that actually had all the features we needed--which is why we built this version. http://www.givainc.com/labs/ibutton_jquery_plugin.htm You can see a demo here: http://www.givainc.com/labs/ibutton_example.htm Here are the features: - Works with checkboxes or radio elements - Full keyboard support — use the [TAB] key to move from field to field and use the spacebar to toggle the status of the iButton (or use the arrow keys for radio buttons) - Custom event handlers - Detach iButton behavior from the element - Metadata support — when used with the jQuery Metadata Plug-inhttp://plugins.jquery.com/project/metadata, you can define the properties for your button completely within the class attribute of your input elements - Enable/disable drag support — while the dragging behavior is intuitive on touch-based devices, it's not always be the best or expected UI behavior and may cause some mouse users problems (NOTE: In order to help differentiate between an intended mouse click or an actual drag event, we're developed the clickOffset option. If the time (in milliseconds) is under this value (120ms by default) it's assumed the user was attempting to click the button and not drag the handle.) - Enable/disable animation - Single sprite image — easily change the look of your button by just replacing the image sprite - Customizable labels — use any labels you want for your buttons - Support for disabled buttons - Easing support for animations - iPhone support Hopefully some of you find this useful. -Dan
[jQuery] How to unbind data?
Hi everyone I'm trying to write a function that will pass through the id of a clicked element, and then use that id for spellchecking the word that's been clicked on. However, although this seems to work, when i click on another word, it returns the previous corrected word rather than the new one - as if it's storing the same data all the time. I was advised to unbind the event but that doesn't seem to work... Here is my code - but let me quickly explain. First off, there is a div with text in which has several clickable words which can be altered by the user by means of a pop up tooltip with input box. If the user types a word in and hits save, the spell check will activate (i.e. checkWordSpelling). I'm firstly unbinding the click event, and then rebinding it for the next word - and although the correct id is detected, the word that it's supposed to place there after correcting is always the same one (i.e. the first one that was corrected): $('#'+tooltipsavebtn).unbind('click'); $('#'+tooltipsavebtn).bind(click,{theid: id },function(e) { var newval = $('#'+tooltipinput).val(); setProfileText(id,newval,tooltipid,targetid); spellchecked = false; pickedfromlist = false; checkWordSpelling(e.data.theid); var exists = false; for(i=0;ilen;i++){ if (words[id][1][i] == newval){ exists = true; } } if(exists == false){ if(len6){ words[id][1].push(newval); }else{ words[id][1].splice(0,1,newval); userwords[id][1].splice(0,1,newval); } } $('#'+tooltipsavebtn).fadeOut('slow'); }); My spellcheck function initiates a dialog with a callback function: function checkWordSpelling(id) { // opens and performs the spell check var theid = #+id; var $spellcheckthis = $(theid); var thetext = $spellcheckthis.text(); var callback = function() { var correctedtext = $('#correctedText').text(); $spellcheckthis.text(correctedtext); } var spellcheck = JQSpellCheckDialog.create({text : thetext}, callback, SpellCheckOptions); spellcheck.open(); } the call back will take the contents of the dialog with the corrected word and place it in place of the user entered word - at least, that's what it's SUPPOSED to do...but like I say it seems to keep replacing it with the first word all the time... I hope I am explaining this ok...but if anyone needs more description let me know. I would link to an example but due to data protection from my company, it's a little difficult but if it's required for anyone to actually be able to help me I'll see what I can do. Thanks in advance, Mike
[jQuery] Re: unblockUI() problems in IE
Yeah take out the html head body tags in your example, and in IE you should get the error i was talking about. just leave the script tags and the div. Why would I want to do that?
[jQuery] Re: New iPhone-style button plug-in released...
Very slick! nice work On Sep 4, 10:05 am, Dan G. Switzer, II dswit...@pengoworks.com wrote: We've just released another jQuery plug-in which emulates the iPhone-style button used to toggle settings on/off. The plug-in works with both checkbox and radio button groups and we've worked hard to make this a complete plug-in. While there are several similar plug-ins, we couldn't find one that actually had all the features we needed--which is why we built this version.http://www.givainc.com/labs/ibutton_jquery_plugin.htm You can see a demo here:http://www.givainc.com/labs/ibutton_example.htm Here are the features: - Works with checkboxes or radio elements - Full keyboard support — use the [TAB] key to move from field to field and use the spacebar to toggle the status of the iButton (or use the arrow keys for radio buttons) - Custom event handlers - Detach iButton behavior from the element - Metadata support — when used with the jQuery Metadata Plug-inhttp://plugins.jquery.com/project/metadata, you can define the properties for your button completely within the class attribute of your input elements - Enable/disable drag support — while the dragging behavior is intuitive on touch-based devices, it's not always be the best or expected UI behavior and may cause some mouse users problems (NOTE: In order to help differentiate between an intended mouse click or an actual drag event, we're developed the clickOffset option. If the time (in milliseconds) is under this value (120ms by default) it's assumed the user was attempting to click the button and not drag the handle.) - Enable/disable animation - Single sprite image — easily change the look of your button by just replacing the image sprite - Customizable labels — use any labels you want for your buttons - Support for disabled buttons - Easing support for animations - iPhone support Hopefully some of you find this useful. -Dan
[jQuery] Re: Ajax not working in Firefox
Here is the only difference I found in the Request Headers: FF2: Content-Typeapplication/x-www-form-urlencoded FF3: Content-Typeapplication/x-www-form-urlencoded; charset=UTF-8 Any ideas? On Sep 4, 9:47 am, RPrager ryan.pra...@gmail.com wrote: Firefox 3 response: HTMLBODYHR H1 ALIGN=CENTERNot available at present/H1 PStatus code = NL !-- NL --HR/BODY/HTML According to our back end developer, the NL = 'Null execution'. Meaning that the page (newcoleng) was launched without any input at all. I.e., neither a FORM nor any positional parameters. The page is at a loss as to how to serve my needs. Firefox 2 response (this is not the exact full response because it would be rather large): !DOCTYPE html PUBLIC -//W3C//DTD HTML 1.0 Transitional//EN http://www.w3.org/TR/xhtmll/xhtmll-loose.dtd; htmlheadtitlePage Title/title/headbodyThis page was a success/body/html I just realized that the Firefox 2 response included the DOCTYPE while Firefox 3 did not. Thanks for the help. On Sep 3, 9:59 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: Well what exactly is the error? What is different about the server response from FF2 vs. FF3? On Sep 3, 9:04 pm, RPrager ryan.pra...@gmail.com wrote: I've been using Firebug. The data that my browser is sending looks as expected. Here is the information from firebug: Response Headers Date: Fri, 04 Sep 2009 01:54:24 GMT Server: Apache/2.2.6 (Fedora) Content-Length: 179 Connection: close Content-Type: text/html Request Headers User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.0.13) Gecko/2009073022 Firefox/3.0.13 Accept */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive Content-Type application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With XMLHttpRequest Content-Length 24 Pragma no-cache Cache-Control no-cache Post F10 Yes F11 No Any ideas why Firefox 3 would be having issues with my ajax request? On Sep 3, 3:34 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: You **must** install and use something like Firebug or TamperData to see what your browser is sending to the server, and what your server is sending back. Just because the HTML response content looks like an error does not necessarily mean that the HTTP response contained an error code (for example). On Sep 3, 1:29 pm, RPrager ryan.pra...@gmail.com wrote: I just tested this code using FF2 and it works just fine. This appears to be a FF3 problem only. I'm currently using Firefox version 3.5.2. Any ideas? On Sep 3, 10:31 am, RPrager ryan.pra...@gmail.com wrote: Thanks for the idea but adding (dataType: 'text') did not produce a different result. On Sep 3, 9:32 am, 月讀 keyoft...@gmail.com wrote: My english is not well. $.ajax({ type: POST, url: newcoleng, data: F10=YesF11=No, dataType: 'text', success: function(data){ alert( Data Saved: + data ); } }); Try it.
[jQuery] Re: Ajax not working in Firefox
Well frankly that's not looking like a jQuery problem to me. Your *server* is returning different results. I have no idea why, but I don't see what jQuery (or anything else at the client) is supposed to do about that. Do you have debug logging or other debug facilities at the server to see what's going on? On Fri, Sep 4, 2009 at 10:04 AM, RPragerryan.pra...@gmail.com wrote: Here is the only difference I found in the Request Headers: FF2: Content-Type application/x-www-form-urlencoded FF3: Content-Type application/x-www-form-urlencoded; charset=UTF-8 Any ideas? On Sep 4, 9:47 am, RPrager ryan.pra...@gmail.com wrote: Firefox 3 response: HTMLBODYHR H1 ALIGN=CENTERNot available at present/H1 PStatus code = NL !-- NL --HR/BODY/HTML According to our back end developer, the NL = 'Null execution'. Meaning that the page (newcoleng) was launched without any input at all. I.e., neither a FORM nor any positional parameters. The page is at a loss as to how to serve my needs. Firefox 2 response (this is not the exact full response because it would be rather large): !DOCTYPE html PUBLIC -//W3C//DTD HTML 1.0 Transitional//EN http://www.w3.org/TR/xhtmll/xhtmll-loose.dtd; htmlheadtitlePage Title/title/headbodyThis page was a success/body/html I just realized that the Firefox 2 response included the DOCTYPE while Firefox 3 did not. Thanks for the help. On Sep 3, 9:59 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: Well what exactly is the error? What is different about the server response from FF2 vs. FF3? On Sep 3, 9:04 pm, RPrager ryan.pra...@gmail.com wrote: I've been using Firebug. The data that my browser is sending looks as expected. Here is the information from firebug: Response Headers Date: Fri, 04 Sep 2009 01:54:24 GMT Server: Apache/2.2.6 (Fedora) Content-Length: 179 Connection: close Content-Type: text/html Request Headers User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.0.13) Gecko/2009073022 Firefox/3.0.13 Accept */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive Content-Type application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With XMLHttpRequest Content-Length 24 Pragma no-cache Cache-Control no-cache Post F10 Yes F11 No Any ideas why Firefox 3 would be having issues with my ajax request? On Sep 3, 3:34 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: You **must** install and use something like Firebug or TamperData to see what your browser is sending to the server, and what your server is sending back. Just because the HTML response content looks like an error does not necessarily mean that the HTTP response contained an error code (for example). On Sep 3, 1:29 pm, RPrager ryan.pra...@gmail.com wrote: I just tested this code using FF2 and it works just fine. This appears to be a FF3 problem only. I'm currently using Firefox version 3.5.2. Any ideas? On Sep 3, 10:31 am, RPrager ryan.pra...@gmail.com wrote: Thanks for the idea but adding (dataType: 'text') did not produce a different result. On Sep 3, 9:32 am, 月讀 keyoft...@gmail.com wrote: My english is not well. $.ajax({ type: POST, url: newcoleng, data: F10=YesF11=No, dataType: 'text', success: function(data){ alert( Data Saved: + data ); } }); Try it. -- Turtle, turtle, on the ground, Pink and shiny, turn around.
[jQuery] Re: Ajax not working in Firefox
Firefox 3 response: HTMLBODYHR H1 ALIGN=CENTERNot available at present/H1 PStatus code = NL !-- NL --HR/BODY/HTML According to our back end developer, the NL = 'Null execution'. Meaning that the page (newcoleng) was launched without any input at all. I.e., neither a FORM nor any positional parameters. The page is at a loss as to how to serve my needs. Firefox 2 response (this is not the exact full response because it would be rather large): !DOCTYPE html PUBLIC -//W3C//DTD HTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtmll/xhtmll-loose.dtd htmlheadtitlePage Title/title/headbodyThis page was a success/body/html I just realized that the Firefox 2 response included the DOCTYPE while Firefox 3 did not. Thanks for the help. On Sep 3, 9:59 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: Well what exactly is the error? What is different about the server response from FF2 vs. FF3? On Sep 3, 9:04 pm, RPrager ryan.pra...@gmail.com wrote: I've been using Firebug. The data that my browser is sending looks as expected. Here is the information from firebug: Response Headers Date: Fri, 04 Sep 2009 01:54:24 GMT Server: Apache/2.2.6 (Fedora) Content-Length: 179 Connection: close Content-Type: text/html Request Headers User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.0.13) Gecko/2009073022 Firefox/3.0.13 Accept */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive Content-Type application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With XMLHttpRequest Content-Length 24 Pragma no-cache Cache-Control no-cache Post F10 Yes F11 No Any ideas why Firefox 3 would be having issues with my ajax request? On Sep 3, 3:34 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: You **must** install and use something like Firebug or TamperData to see what your browser is sending to the server, and what your server is sending back. Just because the HTML response content looks like an error does not necessarily mean that the HTTP response contained an error code (for example). On Sep 3, 1:29 pm, RPrager ryan.pra...@gmail.com wrote: I just tested this code using FF2 and it works just fine. This appears to be a FF3 problem only. I'm currently using Firefox version 3.5.2. Any ideas? On Sep 3, 10:31 am, RPrager ryan.pra...@gmail.com wrote: Thanks for the idea but adding (dataType: 'text') did not produce a different result. On Sep 3, 9:32 am, 月讀 keyoft...@gmail.com wrote: My english is not well. $.ajax({ type: POST, url: newcoleng, data: F10=YesF11=No, dataType: 'text', success: function(data){ alert( Data Saved: + data ); } }); Try it.
[jQuery] Re: An idiot's question about returning results from a form submission
On Fri, Sep 4, 2009 at 9:48 AM, Alanalanmand...@gmail.com wrote: When you say... Then, in your JS function, test the returned text for failure or reject first, or parse the JSON object and create a new image tag with the supplied src, width, height. ... what's the exact code for parsing the JSON object within my current structure? Sorry, I left that part out. Check out jquery-json: http://code.google.com/p/jquery-json/ You might also want to return a JSON object for all outcomes, so you don't need to check for a string (failure,reject) *or* a JSON object. $result = array( 'result' = 'success', 'photo_id' = $newPhotoID, 'src' = PATH_FROM_DOCUMENT_ROOT, 'width' = THE_WIDTH, 'height' = THE_HEIGHT ); } else { $result = array('result' = 'failure'); } } else { $result = array('result' = 'reject'); } echo json_encode($result); You'd also be able to supply a message, if you wanted: $result = array('result' = 'reject', 'msg' = 'just because'); For instance, I currently submit the form and post a static dialog box with the code... $('#imageUploader1').ajaxForm(function() { alert(You just uploaded using Form 1); }); My PHP code now concludes with the following: echo json_encode(array (result = success, photoID = $newPhotoID)); I tried replacing my static alert with the following alert (just to make sure I'm seeing the data): $('#imageUploader1').ajaxForm(function() { var data = eval('(' + data + ')'); alert(You just uploaded using Form 1 and the result was + data.result); }); Unfortunately, that's not working. What am I missing? Since I'm using jquery and jquery form as is, I can't see how to specify the JSON info (as I would be able to do if I was manually doing the form submission. Thanks, as always.
[jQuery] Re: unblockUI() problems in IE
Normally you wouldnt. I just had a blank page and didnt put in all the html tags in there. Felt stupid afterwards. It worked in Firefox. Anyway, it works fine now. all is good. On Sep 4, 10:08 am, Mike Alsup mal...@gmail.com wrote: Yeah take out the html head body tags in your example, and in IE you should get the error i was talking about. just leave the script tags and the div. Why would I want to do that?
[jQuery] Re: Port Prototype Code to jQuery?
Any thoughts on my previous reply? Leave the markup as-is and replace the Prototype script with this jQuery. I tried to make the selectors do most of the work, but it still has the downsides of the original code such as not validating price inputs. $(function(){ var calculate = function() { var total = 0; $(tr.fieldpair:has(:checked) :text).each(function(){ total += +this.value; }); $(#total_amount).text(total); }; calculate(); $(tr.fieldpair :checkbox).click(calculate); $(tr.fieldpair :text).keyup(calculate); });
[jQuery] animate : animable properties
Hi, I'm coding a jQuery plugin to draw modal windows. In this plugin, I make animations to show and hide the modal window. I'd like my plugin to be as much customizable as possible. So I want the animations to be customizable also. To do this, I have one option for the general css properties (the style of the window), one for css properties before showing animation, and one for css properties after hidding animation. To make the show animation, I start by applying general style + before styles (before styles overwrites general styles). Than I get the difference between before styles and general styles,, and I use this object as the animation properties. To make the hide animation, the general styles are already applied, I just launch an animation using the after hiding styles as the animation properties. All this works very well, but I have just one small problem : All css properties can't be used as animation properties. And if I try to launch an animation with a non-animable css property, than the animation bugs. So I have to filter the properties I give to the animate function, to remove all non-animable properties. But to do this, I have to get a list of animable css properties. Does someone knows how I can manage to get this list ? is there something like this in jQuery ? Nico
[jQuery] jcarousel
Hello, i tought of using your slider on my website, but is there anyway to make the slider larger and were in the code would i do that? thx for a creat slider!
[jQuery] fading images
Hi all, I am trying to create a fading image swap for my body's background, using jQuery. Since I could not find out how to just fade a backgroundImage (especially) on the body tag in the CSS, I created a #background tag in my CSS looking like this: #background { width: 100%; min-height: 100%; height:auto !important; height:100%; background-image:url(../img/bgs/lightBlue.jpg); background-repeat: repeat; } The whole background div wraps around all other divs, so when fading the background div, my page is lost. Which is not an option. So I tried creating a Class for the background div called .bg_image losing the two background-* lines from the #background style. The class lookes like this: .bg_image { background-image:url(../img/bgs/lightBlue.jpg); background-repeat: repeat; } However fading only the class with jQuery will also end up in fading the whole div. again causing my page to get lost.. Since I am new at jQuery, can anyone help me out with the fading of only a background image. Is this in anyway possible, or do I have to write my own code. My full stylesheet by the way looks like this: @charset utf-8; /* CSS Document */ body,html,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #00; height:100%; margin: 0; padding: 0; } body { background-color: #CC; background-image:url(../img/bgs/curlyGrey.jpg); background-repeat: repeat; text-align: center; } #background { width: 100%; min-height: 100%; height:auto !important; height:100%; background-image:url(../img/bgs/lightBlue.jpg); background-repeat: repeat; } #distance { width:1000px; height:50%; margin-bottom:-300px; /* half of container's height */ overflow: hidden; } #mainMovie { position: relative; top: 0px; left: 0px; height:600px; width:1000px; }
[jQuery] Re: New iPhone-style button plug-in released...
You can see a demo here:http://www.givainc.com/labs/ibutton_example.htm Love it, Dan. Nice job.
[jQuery] TableSorter and colspans
Anyone familiar with this plugin? The docs say that it supports colspans but it doesn't appear to do so. The script has a checkCellColSpan function defined but it is never invoked. I really need colspan support.
[jQuery] Re: Ajax not working in Firefox
I'll see if I can take a look at server log files. Has anybody else experienced problems using ajax with FF3? Any other ideas are appreciated. Thanks On Sep 4, 10:10 am, Mike McNally emmecin...@gmail.com wrote: Well frankly that's not looking like a jQuery problem to me. Your *server* is returning different results. I have no idea why, but I don't see what jQuery (or anything else at the client) is supposed to do about that. Do you have debug logging or other debug facilities at the server to see what's going on? On Fri, Sep 4, 2009 at 10:04 AM, RPragerryan.pra...@gmail.com wrote: Here is the only difference I found in the Request Headers: FF2: Content-Type application/x-www-form-urlencoded FF3: Content-Type application/x-www-form-urlencoded; charset=UTF-8 Any ideas? On Sep 4, 9:47 am, RPrager ryan.pra...@gmail.com wrote: Firefox 3 response: HTMLBODYHR H1 ALIGN=CENTERNot available at present/H1 PStatus code = NL !-- NL --HR/BODY/HTML According to our back end developer, the NL = 'Null execution'. Meaning that the page (newcoleng) was launched without any input at all. I.e., neither a FORM nor any positional parameters. The page is at a loss as to how to serve my needs. Firefox 2 response (this is not the exact full response because it would be rather large): !DOCTYPE html PUBLIC -//W3C//DTD HTML 1.0 Transitional//EN http://www.w3.org/TR/xhtmll/xhtmll-loose.dtd; htmlheadtitlePage Title/title/headbodyThis page was a success/body/html I just realized that the Firefox 2 response included the DOCTYPE while Firefox 3 did not. Thanks for the help. On Sep 3, 9:59 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: Well what exactly is the error? What is different about the server response from FF2 vs. FF3? On Sep 3, 9:04 pm, RPrager ryan.pra...@gmail.com wrote: I've been using Firebug. The data that my browser is sending looks as expected. Here is the information from firebug: Response Headers Date: Fri, 04 Sep 2009 01:54:24 GMT Server: Apache/2.2.6 (Fedora) Content-Length: 179 Connection: close Content-Type: text/html Request Headers User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.0.13) Gecko/2009073022 Firefox/3.0.13 Accept */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive Content-Type application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With XMLHttpRequest Content-Length 24 Pragma no-cache Cache-Control no-cache Post F10 Yes F11 No Any ideas why Firefox 3 would be having issues with my ajax request? On Sep 3, 3:34 pm, emmecin...@gmail.com emmecin...@gmail.com wrote: You **must** install and use something like Firebug or TamperData to see what your browser is sending to the server, and what your server is sending back. Just because the HTML response content looks like an error does not necessarily mean that the HTTP response contained an error code (for example). On Sep 3, 1:29 pm, RPrager ryan.pra...@gmail.com wrote: I just tested this code using FF2 and it works just fine. This appears to be a FF3 problem only. I'm currently using Firefox version 3.5.2. Any ideas? On Sep 3, 10:31 am, RPrager ryan.pra...@gmail.com wrote: Thanks for the idea but adding (dataType: 'text') did not produce a different result. On Sep 3, 9:32 am, 月讀 keyoft...@gmail.com wrote: My english is not well. $.ajax({ type: POST, url: newcoleng, data: F10=YesF11=No, dataType: 'text', success: function(data){ alert( Data Saved: + data ); } }); Try it. -- Turtle, turtle, on the ground, Pink and shiny, turn around.
[jQuery] Re: New iPhone-style button plug-in released...
We've just released another jQuery plug-in which emulates the iPhone-style button used to toggle settings on/off. Very nice, Dan. I like the way you haven't forgotten keyboard access.
[jQuery] Re: error when uploading files
I get an error Error: Form elements must not be named submit This is a handy page to use for checking your code, or just for reading the notes to be sure you aren't using any of the special DOM names that trigger problems. http://yura.thinkweb2.com/domlint/
[jQuery] Re: error when uploading files
This is a handy page to use for checking your code, or just for reading the notes to be sure you aren't using any of the special DOM names that trigger problems. http://yura.thinkweb2.com/domlint/ Excellent link, Dave. Thanks.
[jQuery] Re: plugin: combine features from multiple demos + skip validation of hidden sections [validation] [accordion]
ok, i'm getting closer ... although i still haven't figured out how to do custom contextual warnings as noted in the last post. the problem i'm having now is that i have a radio button in my final accordion container. i want the button to be required (checked=checked) for the form to validate. but i need it to be unchecked when the user opens the last part of the form, forcing them to select it before final submission. the behaviour of the plugin is to validate the entire form when the user clicks the 'next' button, which causes the form not to open the final accordion if the radio button isn't checked. how can i have it skip validating the final part (or any hidden section) of the form until the accordion makes it visible? thanks, --cz On Sep 3, 9:53 am, seezee debbil...@gmail.com wrote: hi, jörn, thanks for the great plugin. if i can get it working as we need it on our main site, we'll be adding it to all our other sites as well. i managed to get the form to validate w/ accordion functionality yesterday (i found the custom method before you replied), but i don't see how i can have multiple warnings based on context, which is pretty straightforward in the other examples. for instance, if if have: class=pageRequired letterswithbasicpunc i then have the choice of either omitting the title tag, in which case the contextual message for 'letterwithbasicpunc' appears when needed, but the standard message appears otherwise, or i can include a title tag with a custom warning, which appears in _all_ contexts. is there a workaround for this? On Sep 3, 6:53 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Take a closer look at the multipart demo and its custom pageRequired-method - thats key! Jörn On Wed, Sep 2, 2009 at 11:24 PM, seezeedebbil...@gmail.com wrote: i posted this to the plugin group, but it appears to be a dead forum -- last post was february. i'm trying to combine features of these 2 demos: http://jquery.bassistance.de/validate/demo/milk/ http://jquery.bassistance.de/validate/demo/multipart/ specifically, i want the ability to use custom error messages and to declare conditions in the page head, as in the 1st demo, as well as to use the accordion feature of the 2nd. if i use the code from the milk demo in the head, e.g., $(document).ready(function() { // validate signup form on keyup and submit var validator = $(#signupform).validate({ rules: { [rules] }, messages: { [messages] }, }); } validation runs on the entire form, including the sections not yet made visible. this prevents the 'next' button from operating, so the accordion won't expand. if i assign a unique id to the each fieldset run separate validations for each fieldset, the accordion works, but the validation stops working. i'm pretty lousy at javascript, so i could sure use some help. has anyone else out there successfully tried this?
[jQuery] Re: New iPhone-style button plug-in released...
Keyboard support is often overlooked, but it's always high on our priority list because many of our users are very keyboard centric and don't like using the mouse at all. On Fri, Sep 4, 2009 at 12:23 PM, Dave Methvin dave.meth...@gmail.comwrote: We've just released another jQuery plug-in which emulates the iPhone-style button used to toggle settings on/off. Very nice, Dan. I like the way you haven't forgotten keyboard access.
[jQuery] Proper way to detect webkit-based browsers?
Now that we're switching to feature detection rather than browser detection, how does/should one detect for a webkit browser? Is there a known feature that we can check for that would Identify Safari and Chrome? We're running into some (rather minor) layout issues with some jquery plug-in rendered content in Chrome and Safari and it'd be really easy to just do a 'if a webkit browser, tweak this' type of logic. -Darrel
[jQuery] Re: Clickable div?
and don't forget to add the css cursor: pointer to make the user's mouse cursor look like a link On Sep 4, 1:15 pm, Charlie Griefer charlie.grie...@gmail.com wrote: does that div have an id attribute? if so, $('myDivID').click(function() { do stuff here }); On Fri, Sep 4, 2009 at 10:13 AM, lukas animod...@gmail.com wrote: I have a div that only contains an image. How would I create a jquery-click function that basically would represent a normal a tag for his div? Thank you! -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Re: Clickable div?
Thank you! It somehow does not work. Here is what I got: $(#logo:a).click(function(){ $.cookie('startCookie', 'default').load('http://www.mylink.com'); }); And here is the html: div id=logoa href=template language defines the link here/ a/div Does anybody have an idea?
[jQuery] Re: An idiot's question about returning results from a form submission
Thank you, once again, Brian. I got everything working by replacing... $('#imageUploader1').ajaxForm(function() { alert(I wish I could post the actual server response.); }); with... var options = {success: showResponse}; $('#imageUploader1').ajaxForm(options); and then added an additional function... function showResponse (responseText, statusText){ alert(The response from the server is: + responseText); } Now, I can substitute the alert for code that will update the photo on the web page. Thanks again.
[jQuery] Re: Clickable div?
I don't know that you can use a filter the way you're trying to (using the colon in #logo:a). Filters are more like tr:first (matches the first tr element), tr:odd (matches odd-numbered table rows.. good for zebra-striping)... See the sections about the various types of filters at http://docs.jquery.com/Selectors. As far as your issue... the 'a' in question is a child of the #logo element, so you'd want $('#logo a').click(function() { }); http://docs.jquery.com/Selectors/child#parentchild On Fri, Sep 4, 2009 at 10:53 AM, lukas animod...@gmail.com wrote: Thank you! It somehow does not work. Here is what I got: $(#logo:a).click(function(){ $.cookie('startCookie', 'default').load(' http://www.mylink.com'); }); And here is the html: div id=logoa href=template language defines the link here/ a/div Does anybody have an idea? -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Adding/Removing and Resizing jScrollPane - Reinitializing jScrollPane
I am building a little widget which is using jScrollPane to add a scrollbar for where the data doesn't fit inside the alloted space. When the user clicks on the data, I hide what they had, and show the clicked data in a different format. Sometimes the data needs a scrollbar, sometimes not, and sometimes the ammount of scrolling needs to be resized. I've taken a look at how Kevin Luck reinitializes the jScrollPane with ajax data (mine is not loaded via ajax, just a different display of the data), but I can't seem to get it to work. My code looks like this code function addRemovejScrollPane(containedDiv){ alert(jQuery(containedDiv).height()); if(jQuery('div#holdAll').height()jQuery(containedDiv).height()){ jQuery('div#holdAll').jScrollPane(); } if(jQuery('div#holdAll').height()=jQuery(containedDiv).height ()){ jQuery('div#holdAll').jScrollPaneRemove(); } } /code This is attempting to get the height of the child, and if larger, reinitialize the scrollbar, if smaller, remove the scrollbar. Is there a better way to do this? I add the 'containedDiv' because I have all my divs within holdAll, and then I show and hide them based on user actions.
[jQuery] Re: Clickable div?
Oooh good call. I had forgotten :) On Fri, Sep 4, 2009 at 10:20 AM, MorningZ morni...@gmail.com wrote: and don't forget to add the css cursor: pointer to make the user's mouse cursor look like a link On Sep 4, 1:15 pm, Charlie Griefer charlie.grie...@gmail.com wrote: does that div have an id attribute? if so, $('myDivID').click(function() { do stuff here }); On Fri, Sep 4, 2009 at 10:13 AM, lukas animod...@gmail.com wrote: I have a div that only contains an image. How would I create a jquery-click function that basically would represent a normal a tag for his div? Thank you! -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Clickable div?
I have a div that only contains an image. How would I create a jquery-click function that basically would represent a normal a tag for his div? Thank you!
[jQuery] Re: Clickable div?
does that div have an id attribute? if so, $('myDivID').click(function() { do stuff here }); On Fri, Sep 4, 2009 at 10:13 AM, lukas animod...@gmail.com wrote: I have a div that only contains an image. How would I create a jquery-click function that basically would represent a normal a tag for his div? Thank you! -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Test message - Please disregard
Testing out an issue on the list. Please disregard. Rey jQuery Team
[jQuery] Re: Clickable div?
I don't understand... The first post says I have a div that only contains an image and later on a post says: And here is the html: div id=logoa href=template language defines the link here/ a/div That wouldn't be a div with only an image there On Sep 4, 2:02 pm, Charlie Griefer charlie.grie...@gmail.com wrote: I don't know that you can use a filter the way you're trying to (using the colon in #logo:a). Filters are more like tr:first (matches the first tr element), tr:odd (matches odd-numbered table rows.. good for zebra-striping)... See the sections about the various types of filters athttp://docs.jquery.com/Selectors. As far as your issue... the 'a' in question is a child of the #logo element, so you'd want $('#logo a').click(function() { }); http://docs.jquery.com/Selectors/child#parentchild On Fri, Sep 4, 2009 at 10:53 AM, lukas animod...@gmail.com wrote: Thank you! It somehow does not work. Here is what I got: $(#logo:a).click(function(){ $.cookie('startCookie', 'default').load(' http://www.mylink.com'); }); And here is the html: div id=logoa href=template language defines the link here/ a/div Does anybody have an idea? -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Superfish - Not Rendering on Postback
Hello, I am using Superfish for the menu system on a 3.5 asp.net webform. Everything is working good except during postbacks. For instance we use the selected ID, during the postback event of a dropdown list to filter data for another list. The menu is rendering fine until the postback event. From what I can tell the menu is not rendering at all and none of the superfish events seem to be firing. In the master page for the site I've got the following code to execute the menu. script type=text/javascript $(document).ready(function() { $('ul.sf-menu').superfish(); }); /script Any assistance would be greatly appreciated. -R
[jQuery] Superfish Menu
Hello, I'm trying to use de Superfish menu in a site i'm developing. I would like to change the jquery animation but i really don't know how. In the menu options there is a line like this: animation : {opacity:'show'}. But i can't make it work if i change the word 'opacity'. Thakns in advance and sorry for my bad enshlish :( Diego
[jQuery] Re: Superfish Menu
don't know what animation you want here's an example: animation:{width:'show', height:'show'}, speed:800 speed option controls animation PasKa wrote: Hello, I'm trying to use de Superfish menu in a site i'm developing. I would like to change the jquery animation but i really don't know how. In the menu options there is a line like this: "animation : {opacity:'show'}". But i can't make it work if i change the word 'opacity'. Thakns in advance and sorry for my bad enshlish :( Diego
[jQuery] Re: Has anyone now how to simplify the following expression by avoiding using attr(id)
$(obj).siblings('p:last') should give the same results. Remember that you can access the id via obj.id directly. Here are two possible rewrites: http://snipt.org/mHj On Sep 4, 7:22 am, varlo va...@ukr.net wrote: Has anyone now how to simplify the following expression by avoiding using attr(id) alert($(#+$(obj).attr(id)+~p:last).attr(id)); I need this because not every image could have an id. script language=javascript type=text/javascript function ExpandCollapseOnLeftPanel(obj) { if ($(obj).attr(src) == /Content/Images/arrow_bot.gif) { // expand $(obj).attr(src, /Content/Images/arrow_side.gif); $(# + $(obj).attr(id) + ~p:last).css(display, block); } else //collapse { $(obj).attr(src, /Content/Images/arrow_bot.gif); $(# + $(obj).attr(id) + ~p:last).css(display, none); } } /script div class=blok img id=iTA src=/Content/Images/arrow_bot.gif alt= class=l_ar onclick=ExpandCollapseOnLeftPanel(this) / p id=p1 Tracking activities /p p style=display:none a href=#home/abr / movie...@lucy,@Bob(3)br / @Canlis table for 2 at ..(1)br / /p /div
[jQuery] Re: Clickable div?
Can you try this: $(#logo).click(function(){ $.cookie('startCookie', 'default').load('http://www.mylink.com '); }); You do not have to put the a there as logo being the parent will receive the click even as part of the event bubbling. Thanks, Anoop On Fri, Sep 4, 2009 at 2:02 PM, Charlie Griefer charlie.grie...@gmail.comwrote: I don't know that you can use a filter the way you're trying to (using the colon in #logo:a). Filters are more like tr:first (matches the first tr element), tr:odd (matches odd-numbered table rows.. good for zebra-striping)... See the sections about the various types of filters at http://docs.jquery.com/Selectors. As far as your issue... the 'a' in question is a child of the #logo element, so you'd want $('#logo a').click(function() { }); http://docs.jquery.com/Selectors/child#parentchild On Fri, Sep 4, 2009 at 10:53 AM, lukas animod...@gmail.com wrote: Thank you! It somehow does not work. Here is what I got: $(#logo:a).click(function(){ $.cookie('startCookie', 'default').load(' http://www.mylink.com'); }); And here is the html: div id=logoa href=template language defines the link here/ a/div Does anybody have an idea? -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Re: Clickable autocomplete, like google
nobody knows? :p On 3 set, 12:59, ladksak slingrs...@gmail.com wrote: the problem is that i need it to work with the script i posted the link thats because the UI Autocomplete is not as good... if i type ODE in the ui he doesn't show CODE i need it to ODE show CODE and ODESSA, like he could find the string in any part of the keywords and highlight that thats what the dyve script does thanks anyway man!
[jQuery] Re: Clickable div?
Thank you everybody! I made it work by applying display:block and width/height to the a tag within the div. The confusion was created by IE treating the image-containing div differently than the rest of the crop. It tried everything that the next div would not jump below the logo div in IE. The display:block markup in IE is stronger than in all the other browsers unfortunately...
[jQuery] Validate Plugin - Charcode Warning in Firebug
I'm using the jQuery Validate plugin. I have a basic form that asks for someone's name: input type='text' name='gsFname' class='required ' class='prompt' size='18' maxlength='50' When I enter the first character into the field, I get a Firebug warning: The 'charCode' property of a keyup event should not be used. The value is meaningless. Is there a way to fix this?
[jQuery] Re: Reverse slideUp/slideDown
On Sep 4, 2009, at 3:43 AM, V wrote: When using slideDown, you will see the content. Using slideUp will hide the content. Now I want to use slideUp to view the content, so it will start from nothing and slide to an object from bottom to top. Is there a good way to do this, or should I fox it with animate and scrollTop? Yes. Set the element's position and bottom properties in CSS. See here for details: http://www.learningjquery.com/2009/02/slide-elements-in-different-directions --Karl Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Form Serialize - Not replace space with plus
I'm using $(form).serialize(), and then doing an AJAX request. JQuery automatically replaces spaces with the + character. How can I keep my spaces? (I couple replace the + character with a space on the server side, but I want the users to be able to enter the + character when they submit forms.) The serialize function properly encodes data per the HTML spec. Don't worry about users entering +, those characters will be encoded too (to %2B). The decoding takes place on the server. Mike
[jQuery] Looking for plugin to refresh images randomly
Hello, I am looking for some jquery plugin that would replicate what is done on this page http://www.lorigrahamdesign.com/index.php Basically there are 5 images which keep changing (fade in/out) randomly and when clicked they take the user to a new page. I remember seeing lots of jquery plugins regarding this but am not coming across them now. I would appreciate if someone can guide me in this regard?
[jQuery] Re: JCarouselLite - pause scrolling
on 8/28/09 5:37 PM, Steffan Cline at stef...@hldns.com wrote: I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Anyone? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Form Serialize - Not replace space with plus
I'm using $(form).serialize(), and then doing an AJAX request. JQuery automatically replaces spaces with the + character. How can I keep my spaces? (I couple replace the + character with a space on the server side, but I want the users to be able to enter the + character when they submit forms.)
[jQuery] Re: plugin: combine features from multiple demos + skip validation of hidden sections [validation] [accordion]
not sure what i did, but i got this last bit working. i still need help on custom messages, could use some guidance on getting contextual dependencies working with the accordion (making a radio input required only if a previous checkbox was selected -- i've looked at the examples, but can't get them to work in the context of the accordion). cheers, --cz On Sep 4, 11:34 am, seezee debbil...@gmail.com wrote: ok, i'm getting closer ... although i still haven't figured out how to do custom contextual warnings as noted in the last post. the problem i'm having now is that i have a radio button in my final accordion container. i want the button to be required (checked=checked) for the form to validate. but i need it to be unchecked when the user opens the last part of the form, forcing them to select it before final submission. the behaviour of the plugin is to validate the entire form when the user clicks the 'next' button, which causes the form not to open the final accordion if the radio button isn't checked. how can i have it skip validating the final part (or any hidden section) of the form until the accordion makes it visible? thanks, --cz On Sep 3, 9:53 am, seezee debbil...@gmail.com wrote: hi, jörn, thanks for the great plugin. if i can get it working as we need it on our main site, we'll be adding it to all our other sites as well. i managed to get the form to validate w/ accordion functionality yesterday (i found the custom method before you replied), but i don't see how i can have multiple warnings based on context, which is pretty straightforward in the other examples. for instance, if if have: class=pageRequired letterswithbasicpunc i then have the choice of either omitting the title tag, in which case the contextual message for 'letterwithbasicpunc' appears when needed, but the standard message appears otherwise, or i can include a title tag with a custom warning, which appears in _all_ contexts. is there a workaround for this? On Sep 3, 6:53 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Take a closer look at the multipart demo and its custom pageRequired-method - thats key! Jörn On Wed, Sep 2, 2009 at 11:24 PM, seezeedebbil...@gmail.com wrote: i posted this to the plugin group, but it appears to be a dead forum -- last post was february. i'm trying to combine features of these 2 demos: http://jquery.bassistance.de/validate/demo/milk/ http://jquery.bassistance.de/validate/demo/multipart/ specifically, i want the ability to use custom error messages and to declare conditions in the page head, as in the 1st demo, as well as to use the accordion feature of the 2nd. if i use the code from the milk demo in the head, e.g., $(document).ready(function() { // validate signup form on keyup and submit var validator = $(#signupform).validate({ rules: { [rules] }, messages: { [messages] }, }); } validation runs on the entire form, including the sections not yet made visible. this prevents the 'next' button from operating, so the accordion won't expand. if i assign a unique id to the each fieldset run separate validations for each fieldset, the accordion works, but the validation stops working. i'm pretty lousy at javascript, so i could sure use some help. has anyone else out there successfully tried this?
[jQuery] Re: Replacing like items
on 8/31/09 10:42 AM, mkmanning at michaell...@gmail.com wrote: Play around with this: $('input[value*=||]').change(function(){ var $this = $(this),val = $this.val().split('||')[1]; if($this.is(':checked')){ $this.removeAttr('disabled').siblings('input[value$='+val+']').attr ('disabled','disabled'); } else { $this.siblings('input[value$='+val+']').removeAttr('disabled'); } }); This looks like it should work. I'm trying to figure out why it's not. There are no js errors either. What you're trying to do is make checkboxes behave like radio buttons, so why not just use radios, as they're far more appropriate for selecting only one of several choices? While you are right about making it behave like radio dials, it's a complex form and its unfortunately not my call. :-( On Aug 30, 12:44 pm, Steffan A. Cline stef...@hldns.com wrote: I have a form of data I am working on where I may have *nearly* the same thing appear with a checkbox appear multiple times. For example: input type=checkbox name=blah value=widget1||123456 input type=checkbox name=blah value=widget2||123456 input type=checkbox name=blah value=widget3||123456 input type=checkbox name=blah value=widget4||123456 input type=checkbox name=blah value=widget5||123456 So, if checkbox #1 (widget1) is checked, it will either disable all other ones containing the sku 123456 OR replace the others in the form having sku 123456 with an image of a sort. Is there a way to select this without iterating through every checkbox in the form and looking at it's value? Thanks Steffan Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: New iPhone-style button plug-in released...
Great... great.. congrats.. - Original Message - From: Dan G. Switzer, II To: jquery-en@googlegroups.com Sent: Friday, September 04, 2009 10:45 AM Subject: [jQuery] Re: New iPhone-style button plug-in released... Keyboard support is often overlooked, but it's always high on our priority list because many of our users are very keyboard centric and don't like using the mouse at all. On Fri, Sep 4, 2009 at 12:23 PM, Dave Methvin dave.meth...@gmail.com wrote: We've just released another jQuery plug-in which emulates the iPhone-style button used to toggle settings on/off. Very nice, Dan. I like the way you haven't forgotten keyboard access.
[jQuery] Re: Hidden div height width
not sure if this is practical or not but you could clone it offscreen , get clone dimensions, then remove clone rupak mandal wrote: Thanks for the quick reply . The problem is that i cannot use visibility:hidden or position absolute. On Fri, Sep 4, 2009 at 3:42 PM, joey santiago federico.pr...@yahoo.it wrote: exactly... but if you hide it with visibility:hidden, then you still see an empty space on the page... you should hide it by setting his absolute position to top and left negative values, or (probably better?) using z-index property. hope it's useful! :) On 4 Set, 12:04, Cold Flame theumairsha...@gmail.com wrote: Hi Rupak, if div is hidden using css display:none then you can't get its height or width because logically that element is that drawn on the browser. While if u hide the div using css visibility:hidden then u can get the height and width of the element. Regards Umair Shahid On Sep 4, 3:45pm, Rupak rupakn...@gmail.com wrote: Hi all Can any one tell me is it possible to get the height and width of a hidden div. I have to apply animation to a hidden div. But is don't know how to do this. Thanks Rupak
[jQuery] Re: Form Serialize - Not replace space with plus
Encode the URL string prior to submitting? This is almost always the safest method. Just decode it server side. With all encoded characters, JQ has nothing it need add +'s to. -- Scott Iphone says hello. On Sep 4, 2009, at 1:19 PM, Aaron Kreider aa...@campusactivism.org wrote: I'm using $(form).serialize(), and then doing an AJAX request. JQuery automatically replaces spaces with the + character. How can I keep my spaces? (I couple replace the + character with a space on the server side, but I want the users to be able to enter the + character when they submit forms.)
[jQuery] Re: TableSorter and colspans
Ive used the tablesorter alot in my projects, and Ive had the need for this as well. I found a DataTables plugin which looks like it can do colspans, but I havent tried it. I actually looked after reading your post to see if it supported the colspans now, as earlier versions didnt and I see it looks like it does. http://www.datatables.net/examples/ Cheers, Matthew On Sep 4, 12:14 pm, Mike Alsup mal...@gmail.com wrote: Anyone familiar with this plugin? The docs say that it supports colspans but it doesn't appear to do so. The script has a checkCellColSpan function defined but it is never invoked. I really need colspan support.
[jQuery] clicking Submit does not refresh the page -but- submitting with an onchange event does
I have a form... form id=imageUploader1 action=upload-image.php method=post enctype=multipart/form-data input name=photoNumber type=hidden value=1 input name=sourceFile type=file size=20 style=font-size: 8pt; brinput type=submit value=Upload Photo #1 style=margin-top: 2pt; font-size:8pt; /form ... that is gets processed by AjaxForm on submit... // Set Ajax options var options = {success: respondToUpload}; // Register forms $('#imageUploader1').ajaxForm(options); // Display uploaded photo function respondToUpload(responseText){ var response = eval('(' + responseText + ')'); parent.client.document.getElementById(uploadedPhoto + response.photoNumber).src = ../surveys/photos/ + response.surveyID + .jpg; } The form is programmatically generated by JavaScript after the document is loaded, which is why it's explicitly registered (as shown above). Everything works perfectly (thanks to a lot of help from Brian) when the Submit button is clicked -- that is, the form is submitted, the photo that was specified in file-input is uploaded, the PHP script generates a unique file name, the json_encoded array (containing the new file name) is sent back to the JavaScript, and a respondToUpload function consistently executes without a hitch and without a page refresh. Next, I'd like to enhance the form by removing the Submit button and automatically submitting the form based on an onchange event in the file-input field. In other words, I want to change the input-file field from... input name=sourceFile type=file size=20 style=font-size: 8pt; ... to input name=sourceFile type=file size=20 style=font-size: 8pt; onchange=document.getElementById('imageUploader').submit(); Unfortunately, when the form gets submitted by the input-file's onchange event, the page refreshes. If I remove the onchange event, and leave everything else the same, clicking the Submit button does not refresh the page. Does anyone know why this is happening and how I can get around it? The UI is so much nicer without the Submit button. Thanks.
[jQuery] Re: clicking Submit does not refresh the page -but- submitting with an onchange event does
I should be clearer on what I mean when I say the page refreshes when an onchange event is used to submit. Specifically, I see the echo'd result from PHP. {result:success,surveyID:0001.1252110846.2,submitTime: 1252110846,photoNumber:1}