Tag Archives: firefox

Changing the default search engine in Firefox

On a Windows machine I came upon the other day (forcefully and not intentional:-) ) I saw that the default engine was “search-results.com”. This URL was called whenever the user entered a keyword in the URL bar (you do know that Google Chrome and Firefox 4 will automatically search for the words you enter in the URL field, don’t you?). Key was, that I wanted to change this URL.

Easy right? Well, as it turned out, it took some small effort to find the right value.

First off, I entered the “about:config” and searched for “browser.search.defaultenginename”. Double clicked on it and changed it to “Google”. Immediately, I restarted Firefox, but unfortunately the search still was being directed to the other site.

Ok, hitting again the “about:config” and this time searching for “search” only revealed that there was another setting called “browser.search.defaultengine” which also pointed to another search engine. Changing it to “Google” also did not help.

Finally, after looking for some more, I find out that the config value “keyword.url” is the one setting that needs to be changed. Low and behold, Firefox even has a nice page on this topic (you just need to know what you need to be looking for, right…).

In short changing the value back to the default value (or any other you want) “http://www.google.com/search?ie=UTF-8&oe=utf-8&q=” fixed it.

Hope this helps.

Jquery form submit and too much recursion

I just run into an issue where the form was submitted with Firefox (despite an error), but the page stopped loading under Google Chrome. With the help of FireBug I saw that there was a Javascript error with the message “too many recursions”.

This is the code that I had which caused too much recursion:

$("#formsignup").validate({
  submitHandler: function(form) {
  // Submit
  $('#formsignup').submit();
}, ...

According to a FAQ buried on the plugin page of Jquery I found that (quote); This results in a too-much-recursion error: $(form).submit() triggers another round of validation, resulting in another call to submitHandler, and voila, recursion. Replace that with form.submit(), which triggers the native submit event instead and not the validation.

Low and behold, I changed my code to the following and it works.

$("#formsignup").validate({
  submitHandler: function(form) {
  // Submit
  form.submit();
}, ...

Hope this helps someone else out there.