[fusion-users] Fusion Search - Error when there is no results.

kelll kellieharrisson at sierrasystems.com
Wed Nov 24 18:41:31 EST 2010


Hi there, 

I am trying to implement the fusion search widget. Im using fusion version
2.0.0 with Mapguide OS 2.1. 
My mapguide is within an iFrame. 

Here is my search widget settings in ApplicationDefinition.xml: 

 
  toolbarSearch 
  Search 
  Search. 
  images/icons/search.png 
   
  Search 
   
         
        Hello 
        50 
         
                c1DisplayId 
                c2LocationDescription 
         
        DisplayId LIKE '%$USER_VARIABLE%' 
   
   
   
 


When I activate this widget, it pops open in a window with a search prompt
(as expected). 

1. If I search for something that I know will have 0 results, it pops up a
javascript error ( 'mapName' is undefined ) which I have traced to the
ErrorPage.templ.

I added the mapName variable at line 31 so that the page could find mapName: 

var popup = %s; 
var mapName = "%s"; 

I also edited the OnError event in Search.php to be: 
function OnError($title, $msg) 
{ 
    global $target, $popup, $mapName; 
    $templ = file_get_contents("./ErrorPage.templ"); 
    print sprintf($templ, $popup, $mapName, $title, $msg); 
} 

Doing this stops the error, but then I get more errors.. I try to keep
resolving these errors, but they keep coming... is the ErrorPage.templ
trustworthy or is the problem between the chair and the keyboard? :)


2. Also, is there a way to have two clauses in the search filter? 
DisplayId LIKE '%blah%' OR LocationDescription LIKE '%blah%' 


Thanks in advance, 
Kellie 
  

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Fusion-Search-Error-when-there-is-no-results-tp5772524p5772524.html
Sent from the Fusion Users mailing list archive at Nabble.com.


More information about the fusion-users mailing list