C
Chris K.
Hi,
Setting my first steps into Java, managing my genealogy website.
In the list of names, with the names in anchor tags,
i want a popup window to appear on clicking the name.
With the command <a href="N0001.jpg" target="_blank"
onClick="viewPic(this.href); return false">
i call the javascript below(found on the net and adapted).
The picture appears perfect on the screen, but without name, date of birth,
date of death,..
Q: How can i join these data(name, birth,death,..) in the link or onclick
event so they ar tranferred from html to java for display
in the popup window
In VFP i can do this using by viewpic(this.ref,name,birthdate,deathdate)
and at the start of the function: function
viewpic(this.ref,name,birthdate,deathdate) .
This logic can't i transfer to HTML and JAVA as newbie.
Any help would be appreacited.
A search on the net and google gave no understanding solution for me, to
specialized.
Thanks in advance,
Chris
function viewPic(img)
{
picfile = new Image();
picfile.src =(img);
fileCheck(img);
}
function fileCheck(img)
{
if( (picfile.width!=0) && (picfile.height!=0) )
{
makeWindow(img,spname);
}
else
{
funzione="fileCheck('"+img+"')";
intervallo=setTimeout(funzione,10);
}
}
function makeWindow(img,spname)
{
if (window.screen)
{
var avht = screen.availHeight / 3 * 2;
var avwd = screen.availWidth / 3 * 2;
}
var args= "height=" + avht + ",innerHeight=" + avht;
args += ",width=" + avwd + ",innerWidth=" + avwd;
if (window.screen)
{
args += ",left=" + 20 + ",screenX=" + 20;
args += ",top=" + 20 + ",screenY=" + 20 + ",resizable=yes,
menubar=0, titlebar=0, toolbar=0";
}
popwin=window.open("","_blank",args)
popwin.document.open()
popwin.document.write('<html><head><link rel="stylesheet"
href="../genea.css" type="text/css" /></head>')
popwin.document.write('<body bgcolor="#FFFFFF" background.......')
popwin.document.write('<img border="0" src="'+img+'"
height="250"></a></td></tr>')
.....
popwin.document.close()
Setting my first steps into Java, managing my genealogy website.
In the list of names, with the names in anchor tags,
i want a popup window to appear on clicking the name.
With the command <a href="N0001.jpg" target="_blank"
onClick="viewPic(this.href); return false">
i call the javascript below(found on the net and adapted).
The picture appears perfect on the screen, but without name, date of birth,
date of death,..
Q: How can i join these data(name, birth,death,..) in the link or onclick
event so they ar tranferred from html to java for display
in the popup window
In VFP i can do this using by viewpic(this.ref,name,birthdate,deathdate)
and at the start of the function: function
viewpic(this.ref,name,birthdate,deathdate) .
This logic can't i transfer to HTML and JAVA as newbie.
Any help would be appreacited.
A search on the net and google gave no understanding solution for me, to
specialized.
Thanks in advance,
Chris
function viewPic(img)
{
picfile = new Image();
picfile.src =(img);
fileCheck(img);
}
function fileCheck(img)
{
if( (picfile.width!=0) && (picfile.height!=0) )
{
makeWindow(img,spname);
}
else
{
funzione="fileCheck('"+img+"')";
intervallo=setTimeout(funzione,10);
}
}
function makeWindow(img,spname)
{
if (window.screen)
{
var avht = screen.availHeight / 3 * 2;
var avwd = screen.availWidth / 3 * 2;
}
var args= "height=" + avht + ",innerHeight=" + avht;
args += ",width=" + avwd + ",innerWidth=" + avwd;
if (window.screen)
{
args += ",left=" + 20 + ",screenX=" + 20;
args += ",top=" + 20 + ",screenY=" + 20 + ",resizable=yes,
menubar=0, titlebar=0, toolbar=0";
}
popwin=window.open("","_blank",args)
popwin.document.open()
popwin.document.write('<html><head><link rel="stylesheet"
href="../genea.css" type="text/css" /></head>')
popwin.document.write('<body bgcolor="#FFFFFF" background.......')
popwin.document.write('<img border="0" src="'+img+'"
height="250"></a></td></tr>')
.....
popwin.document.close()