Re: [jQuery] Can jquery do this? font-colour
The easiest way to do that is simply make the background to that area black. Then the white text shows up no matter what. It would eliminate the need to do extra work with scripts. DED On Tue, Jan 5, 2010 at 5:09 PM, annie anne.03gr...@gmail.com wrote: I'm very very new to jquery so please be patient with my questions. I have a layout that has white colored text. When you turn images off the text disappears because the back background is completely white. So, with the scenario above is it possible to use jquery to do the following: font color is white when user turns images off on their browser then change font to color =black So basically its not 'how do I change the font color' but 'how do I detect that the user has images turned off, *then* change the font color' Your help would be much appreciated. Thank-you in advance. AnneG
Re: [jQuery] Re: (validate) form field validation with field id doesn't work.
Hi, multiple fields should not have the same 'name' in a form. If you need first name for two parts of a form, then you should give a more explicit name to the input : ex. first name for shipping could be 'firstNameShip' and first name for billing could be 'firstNameBill' etc. The reason is because you should be using labels that are assigned through the 'for' attribute to an input, giving greater accessibility. This also makes for a more semantic name scheme than firstName1. DED On Thu, Oct 29, 2009 at 5:22 PM, monika budhiraja monika.budhir...@gmail.com wrote: yeah . that's what I think would be some confusion coz it might be that multiple fields that have same name but Ids would be unique throughout page. So, I was really wondering, if there is any way to setup rules and validations based on ids and ignore names completely. On Thu, Oct 29, 2009 at 5:02 PM, James james.gp@gmail.com wrote: If you change the name of your field, you'd have to change your rules in the validation options from firstname to firstname1 also. On Oct 29, 10:34 am, Monika monika.budhir...@gmail.com wrote: Hi : I am trying to use jquery validatro plugin and used tried demo on the live site. Just looking if I can use this framework for UI validation or not. So, On demo, whene i tried replacing name with id, the validation doesn't work. Demo page : has 2 form. http://jquery.bassistance.de/validate/demo/ And in the second form, when I change the firstname : label for=firstnameFirstname/label input id=firstname name=firstname / to something like : label for=firstnameFirstname/label input id=firstname name=firstname1 / it doesn't work. Please let me know if I need to do anything.
[jQuery] Re: how to set array value????
Hi Jacob, the format in your 'input' is a Ruby on Rails microformat; the name='branch[blahblah]' is a ruby hash. The problem could be how it is being parsed on the server with your ruby code. Here is short article about the use of microformats in rails. http://wonderfullyflawed.com/2009/02/17/rails-forms-microformat/ Hope it helps. DED 2009/10/23 jacob ygpa...@gmail.com Can you rename the control? No I can't. Because the control's name is automatically assigned in the rails framework. If I rename the control's name, it will be caused another problem I can't properly manage the value. But I can see the value in the server side, when I make another test controller named input name=test_name type=text / instead of name=branch[blalbla] I guess the server side procedure will be like this ex) php ( even though the ruby syntax will be different, the way of process will be same in terms of context. ) foreach (branch as $key = $value) { // make query according to key and value pairs // but when I meet key name address, I get the null value. } Furthermore, I can get the whole value exactly as I typed in the web page except the values that I set by jQuery's 'val' method. On 10월24일, 오전6시31분, DanDan dan.d...@gmail.com wrote: I *think* you are probably right that the name of the input control is your problem: name=branch[address] I wonder if your server side code is seeing the brackets escaped or unescaped. Can you rename the control? On Oct 23, 9:22 am, jacob ygpa...@gmail.com wrote: hello? Today, I have met something odd experience during developing web application based on Ruby on Rails and Jquery. When I set some value by next code, jQuery('#branch_address').val(address_val); it seems to work as I expected. Because the value that I set by jQuery's 'val' function appear on the chrome browser and other browsers as well. input type=text name=branch[address] id=branch_address / But when I submit the form, I got the null value from the perspective of server side. I suspect this problem could be caused by the hash array like 'brach [address]' but I can't verify the reason due to lack of my knowledge about jQuery and javascript. I expect anyone who have more experience to the jQuery and javascript than me give some tip or any guide to me to overcome this obstacle. looking forward for many knowledgeable people to consider this problem. Thanks a lot.
[jQuery] Re: password initial value without masking ****
Hi, another thing you can try is to use a label for the password input. Just change the label styles to go on top of the input field ( it will look like it is in the field.) Then when the input field has focus, hide the label so it doesn't block the field. I just saw Waseem has the same idea. Actually in 'Learning jQuery 1.3', Karl shows how to do this in detail.DED On Tue, Oct 20, 2009 at 3:05 AM, Marco Barbosa marco.barbos...@gmail.comwrote: Hmmm. This is more complicated than I thought. waseem, having 2 input fields doesn't seem correct. Thought it might work I will have to pass that solution for this specific site. Liam, Your code didn't work either, I don't know why. Jörn, this watermark plugin is interesting but I don't want to use jquery ui on this site. That's because I'm already using that cleanField function and it would be redundant to have a plugin just for the login form. Also I gave it a try and the label didn't stay inside the input. So If i have to manually position it there, then it's another reason I will pass this solution as well. I though a simple jquery would do this. I think I will leave it masked and use a tooltip or something. Thanks guys! On Oct 19, 5:54 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Instead of replacing the input, display a label above it. Seehttp:// wiki.jqueryui.com/Watermark Jörn On Mon, Oct 19, 2009 at 4:17 PM, Liam Potter radioactiv...@gmail.com wrote: Here is how I do it. Just markup the form like normal (I use a definition list to lay out my forms) $(input:password).each(function(){ var $currentPass = $(this) $currentPass.css({opacity:0}); $currentPass.before('input type=text value=Password class=removeit style=position:absolute;z-index:10; /'); var $visiblePassword = $(.removeit); $visiblePassword.focus(function () { $(this).css({opacity:0}); $currentPass.focus().css({opacity:1}); }); $currentPass.blur( function () { if ( $currentPass.attr(value) == ){ $currentPass.css({opacity:0}); $visiblePassword.css({opacity:1}).attr(value,Password); } }); }); waseem sabjee wrote: ah yes i forgot. you would get access denied when tried to change an input type property the best way is to have two input types and just hide one and show the other but i have a solution for you the html !-- The following html of two input types - we gonna switch between them-- input type=text class=textinput value=Passowrd / input type=password class=passinput value= / the css style type=text/css /*first we need to hide the password input*/ .passinput { display:none; } /style the js script type=text/javascript $(function() { // declare your input types var textinput = $(.textinput); var passinput = $(.passinput); // on text input focus - hide text input and show and focus on password input textinput.focus() { textinput.blur(); textinput.hide(); passinput.show(); passinput.focus(); }); // on password input blud hide password input and show and focus on text input passinput.blur(function() { passinput.blur(); passinput.hide(); textinput.show(); textinput.focus(); }); }); /script On Mon, Oct 19, 2009 at 2:51 PM, Marco Barbosa marco.barbos...@gmail.commailto: marco.barbos...@gmail.com wrote: Hi waseem! Thanks for your reply. Something's wrong with this line: $(#password).attr({type:'text'}); I tried changing to: $(#password).attr('type','text'}); but still no go. I have to comment out to get the other JS stuff on the site working. The rest of the code seems Ok. What could it be? I like your solution, pretty simple :) I was wondering if we could put this inside the cleanField function but I guess it's not necessary. ~Marco On Oct 19, 2:32 pm, waseem sabjee waseemsab...@gmail.com mailto:waseemsab...@gmail.com wrote: // set the initial type to text $(.mypasswordfield).attr({ type:'text' }); // on user focus - change type to password $(.mypasswordfield).focus(function() { $(.mypasswordfield).attr({ type:'password' }); }); // on user blur - change type to back to text
[jQuery] Re: (tooltip) Markup problem
Hi, documents can contain as many H3 headers as are needed. In a tooltip, 'H3' makes the most sense because a single page generally should have only one 'H1' and 'H2' should be reserved for segment heads. So it's not a big issue to have the 'H3' in the tooltip dialog and still remain semantically correct. If that is what you are concerned with. But if you want to change the behavior of this particular tooltip dialog, just go into the source code and alter what it creates. Then, check any css file the plugin comes with and change that to match what you altered in the source code. DED On Wed, Oct 14, 2009 at 6:55 AM, shapper mdmo...@gmail.com wrote: On Oct 12, 8:57 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: That sounds like you validate a page for the sake of validation. I think thats beneath the point, therefore I don't get your argument. Do you worry about accessibility? If so, did you test the tooltip with a screenreader? Afaik thats the best way to test for accessibility; validation not so much. Jörn, I didn't talk about validation. Take the example I created here: http://flyonpages.flyondreams.pt/tooltip.html The document structure already contains a H3 header. IMHO it does not make sense to me the tooltip to add a header at same level ... I even think the tooltip shouldn't have a header ... But of course that is my opinion. But in this example, to use a header on tooltip, it should be a H4 ... agree? I really like the functionality of your plugin: For example, when tooltip disappears when a input is selected ... Would be possible to tell me how to change the plugin code so the tooltip would be just: divspanTitle ... spandiv And I need to display only the title ... no url in case of anchors. Just the title in all situations. Basically, a really simple tooltip but with the same behavior as yours. I have been looking for such a plugin but they never work as good as yours. And all my tries to adapt your code ended with a broken plugin ... Thank You, Miguel
[jQuery] Re: AJAX callbacks: load(); $.get() and $.post() do not
Hi, it could be that your not supplying the type of return in the .post and .get calls. According to the API .post and .get have a fourth param of 'type' such as 'xml' or 'json'. This might not be the issue but it could be because your server won't know what mime type to return. DED On Tue, Oct 13, 2009 at 8:22 AM, alexryan alexander.j.r...@gmail.comwrote: $.get() and $.post() functions work for me *except* when I supply a callback function as the third parameter. I can pass in exactly the same set of arguments that work for a load() function to $.get() and $.post() and they do not work. Has anyone else experienced this? If so, does anyone have a work-around? I'm using jQuery 1.3.2. For example ... This works ... $('div.status').load('/quotations/RegisterServlet', parameters, register_submitCallback); This does not work ... $.post('/quotations/RegisterServlet', parameters, register_submitCallback);
[jQuery] Re: (validate) does not work with backup php validation
Hi, it's hard to tell, could you explain in more detail what you mean by 'ignored completely'. Do you mean that you tried entering invalid data and the javascript didn't produce errors? But, at the same time you seem to have a problem in your php validation. Your if statement says 'if name exists and if email exists and if message is not blank', not 'if name and email and message are not blank' as you probably intended. So that could be an issue as well. DED On Mon, Oct 12, 2009 at 11:07 PM, breatheonme breatheo...@gmail.com wrote: I'm using bassistance.de's form validation, as shown here: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ In the very possible event that someone is browsing without JavaScript enabled, I've put together a PHP form validation that should direct the user to an error page (or thank you page upon success). The JavaScript works when I do not have the validation part in the PHP. When I do, it seems the JavaScript is completely ignored. Here's my HTML: form action=form.php method=post id=contactform class=form extended contact fieldset legendContact/legend p class=reqstrong*/strong Indicates a required field./ p ol li class=name label for=txt_nameName strong*/strong/label input id=txt_name name=txt_name class=text / /li li class=email label for=txt_emailEmail Address strong*/strong/ label input id=txt_email name=txt_email class=text / /li li class=message label for=txt_messageMessage strong*/strong/label textarea id=txt_message name=txt_message/textarea /li p input type=submit name=send value=Send class=submit / /p /ol /fieldset /form Here's my JS: //initiate validator on load $(function() { // validate contact form on keyup and submit $(#contactform).validate({ //set the rules for the field names rules: { txt_name: { required: true, minlength: 2 }, txt_email: { required: true, email: true }, txt_message: { required: true, minlength: 2 }, }, //set messages to appear inline messages: { txt_name: Please enter your name, txt_email: Please enter a valid email address, txt_message: Please enter your message } }); }); and finally, here's my PHP: ?php // get posted data into local variables $emailto = m...@me.com; $subject = Contact Form; $name = Trim(stripslashes($_POST['txt_name'])); $email = Trim(stripslashes($_POST['txt_email'])); $message = Trim(stripslashes($_POST['txt_message'])); $today = date(F j, Y, g:i a); // prepare email body text $body = ; $body .= $today; $body .= \n; $body .= \n; $body .= Name: ; $body .= $name; $body .= \n; $body .= Email: ; $body .= $email; $body .= \n; $body .= Message: ; $body .= $message; $body .= \n; $body .= \n; // check for empty fields if ( $name OR $email OR $message != '' ) { mail($emailto, $subject, $body, From: $email, -f m...@me.com); print meta http-equiv=\refresh\ content=\0;URL=thankyou.php\ / ; } else { print meta http-equiv=\refresh\ content=\0;URL=error.php\ /; } ? Any ideas? Thanks.
[jQuery] Re: Preventing double submits
Hi, can't you check validation before applying the block? Then if validation returns false direct focus to the first invalid field, and cancel the call to the block.This might work. DED On Tue, Oct 13, 2009 at 5:49 AM, Mark Smith marksmith5...@jungle-monkey.com wrote: Hi, I am using jQuery and blockUI to prevent the user from submitting a form twice by double clicking on the interface: This is in my global js file and is called on every pages document.ready: $('form').submit(function(){$.blockUI({message:'', overlayCSS: {opacity:0.2}})}); This was working really well, but if I have validation on one of the form submits that returns false, I of course want to unblock the UI. Can you suggest a way of doing this? (without hard coding validation checks in the global js file?) Thanks for any suggestions
[jQuery] Re: tablesorter - disabling sorting for a row
Hi, you could try adding class='{sorter:false}' to that row. See if that works, it works for thead ths.DED On Tue, Oct 13, 2009 at 3:18 AM, Konstantin K kkru...@gmail.com wrote: Hi folks, I'm using the awesome tablesorter plugin and I have one question: 1. is it possible to have a row not be part of the sorting? For example, I'd like to have a table, where the first row under the headings, is always on top, and doesn't change positions when one of the headings is sorted. Thanks for any tips! Konstantin
[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?
Hi , I double checked on javascript's XOR operator and it only works with bitwise: so you will have to write your own XOR . This isn't hard : [code] if (!foo != !bar) [\code] should work for all elements. or this [code]if( ( foo !bar ) || ( !foo bar ) )[\code] For the validator method I haven't actually tried to run this but you can try this:[code] $.validator.addMethod( onlyCheckOne, function(value, elements) { // but put whatever you're using to see if either is checked in the next line return this.optional(value) || elements[o]:checked XOR elements[1]:checked; }, Please check either participations or days, but not both )[/code] note change XOR to whatever method you decide to use. Then add the check to your rules. DED On Mon, Oct 12, 2009 at 12:36 AM, Phper hi.steven...@gmail.com wrote: script type=text/javascript src=http://code.jquery.com/jquery- latest.js/script script type=text/javascript src=http://dev.jquery.com/view/trunk/ plugins/validate/jquery.validate.js/script script type=text/javascript !-- $(document).ready(function() { $(#form1).validate({ rules: { title: { required: true, minlength:40 } , content: { required: true, minlength:100, maxlength:600 }, evaluation: { required: true, minlength:50, maxlength:300 }, price: { required: true, digits:true }, multi:{ required:true } }, messages: { } }); }); -- /script As you can see from the code above, title, content, evaluation, prices and multi are required. All of them are required. But there are additional two fields, which are participations and days. Only one of them is required. Either participations or days is required. How to write this code? On Oct 12, 10:17 am, Phper hi.steven...@gmail.com wrote: A good clue. But I still don't know where to write the if statement. It would be good if you can give me an example. On Oct 11, 10:57 pm, Don Dunbar salemd1s...@gmail.com wrote: Hi, if you are using the validation plugin, I believe it has a function addMethod that allows you to write your own method for the validation. It requires a name (javascript identifier), a method to check input against ( in your case A and B would be checked for completion) and a message to display when there is an error (i.e. neither A nor B is filled out, or both are). You can get the details for using the addMethod function at the jQuery Docs page.http://docs.jquery.com/Plugins/Validation The page lists demos and the function you need is toward the bottom of the page. The logic is fairly straight forward : when the form is being filled out listen for when A and B have focus, remember if either is checked or ignored and check to make sure both are not simultaneously filled out. Check this on submit as well. Good luck, DED On Sun, Oct 11, 2009 at 7:42 AM, Phper hi.steven...@gmail.com wrote: How can I write the code in the context of Jquery validate function? On Oct 11, 12:43 pm, Don Dunbar salemd1s...@gmail.com wrote: Hi, javascript has an 'xor' operator. It works just like 'or' in an 'if' statement except in 'xor' only one side can be true. In a normal 'or' statement either side can be true or both can. So you probably want to do something like: if ( A XOR B) { } . Then only one can be true to continue if both are true the statement returns 'false'.Hope this helps. DED On Sat, Oct 10, 2009 at 10:37 PM, Phper hi.steven...@gmail.com wrote: There are two input fields in a form, but only one of them is required, they are not required at the same time. Either A or B is required. ( A is required OR B is required). In other words, a user can input data to field A, or he can input data to filed B, but he can not input data to Both A and B at the same time. How to implement this constraint in Jquery form validation?
[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?
I thought of a much simpler solution. If possible could you use radio buttons for those two choices in your HTML? In a radio button group selecting one automatically deselects other buttons in the group. Then you could just use one of the built in validation checks, as you already have done, to make sure one is checked.DED On Mon, Oct 12, 2009 at 1:43 AM, Phper hi.steven...@gmail.com wrote: I am not familiar with the syntax of Jquery plugin. On Oct 12, 2:19 pm, Don Dunbar salemd1s...@gmail.com wrote: Hi , I double checked on javascript's XOR operator and it only works with bitwise: so you will have to write your own XOR . This isn't hard : [code] if (!foo != !bar) [\code] should work for all elements. or this [code]if( ( foo !bar ) || ( !foo bar ) )[\code] For the validator method I haven't actually tried to run this but you can try this:[code] $.validator.addMethod( onlyCheckOne, function(value, elements) { // but put whatever you're using to see if either is checked in the next line return this.optional(value) || elements[o]:checked XOR elements[1]:checked; }, Please check either participations or days, but not both )[/code] note change XOR to whatever method you decide to use. Then add the check to your rules. DED On Mon, Oct 12, 2009 at 12:36 AM, Phper hi.steven...@gmail.com wrote: script type=text/javascript src=http://code.jquery.com/jquery- latest.js/script script type=text/javascript src=http://dev.jquery.com/view/trunk/ plugins/validate/jquery.validate.js/script script type=text/javascript !-- $(document).ready(function() { $(#form1).validate({ rules: { title: { required: true, minlength:40 } , content: { required: true, minlength:100, maxlength:600 }, evaluation: { required: true, minlength:50, maxlength:300 }, price: { required: true, digits:true }, multi:{ required:true } }, messages: { } }); }); -- /script As you can see from the code above, title, content, evaluation, prices and multi are required. All of them are required. But there are additional two fields, which are participations and days. Only one of them is required. Either participations or days is required. How to write this code? On Oct 12, 10:17 am, Phper hi.steven...@gmail.com wrote: A good clue. But I still don't know where to write the if statement. It would be good if you can give me an example. On Oct 11, 10:57 pm, Don Dunbar salemd1s...@gmail.com wrote: Hi, if you are using the validation plugin, I believe it has a function addMethod that allows you to write your own method for the validation. It requires a name (javascript identifier), a method to check input against ( in your case A and B would be checked for completion) and a message to display when there is an error (i.e. neither A nor B is filled out, or both are). You can get the details for using the addMethod function at the jQuery Docs page.http://docs.jquery.com/Plugins/Validation The page lists demos and the function you need is toward the bottom of the page. The logic is fairly straight forward : when the form is being filled out listen for when A and B have focus, remember if either is checked or ignored and check to make sure both are not simultaneously filled out. Check this on submit as well. Good luck, DED On Sun, Oct 11, 2009 at 7:42 AM, Phper hi.steven...@gmail.com wrote: How can I write the code in the context of Jquery validate function? On Oct 11, 12:43 pm, Don Dunbar salemd1s...@gmail.com wrote: Hi, javascript has an 'xor' operator. It works just like 'or' in an 'if' statement except in 'xor' only one side can be true. In a normal 'or' statement either side can be true or both can. So you probably want to do something like: if ( A XOR B) { } . Then only one can be true to continue if both are true the statement returns 'false'.Hope this helps. DED On Sat, Oct 10, 2009 at 10:37 PM, Phper hi.steven...@gmail.com wrote: There are two input fields in a form, but only one of them is required, they are not required at the same time. Either A or B is required. ( A is required OR B is required). In other words, a user can input data to field A, or he can input data to filed B, but he can not input data to Both A and B at the same time
[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?
Hi, glad you found a solution:to prevent the user from filling out both inputs in the first place. [code]$(#days).change(function(){ $(#participations).attr(disabled,disabled); }); $(#participations).change(function(){ $(#days).attr(disabled,disabled); }); [\code] DED On Mon, Oct 12, 2009 at 3:55 AM, Phper hi.steven...@gmail.com wrote: Also, how to prevent a user filling out both fields? On Oct 12, 4:48 pm, Phper hi.steven...@gmail.com wrote: How to change the default position of an error message in Jquey form validation plugin? On Oct 12, 4:33 pm, Gordon grj.mc...@googlemail.com wrote: If you're using the Metadata plugin and inline rules: input type=text id=a class={validate:{required:'#b:blank'}} / input type=text id=b class={validate:{required:'#a:blank'}} / I've not actually tested it but it should work. On Oct 11, 4:37 am, Phper hi.steven...@gmail.com wrote: There are two input fields in a form, but only one of them is required, they are not required at the same time. Either A or B is required. ( A is required OR B is required). In other words, a user can input data to field A, or he can input data to filed B, but he can not input data to Both A and B at the same time. How to implement this constraint in Jquery form validation?
[jQuery] Re: Assigning CSS 'display:block' by jquery not working
Hi, this appears to be happening because of specificity in the CSS. You have the 'hidden' on a direct specification i.e. the 'ul' in question. Try adding a class like : .hidden {display:none;} and then adding and removing that through your jQuery ul.addClass(hidden) ; ul.removeClass(hidden);That should work. CSS works through a cascade so that when you select something directly such as #id ul it takes precedence over simply adding a class to the element. Hope that makes sense? DED On Sat, Oct 10, 2009 at 3:02 PM, Caisys amamd...@gmail.com wrote: Hi, I am trying to display a hidden ul by using the $(id).addClass() method. For some reason the ul stays hidden. Can someone please help me?? Thanks ##mystyle.css ul#sitenav { padding:0; } ul#sitenav li{ display:inline; list-style-type:none; } ul#sitenav li ul{ display:none; } .selected { display:block; } -- ##sitenav.html ul id=sitenav liHomeul id=home-subnav liEvents/li liRestaurants/li liMovies/li liNighlife/li liStage/li /ul /li liVisitingul id=visiting-subnav liBasic Information/li liHotels/li liAttractions/li liEssential/li liTransportation/li liInquiries/li /ul /li liBlog/li liClassifieds/li /ul - ##script in index.html $(document).ready(function() { $(#home-subnav).addClass(selected); });
[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?
Hi, javascript has an 'xor' operator. It works just like 'or' in an 'if' statement except in 'xor' only one side can be true. In a normal 'or' statement either side can be true or both can. So you probably want to do something like: if ( A XOR B) { } . Then only one can be true to continue if both are true the statement returns 'false'.Hope this helps. DED On Sat, Oct 10, 2009 at 10:37 PM, Phper hi.steven...@gmail.com wrote: There are two input fields in a form, but only one of them is required, they are not required at the same time. Either A or B is required. ( A is required OR B is required). In other words, a user can input data to field A, or he can input data to filed B, but he can not input data to Both A and B at the same time. How to implement this constraint in Jquery form validation?
[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?
Hi, if you are using the validation plugin, I believe it has a function addMethod that allows you to write your own method for the validation. It requires a name (javascript identifier), a method to check input against ( in your case A and B would be checked for completion) and a message to display when there is an error (i.e. neither A nor B is filled out, or both are). You can get the details for using the addMethod function at the jQuery Docs page. http://docs.jquery.com/Plugins/Validation The page lists demos and the function you need is toward the bottom of the page. The logic is fairly straight forward : when the form is being filled out listen for when A and B have focus, remember if either is checked or ignored and check to make sure both are not simultaneously filled out. Check this on submit as well. Good luck, DED On Sun, Oct 11, 2009 at 7:42 AM, Phper hi.steven...@gmail.com wrote: How can I write the code in the context of Jquery validate function? On Oct 11, 12:43 pm, Don Dunbar salemd1s...@gmail.com wrote: Hi, javascript has an 'xor' operator. It works just like 'or' in an 'if' statement except in 'xor' only one side can be true. In a normal 'or' statement either side can be true or both can. So you probably want to do something like: if ( A XOR B) { } . Then only one can be true to continue if both are true the statement returns 'false'.Hope this helps. DED On Sat, Oct 10, 2009 at 10:37 PM, Phper hi.steven...@gmail.com wrote: There are two input fields in a form, but only one of them is required, they are not required at the same time. Either A or B is required. ( A is required OR B is required). In other words, a user can input data to field A, or he can input data to filed B, but he can not input data to Both A and B at the same time. How to implement this constraint in Jquery form validation?
[jQuery] Re: LavaLamp problem in IE
Hi, this sounds like a CSS issue actually. You should search for how to make a conditional comment in X/HTML and apply a separate style sheet for IE using that. The reason this happens is probably because of how IE especially 6 and earlier handles the box-model in css differently. And so styles like margin and padding and width behave in a different way than in FF or Safari etc. DED On Sun, Oct 11, 2009 at 10:07 AM, Peter graticu...@yahoo.com wrote: I have a site where the horizontal LavaLamp top menu is fine in FF, but in IE6 is so spaced out that it overflows and looks horrible. As a work around I have squeezed all of the links together so they fit in IE. However they are now all squeezed together and off-center in FF, so it now looks rubbish in FF. Any thoughts on how to fix this would be appreciated. site is: http://www.wilkinson-associates.co.uk/ Thanks. Peter