igorsoaresassis / jmonthcalendar

Automatically exported from code.google.com/p/jmonthcalendar
Other
0 stars 0 forks source link

Unusual behaviour when no URL parameter #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have an application where I just want to process an event click in
javascript.  In that the URL component is blank.  If I do this when
clicking an event the browser scrolls upwards.

To fix this I changed the javascript to not add the href attribute when a
URL value is blank:

var link = "";
if (event.URL.length > 0){
  link = jQuery('<a href="' + event.URL + '">' + event.Title + '</a>');
}else{
  link = jQuery('<a>' + event.Title + '</a>');
}

Original issue reported on code.google.com by drgenejones on 19 Jul 2009 at 2:01

GoogleCodeExporter commented 8 years ago
This should now be fixed in the source, going to be a little bit before the 
release is live.

Original comment by k.leneau@gmail.com on 19 Jul 2009 at 7:13