Answer the question
In order to leave comments, you need to log in
How to pass value to parameter of overridden onclick method in IE?
Hello!
Here is the code:
var a = document.createElement('a');
a.style.cursor='pointer';
var siteUrl = 'www.vasya.pupkin';
a.onclick=function(url){
winPopup = window.open(url, 'windowOloginka', 'width=1000,height=1000,location=no');
}
Answer the question
In order to leave comments, you need to log in
Thanks, I already found a solution from here: javascript.ru/forum/dom-window/26645-createelement...
i.e. it should have been like this:
var a = document.createElement('a');
a.style.cursor='pointer';
var siteUrl = 'www.vasya.pupkin';
a.onclick=function(url){
return function(){
winPopup = window.open(url, 'windowOloginka', 'width=1000,height=1000,location=no');
}
}(siteUrl);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question