This topic is locked

custom JQuery function click

5/31/2011 9:41:30 AM
PHPRunner General questions
author

Dear all,
just a very basic question but at the moment I am missing the forest through the trees.
On an advance search page, I have added some custom code within the Javascript event. Now I want to prevent processing of the page after clicking SEARCH in some cases. Please find below my code



$("[id~=searchButton]").click(function() {

if("something")

// DO NOT SEARCH

else

// SEARCH

});


Can you provide me with a solution... I guess it is very simpel...
Regards
Daniel

J
Jane 6/1/2011

Daniel,
unfortunately it's not possible to use this code in the events because onclick event is defined for the search button in our JS files.

As workaround you can open generated include/runnerJS/RunnerPages.js file, find and edit this code:

$("input[@id=searchButton"+this.id+"]").bind("click", function(e){

pageObj.searchController.submitSearch();

});