Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

writer.writeAttribute("onError", "(this.src=variable)", "onError")

1004526Dec 27 2013 — edited Jan 2 2014

    Below line works perfectly

    writer.writeAttribute("onError", "(this.src='/path/image.png')", "onError");  //it assigns src attribut of html img tag with "/path/image.png" value if error occurs

    What i need

    String variable = "Something";

    writer.writeAttribute("onError", "(this.src=variable)", "onError");  //it want to use a variable

This post has been answered by Timo Hahn on Dec 27 2013
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details