Thanks, Aaron. That's good to know for when do have other URL variables. Right now there are none. I tried this: <script type="text/javascript"> $(document).ready()(function { var $Form = $("#Property_Search_Form"); var oldAction = $Form.attr("action"); $Form.attr("action", oldAction + "?isAjax=true"); )}; </script> With an action page for my form, but when I submit the form back to the page it's on, "Dual_Validation_01.cfm" and check the value with CGI.HTTP_Referer, it comes back http://bodaford.whitestonemedia.com/html/dual_validation_01.cfm without the URL variable. Any ideas about this? Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Heimlich Sent: Friday, April 20, 2007 1:59 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Best way to determine if a user has Javascript enabled? On 4/20/07, Rick Faircloth <[EMAIL PROTECTED]> wrote: So if JS is enabled, the script will run, appending ?isAjax=true to whatever page is specified if my form's action page. correct?
Exactly. The one caveat is that the script assumes that the action URL doesn't already contain any URL variables. This one solves that issue: $(function() { var $exampleForm = $("#exampleForm"); var oldAction = $exampleForm.attr("action"); var newAction = oldAction + (oldAction.indexOf('?") >= 0 ? "&isAjax=true" : "?isAjax=true"); $exampleForm.attr("action", newAction); }); This does everything my previous script did with the following addition: If the form's action URL has a question mark (?) in it, that means that it already has URL variables -- "isAjax" gets appended to the existing URL variables in this case. If it doesn't, then the action URL doesn't contain any URL variables -- "isAjax" is appended to the URL as its only URL variable in this case. -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com