Hello together,
i have to realize a project within several buttons to change multiplikation. So i have make buttons for it an i don’t wont to make the changes with more than one javascript. So my idea was, that i can use the onclick - methode like this:
function selectedYear(hypeDocument, element, event) {
var cmd18 = document.getElementById('cmd18');
var cmd20 = document.getElementById('cmd20');
var cmd25 = document.getElementById('cmd25');
var cmd30 = document.getElementById('cmd30');
var cmd35 = document.getElementById('cmd35');
var cmd40 = document.getElementById('cmd40');
var cmd43 = document.getElementById('cmd43');
var cmd45 = document.getElementById('cmd45');
cmd18.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
cmd20.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
cmd25.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
cmd30.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
cmd35.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
cmd40.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
cmd43.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
cmd45.onclick = function () { // on click function
hypeDocument.functions().SetYear();
}
}
This works on desktop browser very good.
But not on a smartphone browser?
What’s the mistake?