Ron Brinkman Posted March 18, 2022 Share Posted March 18, 2022 I have successfully used a Font Awesome icon that, when the icon is clicked, invokes a Modal like so: <span style="font-size: 15px; color: Teal;"> <i onclick="document.getElementById('S9id01').style.display='block'" class="fa fa-info-circle"></i></span> I am trying to invoke a Modal by clicking on a .jpg image rather than a Font Awesome icon like so: <span> <i onclick="document.getElementById('S9id01').style.display='block'" <img src="VoteFraudPenaltySm.jpg">></i></span> This yields a ">" being show on the web page, with no image. I've tried numerous variations with no success. There's obviously some fundamental concept I'm not understanding to get the syntax right. Best Regards, Ron Brinkman Link to comment Share on other sites More sharing options...
Ingolme Posted March 18, 2022 Share Posted March 18, 2022 The syntax is wrong. You forgot the put a closing ">" on the <i> element and instead added two of them on the <img> element: <span> <i onclick="document.getElementById('S9id01').style.display='block'" <img src="VoteFraudPenaltySm.jpg">></i></span> Link to comment Share on other sites More sharing options...
Ron Brinkman Posted March 18, 2022 Author Share Posted March 18, 2022 Thank you for the quick, and spot-on response. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now