Events Made Easy Forums Bug fixed or feature request implemented eme_location_map.js Lines 72 through 77

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42322
    Anonymous
    Inactive

    “eme_location_map.js” Line 72, 73, 75, 76 and 77 end-of-line characters should be “escaped” with backlashes, because otherwise it is ambiguous whether following lines are parts of the same statements. Some JavaScript implementations assume that sequential lines without terminating semicolons should be concatenated, but others process code on separate lines as separate statements with or without semicolons. Backslash end-of-line “escape” characters insure correct interpretation in either case.

    This:

    var li_element = "<li id='location-"+item.location_id
    + "' style='list-style-type: upper-alpha'><a >"
    + item.location_name+"</a></li>";
    var location_info = "<div class="eme-location-balloon"><strong>"+ item.location_name
    + "</strong><br/>" + item.location_address + ", "
    + item.location_town + "<br/><small><a href='" + events_page_link
    + joiner + "location_id=" + item.location_id + "'>Details<a></div>";

    Should be:

    var li_element = "<li id='location-"+item.location_id 
    + "' style='list-style-type: upper-alpha'><a >"
    + item.location_name+"</a></li>";
    var location_info = "<div class="eme-location-balloon"><strong>"+ item.location_name
    + "</strong><br/>" + item.location_address + ", "
    + item.location_town + "<br/><small><a href='" + events_page_link
    + joiner + "location_id=" + item.location_id + "'>Details<a></div>";

    #45724
    Anonymous
    Inactive

    It is ambiguous whether these lines are parts of the same statements, but my recommendation above to add backslash characters is wrong, because I found they are not supported in this application by JavaScript. I avoid this problem in my own code by putting full statements on same lines and letting the code editor wrap them. However, though the solution I recommended above works in certain other languages it is not supported by JavaScript, so please disregard this post.

    #45725
    Franky
    Keymaster

    ok, disregarded 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top