js for search trigger if coming from another page.