2) As my map/Web site loads, some ContentPane data flashes in the top left hand side of the webpage, then disappears. The code then correctly loads.
1) I can't seem to get my popup to work for the result of a search.
graphic.infoTemplate=template;
Laura -
I looked at this a bit...
When you click on the results of a query (the red dot) you are clicking on a graphics element in the map.graphics object. I think that the featurelayers underneath the graphic object aren't responding... I'm guessing that the way you have things built, the map responds to the FIRST object that is clicked on.
If you inspect the map graphics object (map.graphics.graphics.attributes) you will see that the attributes of the original feature are retained.
I'm not sure what the best way to go about dumping this content into a popup is. I tried assigning your InfoTemplate objects to the graphic object, but that didn't seem to work... although I didn't play with it that long. I did this in the showResults() function by adding this line:graphic.infoTemplate=template;
...right after graphic.setSymbol(symbol);
If you could get that to work, then that would probably fit with your overall design better. Outside of that, you may have to build a separate popup element to deal with the graphic object.
In lieu of that, you may be able to construct some logic that directs an on-click event to ignore the map.graphics and go on to the pop ups associated with your feature layers.
graphic.infoTemplate=template;
...right after graphic.setSymbol(symbol);