Print Page | Close Window

javascript image src undefined

Printed From: openElement Website
Category:

openElement


Forum Name: openElement General Discussion
Forum Description: A place for general discussion and questions about the software.
URL: http://forum.openelement.com/en/forum_posts.asp?TID=1798
Printed Date: Apr 17 2021 at 7:14pm
Software Version: Web Wiz Forums 10.11 - http://www.webwizforums.com


Topic: javascript image src undefined
Posted By: greaseandmetal
Subject: javascript image src undefined
Date Posted: Jan 28 2021 at 5:26am
WEitemmouseover is of type WEImage.
it's src attribute is undefined.

var mo = document.getElementById("WEitemmouseover");
console.log(mo.src);

logs "undefined"

console.log(mo.innerHTML) returns:


<div class="OESZ OESZ_DivContent OESZG_WEitemmouseover">
          <img src="../WEFiles/Image/WEImage/menulines_itemsel2-WEitemmouseover.png" class="OESZ OESZ_Img OESZG_WEitemmouseover" alt="">
         </div>

I see the <img> itself has no ID. How am I suppose to access the source?



Replies:
Posted By: Hobby001
Date Posted: Jan 28 2021 at 11:23am
Here is the code

	console.log($('#WEitemmouseover img').attr('src'));


-------------
https://denislafrance.net/index.en-us.htm" rel="nofollow - Anyone who wants to put something on line gets hooked by something big



Print Page | Close Window

Forum Software by Web Wiz Forums® version 10.11 - http://www.webwizforums.com
Copyright ©2001-2012 Web Wiz Ltd. - http://www.webwiz.co.uk