Parameters not sent to embedded HTML

Hi Clifton,
I'm stuck and I don't understand why. I have 2 functions in the script section of my embedded HTML document accessed via pgGotoURL:
In the TB part I am using 2 global variables: total and userNo. The values are integers for example 1 or 2. At first neither of my embedded functions worked. When I included an alert they both returned undefined. I tried this:
total = total * 1, userNo = userNo * 1 to make sure they were being defined as integers. Predictably it didn't make any difference. I then tried sending them as part of a local array variable myArray[ 0 ] = total. This 'cured' the goFullScreen function. objNo is now being received as an integer as planned. But it won't work with the other function. Whatever I do objNo remains undefined in the restoreSize function. Any ideas please? I really can't think of anything else to do.
I'm stuck and I don't understand why. I have 2 functions in the script section of my embedded HTML document accessed via pgGotoURL:
- Code: Select all
function goFullScreen(objNo) {
var X = window.screen.availWidth;
var Y = window.screen.availHeight;
var element = document.getElementById("m" + objNo);
// alert (element.offsetLeft + "," + element.offsetTop);
element.style.width = X;
element.style.height = Y;
// if (objNo > 1) {
// element.style.left = "0px";
// element.style.top = "0px";
// }
};
function restoreSize(objNo) {
alert(objNo);
var element = document.getElementById("m" + objNo);
element.style.width = 620;
element.style.height = 460;
// if (objNo > 1) {
// element.style.left = "0px";
// element.style.top = "0px";
// }
element.style.left = 8;
element.style.top = 8;
};
In the TB part I am using 2 global variables: total and userNo. The values are integers for example 1 or 2. At first neither of my embedded functions worked. When I included an alert they both returned undefined. I tried this:
total = total * 1, userNo = userNo * 1 to make sure they were being defined as integers. Predictably it didn't make any difference. I then tried sending them as part of a local array variable myArray[ 0 ] = total. This 'cured' the goFullScreen function. objNo is now being received as an integer as planned. But it won't work with the other function. Whatever I do objNo remains undefined in the restoreSize function. Any ideas please? I really can't think of anything else to do.