I am having a problem using the href text in the window.event.srcelement item. I can pop up the value via an alert command but am unable to use any string functions against the item.
first of all window.event.srcElement is not the standards compliant way of writing something. event.target is!
Show us some sample code please so I, or someone else, can show you how to create a version that supports both IE and standard compliant browsers. Gary
var idiff=0
var s1 = window.event.srcElement;
if (s1.href.indexof("divaimg2"==0)
idiff=721;
else {
var dstart = s1.indexof("20"
ddate = s1.substring(dstart,8);
ddate2 = ddate.substr(5,2) + "/" + ddate.substr(7,2) + "/" + ddate.substr(1,4);
alert(ddate2);
}
What I'm trying to do here is to obtain a substring of the href in order to determine what date the folder is. A date in thormat of yyyymmdd is part of the address. The bottom line is that I want to be able to utilize the address as a string and parse through it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.