leeboycymru
Programmer
I have been working on a site to make it compliant and to work more closely with css and div's.
Before I started work on it the area that Im going to ask about worked fine, but since I done some work on it, it doesnt work in IE6 which it did before, but it works fine in IE7 and FF.
I have posted the code that I think plays the part of the function.
This is the site im talking about:
and the area i cant get to work is the text area and drop down to the right of 'Hotel' in the central area of the website where the search is.
There is 2 layers there, and the one is supposed to sit above the aother until selected, so to cut it short the text entry field sits above the activities layer on first view, as you can see if you follow the original link.
And this is it working fine as it was before i worked on it.
Here is the code:
var country = new Array();
var region = new Array();
var countryregion = new Array();
function swap()
{
if (document.search.hlist.value ==0)
{
document.getElementById("services").style.display="none"
document.getElementById("hotname").style.display="block"
document.search.action="result.php";
}
else if(document.search.hlist.value ==1)
{
document.getElementById("hotname").style.display="none"
document.getElementById("services").style.display="block"
document.search.action="result.php";
}
}
function fillregion(countryid)
{
var i=0;
document.search.selectRegion.options.length=0;
if(countryid==0 || i==0 ){
document.search.selectRegion.options[0] = new Option()
document.search.selectRegion.options[0].value=0;
document.search.selectRegion.options[0].innerText="anywhere";
i++;
}
if(countryid!=0 && i!=0 ){
for(j=0;j<=countryregion.length;j++)
{
if(countryregion[j]==countryid)
{
document.search.selectRegion.options = new Option()
document.search.selectRegion.options.value=j;
document.search.selectRegion.options.innerText=region[j];
i++;
}
}
}
swap();
}
<select name="hlist" class="hlist" onchange="swap(this.value)">
<option value="0">Hotels</option>
<option value="1">Activities</option>
</select></td>
<td>
<div id="lhotname" style="position:absolute; left:155px; top:39px; width:112px; height:24px; z-index: 2; margin:0;"><input name="hotname" type="text" id="hotname" size="29" /></div>
<div id="lservices" style="position:absolute; left:155px; top:40px; width:112px; height:24px; z-index: 1; margin:0;">
<select name="services" id="services">
<?php
$qu=mysql_query("select * from tbl_tematics ") or die (mysql_error());
while($ru=mysql_fetch_assoc($qu))
{
echo "<option value='$ru[Id_Tem]'>$ru[Nom_Tem]</option>";
}
?>
</select>
</div>
So the trouble being that in the new update I cant get the z-index to work with the two layers.
Lee
Before I started work on it the area that Im going to ask about worked fine, but since I done some work on it, it doesnt work in IE6 which it did before, but it works fine in IE7 and FF.
I have posted the code that I think plays the part of the function.
This is the site im talking about:
and the area i cant get to work is the text area and drop down to the right of 'Hotel' in the central area of the website where the search is.
There is 2 layers there, and the one is supposed to sit above the aother until selected, so to cut it short the text entry field sits above the activities layer on first view, as you can see if you follow the original link.
And this is it working fine as it was before i worked on it.
Here is the code:
var country = new Array();
var region = new Array();
var countryregion = new Array();
function swap()
{
if (document.search.hlist.value ==0)
{
document.getElementById("services").style.display="none"
document.getElementById("hotname").style.display="block"
document.search.action="result.php";
}
else if(document.search.hlist.value ==1)
{
document.getElementById("hotname").style.display="none"
document.getElementById("services").style.display="block"
document.search.action="result.php";
}
}
function fillregion(countryid)
{
var i=0;
document.search.selectRegion.options.length=0;
if(countryid==0 || i==0 ){
document.search.selectRegion.options[0] = new Option()
document.search.selectRegion.options[0].value=0;
document.search.selectRegion.options[0].innerText="anywhere";
i++;
}
if(countryid!=0 && i!=0 ){
for(j=0;j<=countryregion.length;j++)
{
if(countryregion[j]==countryid)
{
document.search.selectRegion.options = new Option()
document.search.selectRegion.options.value=j;
document.search.selectRegion.options.innerText=region[j];
i++;
}
}
}
swap();
}
<select name="hlist" class="hlist" onchange="swap(this.value)">
<option value="0">Hotels</option>
<option value="1">Activities</option>
</select></td>
<td>
<div id="lhotname" style="position:absolute; left:155px; top:39px; width:112px; height:24px; z-index: 2; margin:0;"><input name="hotname" type="text" id="hotname" size="29" /></div>
<div id="lservices" style="position:absolute; left:155px; top:40px; width:112px; height:24px; z-index: 1; margin:0;">
<select name="services" id="services">
<?php
$qu=mysql_query("select * from tbl_tematics ") or die (mysql_error());
while($ru=mysql_fetch_assoc($qu))
{
echo "<option value='$ru[Id_Tem]'>$ru[Nom_Tem]</option>";
}
?>
</select>
</div>
So the trouble being that in the new update I cant get the z-index to work with the two layers.
Lee