Query Find Task works in EI but not in FireFox

1143
1
08-20-2012 06:11 AM
angelasuch
New Contributor
Sorry - didn't knwo I wasn't supposed to have urls.  here is some of the find task code that appears to be the problem:

function doFind() {
        //Set the search text to the value in the box
  findParams.searchText = "<? echo($check_license); ?>";
   
        //findParams.searchText = dojo.byId("searchname").value;
        findTask.execute(findParams,showResults);
      }



    function showResults(results) {
        //This function works with an array of FindResult that the task returns

        map.graphics.clear();
        var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, 15, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 1), new dojo.Color([255, 128, 0]));

        //create array of attributes
        var items = dojo.map(results,function(result){
          var graphic = result.feature;
          graphic.setSymbol(symbol);
          map.graphics.add(graphic);
   // map.centerAt(graphic.geometry);
    map.centerAndZoom(graphic.geometry,14);
          return result.feature.attributes;
        });

     var result, attribs;
        var s =
  ["<ul>"];
 
        dojo.forEach(results,function(result){
          
          attribs = result.feature.attributes;
    var text = [attribs.First_Name];
    if (attribs.Middle_Name != "Null")
   {  text.push(" " + attribs.Middle_Name + " " + attribs.Last_Name); }
    else
      {  text.push(" " + attribs.Last_Name); }
  
    complaint = attribs.First_Name + " " + attribs.Middle_Name + " " + attribs.Last_Name + "&license_id=" + attribs.License_ID + "&license_no=" + attribs.License_No + "&profession_id=200&license_type=200";
    formID.ComplaintURL.value=complaint;
    var title = attribs.License_No.substr(0,2);
   text.push(", " + title);
    var hold_objectID = [attribs.ObjectID];
    formatted = format_phone(attribs.License_Phone);
    dojo.byId("namearea").innerHTML = text.join("");
           s.push("<li> <span class = 'addr'> " + attribs.GISAddr  + "<br> " + attribs.License_City +   ", " + attribs.License_State + " " + attribs.License_ZIP + "</span> <br>   <span class = 'tel'>" + formatted + "</span></li> ");
    
        });
        s.push("</ul>");
        dojo.byId("list").innerHTML = s.join("");
}




URL;  http://health.ri.gov/find/doctors/results.php?license=MD09804

Provider name and address display fine in EI with use of the Find Task but not in FireFox.
Please advise.

THANKS!
0 Kudos
1 Reply
AndreyLabodin
New Contributor III
Hi, Angela.

I have checked the source code of your web-page (http://health.ri.gov/find/doctors/results.php?license=MD09804) and I found that it is full of errors and it is completely wrong, not just JS. It is not even HTML markup. It is a "messy-copy-paste" markup 🙂 Your page shouldn't work at all, sorry.

the code:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9" />
<!--The viewport meta tag is used to improve the presentation and behavior of the samples  
      on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dojox/grid/resources/Grid.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dojox/grid/resources/claroGrid.css">


and the presented javascript block can not be placed inside of <body> tag!!! in the middle of the page, just anywhere you want. It has to be included in <head> section. And there are several unnecessary empty DIV tags, what is that for? The mess in CSS links (+CSS imports??).

It is probably that IE handles this with some inner "chaos fixing mechanism".

So you could try fixing the page markup, make it browser-compatible and then it will work. Probably.
0 Kudos