A
Alexandre Jaquet
Hi,
Under IE I could not point why I can't get the selected value from a
function
here the code
function Lvl_P2P(url,closeIt,delay){ //ver1.0 4LevelWebs
var fabricant_box;
var fabricant_value;
var category_box;
var category_value;
var sex_box;
var sex_value2;
var size_value;
var price_min_value;
var price_max_value;
var box1 = document.select_wish.sex;
var destination1 = box1.options[box1.selectedIndex].value;
alert (destination1);
opener.location.href = url;
}
and the full page code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<link href="/css/main.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
var skipcycle = false
function focOnMe(){
if(!skipcycle){
window.focus();
}
popopen = setTimeout('focOnMe()', 500);
}
function go()
{
var box = document.select_wish.sex;
var destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
function go2()
{
var box = document.select_wish.category;
var destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
function go3()
{
var box = document.select_wish.fabricant;
destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
function go4()
{
var box = document.select_wish.motorisation;
var destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
</script>
</head>
<body onload =" popopen = setTimeout('focOnMe()', 500);">
<br/>
<form name="select_wish"
action="/cgi-bin/recordz.cgi?lang=fr&action=search&session=afde3192b0c698af7117274c6bb7dc14"
method="post">
<input type="hidden" name="action" value="dosearchimmo">
<input type="hidden" name="lang" value="fr">
<input type="hidden" name="session"
value="afde3192b0c698af7117274c6bb7dc14"/>
<table>
<tr>
<td>Sex
:</td><td><select name="sex" onchange="go();" onfocus="skipcycle=true"
onblur="skipcycle=false"><option>------</option><option
value="/cgi-bin/recordz.cgi?lang=fr&page=search_wear&type=6&session=afde3192b0c698af7117274c6bb7dc14&sex=habits
homme&subcat=">habits homme</option><option
value="/cgi-bin/recordz.cgi?lang=fr&page=search_wear&session=afde3192b0c698af7117274c6bb7dc14&sex=habits
femme&subcat=">habits femme</option></select></td><td>Catégorie
</td><td><select name="category" onchange="go2();"
onfocus="skipcycle=true"
onblur="skipcycle=false"><option>------</option></select></td><td></td>
</tr>
<tr>
</tr>
</tr>
</table>
<br/> <br/>
<input type="button"
onClick="Lvl_P2P('/cgi-bin/recordz.cgi?lang=fr&session=afde3192b0c698af7117274c6bb7dc14&action=dosearchwear',true,0500)"
value="Chercher"> <input type="button" onClick="window.close();"
value="Fermer">
</form>
</body>
</html>
I'm getting headache will trying to find why it's doesn't work
Many Thanks
Under IE I could not point why I can't get the selected value from a
function
here the code
function Lvl_P2P(url,closeIt,delay){ //ver1.0 4LevelWebs
var fabricant_box;
var fabricant_value;
var category_box;
var category_value;
var sex_box;
var sex_value2;
var size_value;
var price_min_value;
var price_max_value;
var box1 = document.select_wish.sex;
var destination1 = box1.options[box1.selectedIndex].value;
alert (destination1);
opener.location.href = url;
}
and the full page code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<link href="/css/main.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
var skipcycle = false
function focOnMe(){
if(!skipcycle){
window.focus();
}
popopen = setTimeout('focOnMe()', 500);
}
function go()
{
var box = document.select_wish.sex;
var destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
function go2()
{
var box = document.select_wish.category;
var destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
function go3()
{
var box = document.select_wish.fabricant;
destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
function go4()
{
var box = document.select_wish.motorisation;
var destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}
</script>
</head>
<body onload =" popopen = setTimeout('focOnMe()', 500);">
<br/>
<form name="select_wish"
action="/cgi-bin/recordz.cgi?lang=fr&action=search&session=afde3192b0c698af7117274c6bb7dc14"
method="post">
<input type="hidden" name="action" value="dosearchimmo">
<input type="hidden" name="lang" value="fr">
<input type="hidden" name="session"
value="afde3192b0c698af7117274c6bb7dc14"/>
<table>
<tr>
<td>Sex
:</td><td><select name="sex" onchange="go();" onfocus="skipcycle=true"
onblur="skipcycle=false"><option>------</option><option
value="/cgi-bin/recordz.cgi?lang=fr&page=search_wear&type=6&session=afde3192b0c698af7117274c6bb7dc14&sex=habits
homme&subcat=">habits homme</option><option
value="/cgi-bin/recordz.cgi?lang=fr&page=search_wear&session=afde3192b0c698af7117274c6bb7dc14&sex=habits
femme&subcat=">habits femme</option></select></td><td>Catégorie
</td><td><select name="category" onchange="go2();"
onfocus="skipcycle=true"
onblur="skipcycle=false"><option>------</option></select></td><td></td>
</tr>
<tr>
</tr>
</tr>
</table>
<br/> <br/>
<input type="button"
onClick="Lvl_P2P('/cgi-bin/recordz.cgi?lang=fr&session=afde3192b0c698af7117274c6bb7dc14&action=dosearchwear',true,0500)"
value="Chercher"> <input type="button" onClick="window.close();"
value="Fermer">
</form>
</body>
</html>
I'm getting headache will trying to find why it's doesn't work
Many Thanks