build a querystring within class file throws js unterminated string literal
Hello all,
I have a page that is partially built from within a method.
String theLink ="FeedFilePusher";//My servlet
itemGeoLink ="<a href='#' onclick=top.alertMe('"+theLink+"')>CLICK</a>";
The above works fine.
The problem is that I need to pass a querystring to this servlet.
String theLink ="FeedFilePusher?title=" + itemTitle +"&summary=" + itemDesc +"&link=" + entry.getLink() +"&updated=" + itemDate;
itemGeoLink ="<a href='#' onclick=top.alertMe('"+theLink+"')>CLICK</a>";
When I add the querystring values it throws a unterminated string literal error from within firefox.
I tried to encode the ? and the & but that didnt work.
Any ideas on how to do this?
Here is the simple javascript function called alertMe.
function alertMe(url)
{
document.getElementById('mapframe').src = url;
closeBubble();
}
TIA!

