J
Johan Daine
Hi everyone,
I have a main page (search engine) that pops up a window in wich the
user can select a keyword in a select box (up to 4 keywords)
The on change attribute of the select tag calls the following function:
function addKeyword()
{
theindex = document.f2.init.options.selectedIndex;
item = document.f2.init.options[theindex].value;
// alert(theindex + ': ' + item);
if(item=='')
{
return;
}
cnt = window.opener.document.f1.kwd.value;
kword = 'window.opener.document.f1.mot_cle_'+ cnt + '.value=\'' + item +
'\'';
eval(kword);
window.opener.document.f1.mot_cle_1=item;
cnt = (cnt% 4) +1;
// alert('cnt= " + cnt);
window.opener.document.f1.kwd.value = cnt ;
//alert(window.opener.document.f1.kwd.value);
}
// kwd is a hidden field in the main page
// f2 is the popup form
// f1 is the main page form
The problem is that although this code works on
Opera 7.2*, Mozilla 1.0.0 (linux)
and Mozilla (?.?) on Win98
I am not able to get a reasonable value for 'item' in the instruction
item = document.f2.init.options[theindex].value;
in IE6.0
Has someone already got this problem... has found some clue?
Thanks
Johan Daine
I have a main page (search engine) that pops up a window in wich the
user can select a keyword in a select box (up to 4 keywords)
The on change attribute of the select tag calls the following function:
function addKeyword()
{
theindex = document.f2.init.options.selectedIndex;
item = document.f2.init.options[theindex].value;
// alert(theindex + ': ' + item);
if(item=='')
{
return;
}
cnt = window.opener.document.f1.kwd.value;
kword = 'window.opener.document.f1.mot_cle_'+ cnt + '.value=\'' + item +
'\'';
eval(kword);
window.opener.document.f1.mot_cle_1=item;
cnt = (cnt% 4) +1;
// alert('cnt= " + cnt);
window.opener.document.f1.kwd.value = cnt ;
//alert(window.opener.document.f1.kwd.value);
}
// kwd is a hidden field in the main page
// f2 is the popup form
// f1 is the main page form
The problem is that although this code works on
Opera 7.2*, Mozilla 1.0.0 (linux)
and Mozilla (?.?) on Win98
I am not able to get a reasonable value for 'item' in the instruction
item = document.f2.init.options[theindex].value;
in IE6.0
Has someone already got this problem... has found some clue?
Thanks
Johan Daine