I want to add a link into a column in Notesview, I saw an example at searchdomino when I tried it failed with the error "An operator or semicolon was expected but none was encountered", all other effort prove abortive.
Below is the example from searchdomino:
<a href='#'
onClick="window.open('/"+@WebDbName+"/Employee/"+@Text(@DocumentUniqueID)+"?deleteDocument ','_new');window.location.reload()">Delete</a>
With the error:
An operator or semicolon was expected but none was encountered
I was able to surpress the error doing the below, but could not call the onclick event.
"<a href='#' onClick='window.open'>" + "/"+@WebDbName+"/employee.xsp?action=openDocument&documentId="+@Text(@DocumentUniqueID) + "</a>"
Your input will be appreciated.
Injecting notesview column values into html table, sample code:
if(entryData[j].getAttribute("columnnumber") == "1") {
var xpageName = "page.xsp";
var sURL = strURL[0] + ".nsf/" + xpageName + "?documentId=" + viewEntry[i].getAttribute("unid") + "&action=editDocument";
result += "<tr> ";
if(entryData[j].childNodes[1].childNodes.length == 0) {
result += "<td><a href='" + sURL + "'>(NO_VALUE)</a></td>"
} else {
result += "<td><a href='" + sURL + "'>" + entryData[j].childNodes[1].childNodes[0].nodeValue + "</a></td>"
}
} else {
if(entryData[j].childNodes[1].childNodes.length == 0) {
result += "<td> </td>"
} else {
result += "<td>" + entryData[j].childNodes[1].childNodes[0].nodeValue + "</td>"
}
}
You've got three levels of quoting to deal with there, so I think this is what you need:
I.e, this is using...