Hoppa till huvudinnehållet

Link to Photo Long description "on error" not working

Kommentarer

5 kommentarer

  • Permanently deleted user
    Could you populate the PHOTOPATH field for the unmarked graves with the required URL instead?
    0
  • Permanently deleted user
    We do something like what Rebecca is suggesting, and it works fine.
    0
  • Carmen Durham
    Yes, I thought about doing that. 

     

    But I would like to know if the "onerror" really no longer works because I thought about using it elsewhere in cases where it may not be practical to alter the database.

     

    Thanks,

     

    Carmen
    0
  • Permanently deleted user
    Carmen, did you get this figured out? It looks like you are missing a semi colon between the ' and the " at the end of the onerror tag: {NAME_FOR_SEARCH}<br/>Death Date: {DEATH_DATE_FOR_SEARCH}<br/>Date of Birth on Headstone: {GPS_BIRTHDATE}<br/><img src="{PHOTOPATH}" height="200" onerror="this.src='http://gis.greenvillesc.gov/Imagery/Cemetery/UnmarkedGrave.jpg'; "/><br/>

     

    Also, you might want to add this.onerror=null; before your this.src so that there isn't an infinite loop in some browsers (ref: http://stackoverflow.com/questions/8124866/onerror-attribute-of-img-is-executing-javascript-to-change-image-but-it-did-n)

     

    Marshall
    0
  • Permanently deleted user
    Carmen, did you find a solution to this? We are experiencing a very similar issue with onclick event attributes in links. For example: <a onclick="alert('hello!');">link</a> This works in Viewer for HTML5 2.5, however it does not work in 2.6. The onlcick attribute is being removed from the HTML in the viewer as follows:

     

    User-added image
    0

Du måste logga in om du vill lämna en kommentar.