Ok guys,
first of all, thanks for your interest on this thread. Let me try to explain what I am doing:
I have a html page that has an object (image, button, etc) that calls the following javascript function:
[CODE]
function executedByObject() {
newwin = window.open();
var htmlStringFinal = “<html><head><script language=’javascript’ src=’myJSFun.js’></script></head> n” +
“<body><script language=’javascript’>document.write(myString(1,1,1));</script></body></html>
newwin.document.open();
newwin.document.write(htmlStringFinal);
newwin.document.close();
}
The document myJSFun.js is:
[CODE]
function myString(i,j,k) {
return “i = ” + i + ” j = ” + j + ” k = ” + k;
}
No, when I execute the function “executedByObject()” the behavior is different depending of the 2 browser that I tried, both fail, but:
Mozilla FireFox 1.5: It opens the new window, prints the message on the screen, but it never load the page completely, I mean, it continuous loading. I try to find a JS code error, but I can’t find one. I also tried to open the page source, but nothing is displayed.
Internet Explorer 6.0: It opens the window but It return an error code on “myString” function. It cannot find it, but when I replace it but other an string, it works perfect.
Let me know if there is a work around to this problem, my priority is that the user should not be able to see how the returning string of myString is formed.
Any comment is welcome,
Jaime