Forum
Welcome, Guest

Launch search automatically on page load
(1 viewing) (1) Guest
Ask all your version 2.0 questions here.
  • Page:
  • 1

TOPIC: Launch search automatically on page load

Launch search automatically on page load 2 years, 1 month ago #956

Hi,

I have installed a small search form in a module on the left-hand column (which points to the original search form when submitted) however although search fields are passed through I cannot get the page to automatically start a search as it loads.

I have tried giving the Search button an id of 'sobiAxSearch' and adding:
<?php if(isset($_GET['radiusStartPointId'])) echo '<script language="JavaScript" type="text/javascript">$("sobiAxSearch").click();</script>'; ?>

to the end of the template, but this just results in the page loading then reloading index2.php without anything else on the page (no other joomla sections/modules).

Page in question is ukparaa1.miniserver.com/~wwwices/site/index.php?radiusToSearch=25&radiusStartPoint=(GU14)+Farnborough+Green&radiusStartPointId=8999&search=Search&searchphrase=any&option=com_sobi2&sobiCid=0&sobi2Task=search&reset=2&Itemid=53

Any ideas how I can accomplish this?

Many thanks,
James

Re:Launch search automatically on page load 2 years, 1 month ago #957

  • nicholas
  • OFFLINE
  • Moderator
  • Developing for Joomla since it was born!
  • Posts: 1197
There is a search module available from Sigsiu. I'd use that. Costs a few bucks, but it works like a charm.

If you are trying to use is a predefined query with a button or graphic as a trigger, then just use an href to the query.
Nicholas
CIO - CorFun, Inc.
Publisher - orthodoxbiz.com
Webmaster - Orthodox Christian Network
  • Page:
  • 1
Moderators: jasper, nicholas, henry, jerry
Time to create page: 0.92 seconds

Login