C
CK.
Hi,
Passing params from html to javascript for displaying, the image shows every
time.
The text params passed showing mostly on clicking the link in the HTML
pages.
Sometimes the webpage generated with the rotuine below gives the string vars
as 'UNDEFINED', but they are.
On reclicking the link, they show up!
I suspect a mistake but can't find it.
TIA,
Chris
// JavaScript Document
function viewPic(img,cName,cStraat,cStad,cTelefoon,cFax,cWebsite,cEmail)
{
picfile = new Image();
picfile.src =(img);
var spcName = cName;
var spcStraat = cStraat;
var spcStad = cStad;
var spcTelefoon = cTelefoon;
var spcFax = cFax;
var spcWebsite = cWebsite;
var spcEmail = cEmail;
fileCheck(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail);
}
function
fileCheck(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail)
{
if( (picfile.width!=0) && (picfile.height!=0) )
{
makeWindow(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail);
}
else
{
funzione="fileCheck('"+img+"')";
intervallo=setTimeout(funzione,10);
}
}
function
makeWindow(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail)
{
ht = picfile.height;
wd = picfile.width;
if (window.screen)
.....
popwin=window.open("","_blank",args)
popwin.document.open()
popwin.document.write('<html><...
....
popwin.document.write('<hr></body></html>')
popwin.document.close()
}
Passing params from html to javascript for displaying, the image shows every
time.
The text params passed showing mostly on clicking the link in the HTML
pages.
Sometimes the webpage generated with the rotuine below gives the string vars
as 'UNDEFINED', but they are.
On reclicking the link, they show up!
I suspect a mistake but can't find it.
TIA,
Chris
// JavaScript Document
function viewPic(img,cName,cStraat,cStad,cTelefoon,cFax,cWebsite,cEmail)
{
picfile = new Image();
picfile.src =(img);
var spcName = cName;
var spcStraat = cStraat;
var spcStad = cStad;
var spcTelefoon = cTelefoon;
var spcFax = cFax;
var spcWebsite = cWebsite;
var spcEmail = cEmail;
fileCheck(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail);
}
function
fileCheck(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail)
{
if( (picfile.width!=0) && (picfile.height!=0) )
{
makeWindow(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail);
}
else
{
funzione="fileCheck('"+img+"')";
intervallo=setTimeout(funzione,10);
}
}
function
makeWindow(img,spcName,spcStraat,spcStad,spcTelefoon,spcFax,spcWebsite,spcEmail)
{
ht = picfile.height;
wd = picfile.width;
if (window.screen)
.....
popwin=window.open("","_blank",args)
popwin.document.open()
popwin.document.write('<html><...
....
popwin.document.write('<hr></body></html>')
popwin.document.close()
}