[jQuery] How to remove 'null' or replace it with "" for the returned data?
$.getJSON('/MailDatQueryJsonAction', {mailDatHeaderID:maildatheaderid},function(data){ $('#historyJobID').attr("value",data.historyJobID); } In jquery-1.2.1.js, when data.historyJobID is empty,it will return "",correct!! But in jquery-1.3.2.min.js, it returns "null". Who can help me resolve this problem?
[jQuery] Re: Can not get Select
Thanks for your reply. all the select elements are in a form. But those selects can be referenced correcly after i insert some unused element such as Company: Division: it is ok now,but why not after i removed buttons? On 4月19日, 下午4时16分, James wrote: > Your HTML for is not valid. > It's suppose to be in the form of: > > >option > > > Is there a reason you're doing it like that? > > On Apr 18, 8:27 pm, neil wrote: > > > > > > > SelectFileNameDate > > > > Company: > > > > > > Division: > > > > > > i can reference the fist select 'licenseeID' and populate it. > > > but the third 'divisionID' can not be referenced,which says 0.options. > > > var licenseeid=$('#licenseeSelectID').val(); > > $('#divisionSelectID')[0].options.length=0;- 隐藏被引用文字 - > > - 显示引用的文字 -
[jQuery] Can not get Select
SelectFileNameDate Company: Division: i can reference the fist select 'licenseeID' and populate it. but the third 'divisionID' can not be referenced,which says 0.options. var licenseeid=$('#licenseeSelectID').val(); $('#divisionSelectID')[0].options.length=0;
[jQuery] how to access the data from $.getJSON(ur,pa rams,function(data)(){}
Hello, I am using struts2 and Jquery now. And who can please tell me how to access the sorttiervo from the 'data'$.getJSON('SortTiersAction',params,function(data)(){} data.sorttiervo? or other ways? public class SortTiersAction extends BaseActionS2 implements ModelDriven { SortTierService sorttierservice = new SortTierService(); private SortTierVO sorttiervo = new SortTierVO(); public void setModel(SortTierVO sorttiervo) { this.sorttiervo = sorttiervo; } public Object getModel() { return this.sorttiervo; } public String execute() throws DefaultException { //do someting here; } in struts.xml file true
[jQuery] Re: IE Help
Michael, I talked to the people over on the EXT board, and yes - I WAS in fact being a dumbass. The standard EXT include order changes w/ the jQuery adapter. So I have that resolved, and now.I can't get the jQuery document onReady function to fire in IE at all - of course, in FF it works just fine (why am I not surprised). As always, any ideas are appreciated - link is the same, http://www.healthpro-rehab.com/oldsite/reports_hmbi.cfm nb From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Michael Geary Sent: Monday, February 16, 2009 10:51 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: IE Help Sounds good, Neil. And don't let my "reinterpretation" of your original post put you off - come on back any time! :-) -Mike _ From: Neil Bailey Thanks Michael - I will do just that. From: Michael Geary ...Not being familiar with the inner workings of Ext, I'm not sure what to suggest, except to ask about this in the Ext forum.
[jQuery] Re: IE Help
Hahaha I understand completely. And cannot tell you how much I appreciate the assistance. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MorningZ Sent: Monday, February 16, 2009 8:59 PM To: jQuery (English) Subject: [jQuery] Re: IE Help > I appreciate the tactful way you said, "Hey, > dumbass, what the hell is wrong w/ you" J it's not that at all... but time and time and time again people on this mailing group don't make it very easy for others to help them out
[jQuery] Re: "undefinedjquery.block.js"
David - much thanks, sir. I appreciate your help - that did the trick. Thanks again. nb From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of David Andrews Sent: Saturday, February 14, 2009 11:17 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: "undefinedjquery.block.js" Hi Neil, Check this out "In the following code I'm including more than what is necessary for AjaxCFC to function. The only bits required for AjaxCFC to work are: json.js, wddx.js, and wddxDes.js (depending on which you intend to use for serialization). I just include json.js because I don't really use wddx. However, this shows an example of how you could use one script tag to include lots of different .js files" from the website http://cjordan.us/index.cfm/2007/7/8/jQuery--AjaxCFC-Tutorial-Part-1-Setting -Up-Your-AJAX-Call HTH Dave On 15 Feb 2009, at 01:49, Neil Bailey wrote: I am just getting started w/ jQuery, so if this is just a ridiculous question that has been answered a million times, I apologize in advance. I googled, and didn't find ANYTHING, so I am hoping that maybe someone on this list has seen it. I have the following code: $.AjaxCFCHelper.setDebug(false); $.AjaxCFCHelper.setBlockUI(true); $.AjaxCFCHelper.setUseDefaultErrorHandler(true); $.AjaxCFCHelper.setSerialization('json'); // json, wddx //fire the AJAX event $(document).ready(function(){ //create a test object to send to the server var _o = {"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^<a rel="nofollow" href="http://.*"}">http://.*"}</a>, {"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"}, {"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"} ], "foo" : "bar", "baz" : "thud" }; alert(_o); /* $.AjaxCFC({ url: "<a rel="nofollow" href="http://www.healthpro-rehab.com/oldsite/components/echoTest.cfc"">http://www.healthpro-rehab.com/oldsite/components/echoTest.cfc"</a>;, method: "echo", data: _o, //data: 'rob', //data: ['simple string', 'two'], //unnamedargs: true, //serialization: "json", //blockUI: true, //useDefaultErrorHandler: true, success: function(data) { sDumper(data); }, failure:function(){alert("No Good!");} });*/ }) In firefox, I can view the source of both the JS files, and they both appear to be fine. However, there are FOUR files attached - one being undefinedjquery.block.js, and the other being undefinedjson.js. I thought at first it was something I was doing incorrectly w/ the AJAX call, but I am still having the issue even after commenting the ajax call out. Any help would be MUCH appreciated. Thanks in advance, nb
[jQuery] "undefinedjquery.block.js"
I am just getting started w/ jQuery, so if this is just a ridiculous question that has been answered a million times, I apologize in advance. I googled, and didn't find ANYTHING, so I am hoping that maybe someone on this list has seen it. I have the following code: $.AjaxCFCHelper.setDebug(false); $.AjaxCFCHelper.setBlockUI(true); $.AjaxCFCHelper.setUseDefaultErrorHandler(true); $.AjaxCFCHelper.setSerialization('json'); // json, wddx //fire the AJAX event $(document).ready(function(){ //create a test object to send to the server var _o = {"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}, {"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"}, {"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"} ], "foo" : "bar", "baz" : "thud" }; alert(_o); /* $.AjaxCFC({ url: "http://www.healthpro-rehab.com/oldsite/components/echoTest.cfc";, method: "echo", data: _o, //data: 'rob', //data: ['simple string', 'two'], //unnamedargs: true, //serialization: "json", //blockUI: true, //useDefaultErrorHandler: true, success: function(data) { sDumper(data); }, failure:function(){alert("No Good!");} });*/ }) In firefox, I can view the source of both the JS files, and they both appear to be fine. However, there are FOUR files attached - one being undefinedjquery.block.js, and the other being undefinedjson.js. I thought at first it was something I was doing incorrectly w/ the AJAX call, but I am still having the issue even after commenting the ajax call out. Any help would be MUCH appreciated. Thanks in advance, nb
[jQuery] Re: jQuery w ajaxCFC
We're using CF7, which doesn't support a returntype of JSON - I wish. I am looking into simply returning a "jsonEncode"ed string... I cannot tell you how much I appreciate you're help. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Josh Nathanson Sent: Friday, February 13, 2009 8:29 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery w ajaxCFC Really you don't need AjaxCFC at all. It does have a cfc to serialize and deserialize json but I think you can pick that up at riaforge. Or you can build your own json string in CF and return that from your function. Or you can use returnFormat=JSON in your cffunction to do the serialization for you. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Neil Bailey Sent: Friday, February 13, 2009 5:16 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery w ajaxCFC Josh, Just found the page at Rey Bango's blog - I really appreciate it. Do you know if this works w/ the current version of jQuery, and the current version of AjaxCFC? Thanks again. nb -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Josh Nathanson Sent: Friday, February 13, 2009 8:02 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery w ajaxCFC Do a search for "jquery coldfusion ajax" on Google, you'll find some good stuff. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Neil Bailey Sent: Friday, February 13, 2009 3:05 PM To: jquery-en@googlegroups.com Subject: [jQuery] jQuery w ajaxCFC We are currently running CF7 (management feels if it ain't broke), and have been using ajaxCFC for about three years now. We are looking to update our AJAX methodology, and Chris Jordan had strongly suggested we check out jQuery. We are also pretty entrenched w/ EXT for the front end UI, and would need any jQuery scripts to be able to co-exist w/ the EXT package. As we have never even laid eyes on jQuery, but have heard some very good things about it (Ray Camden has been yelling its virtues from the rooftops for a solid week now), if anyone has any tips or knows of any how-to blogs, I would greatly appreciate it. Thanks, nb
[jQuery] Re: jQuery w ajaxCFC
Josh, Just found the page at Rey Bango's blog - I really appreciate it. Do you know if this works w/ the current version of jQuery, and the current version of AjaxCFC? Thanks again. nb -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Josh Nathanson Sent: Friday, February 13, 2009 8:02 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery w ajaxCFC Do a search for "jquery coldfusion ajax" on Google, you'll find some good stuff. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Neil Bailey Sent: Friday, February 13, 2009 3:05 PM To: jquery-en@googlegroups.com Subject: [jQuery] jQuery w ajaxCFC We are currently running CF7 (management feels if it ain't broke), and have been using ajaxCFC for about three years now. We are looking to update our AJAX methodology, and Chris Jordan had strongly suggested we check out jQuery. We are also pretty entrenched w/ EXT for the front end UI, and would need any jQuery scripts to be able to co-exist w/ the EXT package. As we have never even laid eyes on jQuery, but have heard some very good things about it (Ray Camden has been yelling its virtues from the rooftops for a solid week now), if anyone has any tips or knows of any how-to blogs, I would greatly appreciate it. Thanks, nb
[jQuery] jQuery w ajaxCFC
We are currently running CF7 (management feels if it ain't broke), and have been using ajaxCFC for about three years now. We are looking to update our AJAX methodology, and Chris Jordan had strongly suggested we check out jQuery. We are also pretty entrenched w/ EXT for the front end UI, and would need any jQuery scripts to be able to co-exist w/ the EXT package. As we have never even laid eyes on jQuery, but have heard some very good things about it (Ray Camden has been yelling its virtues from the rooftops for a solid week now), if anyone has any tips or knows of any how-to blogs, I would greatly appreciate it. Thanks, nb
[jQuery] Re: Recommendation Required - Custom Classes Library
Note, that this applies to Mootools 1.11. I haven't touched version 1.2+, I'm sure they differ a lot. On Jan 23, 2:30 pm, Balazs Endresz wrote: > Then what if you just use Class.Extras and all its dependencies as it > is? Now that sounds too easy :) > > On Jan 23, 9:21 am, Neil Craig wrote: > > > I am not sure how Mootools 1.2+ is constructed but version 1.11 can > > easily be broken into pieces that excludes the parts that extend the > > DOM/HTML elements. The files that one should use is: > > > Core, Class, Class.Extras, String, Number, Function, Array > > > On Jan 21, 11:58 am, Balazs Endresz wrote: > > > > I only heard about this one, looks a bit different from Mootools but > > > much smaller:http://www.danwebb.net/2008/1/31/low-pro-for-jquery > > > > Though I wonder if it's possible to port the whole Mootools > > > implementation to jQuery? You can maybe keep some parts of Core, > > > Native and Class, and hack it to work with jQuery ... now that sounds > > > like a whole new framework :) > > > I don't know Mootools that much at all but maybe it's not as hard as > > > it sounds... > > > > On Jan 21, 8:18 am, Neil Craig wrote: > > > > > Bump :) > > > > > On Jan 20, 10:36 am, Neil Craig wrote: > > > > > > I was wondering, which Custom Classes Library is best to use along > > > > > with jQuery. Up to now, I've been using Mootools to create custom > > > > > classes that can be easily extended through its inheritance model. It > > > > > also has custom events that I have used extensively. > > > > > > Which library do you recommend that has the same functionality as > > > > > described above that can co-exist with jQuery peacefully? > > > > > > This could make for an interesting discussion
[jQuery] Re: jQuery 1.3.x & XPath
Mmmm, haven't tried that. Thanks! On Jan 29, 8:33 am, Klaus Hartl wrote: > On 29 Jan., 06:05, Neil Craig wrote: > > > I have tried it, but it yields no results when searching for elements. > > > What I loved about the xpath functionality was that I could have used > > the same functions on XML documents, not only on XHTML. > > Huh? CSS selectors will also work with XML. > > --Klaus
[jQuery] Re: jQuery 1.3.x & XPath
I have tried it, but it yields no results when searching for elements. What I loved about the xpath functionality was that I could have used the same functions on XML documents, not only on XHTML. I suppose another feature that has been lost is the custom psuedo selectors. On Jan 28, 3:54 pm, Karl Swedberg wrote: > On Jan 28, 2009, at 6:43 AM, Neil Craig wrote: > > > > > Earlier version of jQuery allowed one to search for elements using > > XPath, but after the implementation of the Sizzler selector engine, > > the XPath support was lost, or so it seems. > > > Any comments? > > Hi Neil, > > You're right that 1.3.x removed support for the [...@attr] syntax, but it > had been deprecated already for a long time. Using [attr] will achieve > the same thing. > > As of jQuery 1.2 (released Sept. 24, 2007), basic XPath such as > location path expressions, was removed. There is an XPath > compatibility plugin for those expressions > athttp://plugins.jquery.com/project/xpath/ > . Is that no longer working for you? > > --Karl > > Karl Swedbergwww.englishrules.comwww.learningjquery.com
[jQuery] jQuery 1.3.x & XPath
Earlier version of jQuery allowed one to search for elements using XPath, but after the implementation of the Sizzler selector engine, the XPath support was lost, or so it seems. Any comments?
[jQuery] Re: Recommendation Required - Custom Classes Library
I am not sure how Mootools 1.2+ is constructed but version 1.11 can easily be broken into pieces that excludes the parts that extend the DOM/HTML elements. The files that one should use is: Core, Class, Class.Extras, String, Number, Function, Array On Jan 21, 11:58 am, Balazs Endresz wrote: > I only heard about this one, looks a bit different from Mootools but > much smaller:http://www.danwebb.net/2008/1/31/low-pro-for-jquery > > Though I wonder if it's possible to port the whole Mootools > implementation to jQuery? You can maybe keep some parts of Core, > Native and Class, and hack it to work with jQuery ... now that sounds > like a whole new framework :) > I don't know Mootools that much at all but maybe it's not as hard as > it sounds... > > On Jan 21, 8:18 am, Neil Craig wrote: > > > Bump :) > > > On Jan 20, 10:36 am, Neil Craig wrote: > > > > I was wondering, which Custom Classes Library is best to use along > > > with jQuery. Up to now, I've been using Mootools to create custom > > > classes that can be easily extended through its inheritance model. It > > > also has custom events that I have used extensively. > > > > Which library do you recommend that has the same functionality as > > > described above that can co-exist with jQuery peacefully? > > > > This could make for an interesting discussion
[jQuery] jQuery.support & IE6 or later
I fully understand why support detection is considered much better than browser sniffing. But I have yet to see a way to detect the flash/ selectbox bleed-through issue that exists in IE version 6 or earlier. For that reason, I think that jQuery.browser should be maintained in future releases of jQuery.
[jQuery] Re: Recommendation Required - Custom Classes Library
Bump :) On Jan 20, 10:36 am, Neil Craig wrote: > I was wondering, which Custom Classes Library is best to use along > with jQuery. Up to now, I've been using Mootools to create custom > classes that can be easily extended through its inheritance model. It > also has custom events that I have used extensively. > > Which library do you recommend that has the same functionality as > described above that can co-exist with jQuery peacefully? > > This could make for an interesting discussion
[jQuery] Re: Class selectors not working when using jQuery 1.3 with Mootools 1.11
Thanks, that sorted out the problem. On Jan 20, 12:08 pm, Balazs Endresz wrote: > This was mentioned on the jquery-dev group or somewhere else, I don't > remember exactly. It's about Mootools not extending properly the > document object I think, I'm sure it has been fixed in the trunk. > > I suspect this is > it:http://github.com/jeresig/sizzle/commit/0a9df6e0b68a91dd1f59bfd6e7941... > > On Jan 20, 3:26 am, Neil Craig wrote: > > > Hi > > > I'm working on a project that used to implement Mootools 1.11. It has > > been decided however that we switch over to jQuery since it is much > > faster and more light-weight. > > > However, because we have created numerous widgets in Mootools, we > > still have to use it while the jQuery equivalent widgets are being > > developed. We have implemented the noConflict method with various > > degrees of success. > > > We have noticed that after upgrading from jQuery 1.2.6 to 1.3, that > > using the old Mootools 1.11 along with jQuery, renders the class > > selector useless. > > > Executing something like jQuery(".myClass") or jQuery("div.myClass") > > returns an error: "context.getElementsByClassName is not a function". > > It occurs in the following section: > > > if ( document.documentElement.getElementsByClassName ) { > > Expr.order.splice(1, 0, "CLASS"); > > Expr.find.CLASS = function(match, context) { > > return context.getElementsByClassName(match[1]); > > }; > > > } > > > Strangely enough the expression "if > > ( document.documentElement.getElementsByClassName )" yields a result > > of true, but context.getElementsByClassName is still undefined. The > > "context" in this case is the document object itself. > > > I'm suspecting that it has got something to do with Mootools that is > > throwing a spanner into the works. Has anyone encountered a similar > > problem? Or has anyone got some comments on the subject?
[jQuery] Re: loading jquery
This link might help http://ajaxpatterns.org/On-Demand_Javascript On Jan 20, 10:39 am, slava wrote: > Hi, > I am loading jQuery from a script inside a page and need to execute > next function right after jQuery loads. What would be the best way to > do this? > So far I have tried using a timer to check if jQuery == 'undefined'
[jQuery] Recommendation Required - Custom Classes Library
I was wondering, which Custom Classes Library is best to use along with jQuery. Up to now, I've been using Mootools to create custom classes that can be easily extended through its inheritance model. It also has custom events that I have used extensively. Which library do you recommend that has the same functionality as described above that can co-exist with jQuery peacefully? This could make for an interesting discussion
[jQuery] Class selectors not working when using jQuery 1.3 with Mootools 1.11
Hi I'm working on a project that used to implement Mootools 1.11. It has been decided however that we switch over to jQuery since it is much faster and more light-weight. However, because we have created numerous widgets in Mootools, we still have to use it while the jQuery equivalent widgets are being developed. We have implemented the noConflict method with various degrees of success. We have noticed that after upgrading from jQuery 1.2.6 to 1.3, that using the old Mootools 1.11 along with jQuery, renders the class selector useless. Executing something like jQuery(".myClass") or jQuery("div.myClass") returns an error: "context.getElementsByClassName is not a function". It occurs in the following section: if ( document.documentElement.getElementsByClassName ) { Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function(match, context) { return context.getElementsByClassName(match[1]); }; } Strangely enough the expression "if ( document.documentElement.getElementsByClassName )" yields a result of true, but context.getElementsByClassName is still undefined. The "context" in this case is the document object itself. I'm suspecting that it has got something to do with Mootools that is throwing a spanner into the works. Has anyone encountered a similar problem? Or has anyone got some comments on the subject?
[jQuery] Re: jQuery Cycle Plugin: 1 pager to control 2 slideshows
wow that works awesome. even able to apply it to several cycles. i saw a posting about applying a delay to several cycles so that one starts a couple seconds after another cycle (http://groups.google.com/group/ jquery-en/browse_thread/thread/fa74609bb63f46a/40f0bec91d0c6574? lnk=gst&q=jquery+cycle+page+delay#40f0bec91d0c6574). i tried to apply that example to this one so that when you press a pager button it starts 1 cycle and the 2nd cycle starts about 1 - 2 seconds after but couldn't get it to work. i appreciate any advice that can be given. On Dec 13, 8:40 am, Mike Alsup wrote: > > I have been searching for a way to have1pagerto control2 > >slideshowswith the same number of slides. Where one slideshow can > > have a scrollLeft and another just with a fade. Is this possible with > > the current plugin? > > Here's a demo: > > http://jquery.malsup.com/cycle/pagers.html
[jQuery] jQuery Cycle Plugin: 1 pager to control 2 slideshows
Is there a way in the jQuery Cycle Plugin to have have 1 pager control 2 slideshows? Where one slideshow has a scrollLeft effect and the other has a fade effect.
[jQuery] jQuery Cycle Plugin: 1 pager to control 2 slideshows
I have been searching for a way to have 1 pager to control 2 slideshows with the same number of slides. Where one slideshow can have a scrollLeft and another just with a fade. Is this possible with the current plugin?
[jQuery] Disable/Enable jQuery Added Events
Something I would like to do is to add several events handlers to an element and control the firing by enabling & disabling it. For example: jQuery(".sample").click(function() { // do something }).disable(); Clicking should not fire the event until jQuery(".sample").enable() has been called. Have anyone done something similar?
[jQuery] Re: Modals don't mask whole page with Ext and jQuery
Great. Works a treat. Many thanks.
[jQuery] Broken link
Trivial, but the dev mailing list link at http://dev.jquery.com/wiki appears broken. Cheers.
[jQuery] Modals don't mask whole page with Ext and jQuery
Hi there. I posted a bug concerning modals not masking the whole page with jQuery on the Ext forum. Jack Slocum has responded saying "The problem was reported a while back to jQuery. It has to do with viewport/document size not returning the largest value. If the document height is smaller than the window height, then the document height should be the window height. In jQuery that is not the case. You may want to log a bug there." The full write up on producing the bug is at http://extjs.com/forum/showthread.php?t=11086. Any advice on an interim workaround until the core is fixed would be really appreciated. Regards, Neil.
[jQuery] Re: Form with multipart/form-data not working
I'll investigate the jQuery Form Plugin. What I'm trying to achieve is just a simply AJAX action when the user leaves the form field 'product_code' - the page 'checkproductcode.cfm' will then be called and check that the value in 'product_code' is not already in the database. The rest of the form I would like it to submit as usual - there is no need for the AJAX part. I hope that this sheds some more light on what it is I'm after... Many thanks. On Jun 11, 6:00 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > Well that's a different story then. You can't upload files via ajax. > Use the form plugin for that functionality. For details check > out:http://www.malsup.com/jquery/form/ > > Mike > > On 6/11/07, Neil Merton <[EMAIL PROTECTED]> wrote: > > > > > Thanks for the reply guys. > > > Mike - I'll have a look at the application/x-www-form-urlencoded > > option, see what it does. > > > Michael - that is a simplified form - the actual form does contain a > > file upload field.
[jQuery] Re: Form with multipart/form-data not working
Thanks for the reply guys. Mike - I'll have a look at the application/x-www-form-urlencoded option, see what it does. Michael - that is a simplified form - the actual form does contain a file upload field. Regards, Neil On Jun 11, 5:19 pm, Michael Price <[EMAIL PROTECTED]> wrote: > Looking at the sample form code provided, it doesn't look like it needs > multipart/form-data anyway - isn't that only required when a file is > being uploaded as part of the form submission? > > Regards, > Michael Price > > > > > > Mike Alsup wrote: > > > jQuery does not perform multipart/form-data encoding. It uses > > JavaScript's encodeURIComponent function to encode data so the correct > > enctype is application/x-www-form-urlencoded. > > > Mike > > > On 6/11/07, Neil Merton <[EMAIL PROTECTED]> wrote: > > >> Hi all, > > >> I'm trying to use the following example with a form that contains > >> multipart/form-data in it but the ajax part won't work - > >>http://www.shawngo.com/gafyd/index.html > > >> If I remove the enctype="multipart/form-data" from the form tag it > >> works. > > >> Here's the code... > > >> > >> > >> $(document).ready(function() > >> { > >> $('#loading').hide(); > >> $('#product_code').blur(function() > >> { > >> $('#loading').show(); > >> $.post("checkproductcode.cfm", > >> { > >> product_code: $('#product_code').val() > >> }, > >> function(response) > >> { > >> $('#result').fadeOut(); > >> setTimeout("finishAjax('result', > >> '"+escape(response)+"')", 400); > >> }); > >> return false; > >> }); > >> }); > >> function finishAjax(id, response) > >> { > >> $('#loading').hide(); > >> $('#'+id).html(unescape(response)); > >> $('#'+id).fadeIn(); > >> } > >> > > >> > >> >> class="button" size="50" /> > >> >> /> >> span> > >> > >> > >> > >> > > >> Any ideas? > > >> Thanks in advance for any replies > > -- > Regards, Michael Price - [EMAIL PROTECTED] > --- > Edward Robertson Ltd. - 1 Bondgate, Darlington, DL3 7JA > Direct: 01325 245077 -http://www.edwardrobertson.co.uk > Office: 01325 489333 -http://www.internetwebsitedesign.co.uk > --- > Registered Address: > 1 Bondgate, Darlington, County Durham, DL3 7JA, UK > Registration Number: 3931089 - Company registered in England > --- > This electronic message transmission contains information from > Edward Robertson Limited that may be proprietary, confidential > and/or privileged. The information is intended only for the use > of the individual(s) or entity named above. If you are not the > intended recipient, be aware that any disclosure, copying, > distribution or use of the contents of this information is > prohibited. If you have received this electronic transmission > in error, please notify the sender immediately by replying to > the address listed in the "From:" field.- Hide quoted text - > > - Show quoted text -
[jQuery] Form with multipart/form-data not working
Hi all, I'm trying to use the following example with a form that contains multipart/form-data in it but the ajax part won't work - http://www.shawngo.com/gafyd/index.html If I remove the enctype="multipart/form-data" from the form tag it works. Here's the code... $(document).ready(function() { $('#loading').hide(); $('#product_code').blur(function() { $('#loading').show(); $.post("checkproductcode.cfm", { product_code: $('#product_code').val() }, function(response) { $('#result').fadeOut(); setTimeout("finishAjax('result', '"+escape(response)+"')", 400); }); return false; }); }); function finishAjax(id, response) { $('#loading').hide(); $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); } Any ideas? Thanks in advance for any replies