AnsweredAssumed Answered

while showing result, link stops after #

Question asked by dexconor on Nov 22, 2013
Latest reply on Nov 22, 2013 by dexconor
Hi all,

so I was doing this below
      function showResults(FNDresults) {         var FNDresult, attribs,linkA;         var s = ["<table width=100% border=0>"];         dojo.forEach(FNDresults,function(FNDresult){           attribs = FNDresult.feature.attributes;      s.push('<tr><td><a href="#" onclick="changeUrl(\'http://url.com/m4.html?bldg=' + attribs.Number + '\')">' + attribs.MapDisplay + '</a></td></tr>');         });         s.push("</tbody></table>");         dojo.byId("tbl").innerHTML = s.join("");          }

changeUrl is a function that I use
and
I've tried

//s.push('<tr><td><a href="#"' +'& nbsp'+ 'onclick="changeUrl(\'http://url.com/m4.html?bldg=' + attribs.Number + ')>' + attribs.MapDisplay + '</a></td></tr>'); //s.push("<tr><td><a href='\#\' onclick=\"changeUrl('http://url.com/m4.html?bldg=" + attribs.Number + "')\">" + attribs.MapDisplay + "</a></td></tr>"); //s.push("<tr><td><a href='\#\' onclick=\"changeUrl('http://url.com/m4.html?bldg=" + attribs.Number + "')\">" + attribs.MapDisplay + "</a></td></tr>"); //s.push('<tr><td><a href="#" onclick="changeUrl(\'http://url.com/m4.html?bldg='+attribs.Number+'\')">' + attribs.MapDisplay + '</a></td></tr>'); //s.push("<tr><td><a href=\# onclick=\"changeUrl('./m4.html?bldg=" + attribs.Number +"')\">" + attribs.MapDisplay + "</a></td></tr>"); //s.push('<tr><td><a href="#" onclick="changeUrl("http://url.com/m4.html?bldg="' + attribs.Number + '")">' + attribs.MapDisplay + '</a></td></tr>');


a bunch of different stuff but

result look like

url.com/m4.html#

is this because of innerHTML? or am I doing something wrong?

Outcomes