999000333
Programmer
- Nov 20, 2006
- 39
Hello I have a function in my webpage written in php called createListRegions, this function is inside the <head> tag. Now I call this function in my webpage as follow:
<body class="site_homepage" style="background-color: #dddb10" onLoad=" createListRegions();">
my problem is when I use Mozilla firefox the function is loaded in my webpage properly, this is I see the list of the regions I have created. But when I use Microsoft Explorer the list CANNOT BE SEEN, nothing is loaded.
Can any one know how to solve this problem.
Here is the code: First I create in a separate file a function that takes all the regions name from the datebase:
function listRegions()
{
global $table_geog_regions;
$query = "SELECT id, nome FROM `$table_geog_regions`";
$result = mysql_query($query) or die(mysql_error());
return $result;
}
So this function is in a separate file.
here is my index.php page where the list should be created and loaded.
<head>
<script language="javascript" type="text/javascript">
function searchPage(page)
{
document.cerca.pagina.value = page;
document.cerca.submit();
}
function createListRegions()
{
region = document.getElementById("RegioneID");
<?php
$result = listRegions();
while($res = mysql_fetch_array($result))
{
echo "region.innerHTML = region.innerHTML + \"<option value='" . $res['id'] . "'> " . $res['nome'] . " </option>\"; \n ";
}
?>
}
</script>
</head>
<body class="site_homepage" style="background-color: #dddb10" onLoad="createListRegions();">
...... ......... ....
<form action="index.php" name="ricerca_geografica" id="ricerca_geografica" method="post">
<select name="NazioneID" tabindex="1" size="4" id="NazioneID" onChange="">
</select>
<input type="submit" value="search">
</form>
<body class="site_homepage" style="background-color: #dddb10" onLoad=" createListRegions();">
my problem is when I use Mozilla firefox the function is loaded in my webpage properly, this is I see the list of the regions I have created. But when I use Microsoft Explorer the list CANNOT BE SEEN, nothing is loaded.
Can any one know how to solve this problem.
Here is the code: First I create in a separate file a function that takes all the regions name from the datebase:
function listRegions()
{
global $table_geog_regions;
$query = "SELECT id, nome FROM `$table_geog_regions`";
$result = mysql_query($query) or die(mysql_error());
return $result;
}
So this function is in a separate file.
here is my index.php page where the list should be created and loaded.
<head>
<script language="javascript" type="text/javascript">
function searchPage(page)
{
document.cerca.pagina.value = page;
document.cerca.submit();
}
function createListRegions()
{
region = document.getElementById("RegioneID");
<?php
$result = listRegions();
while($res = mysql_fetch_array($result))
{
echo "region.innerHTML = region.innerHTML + \"<option value='" . $res['id'] . "'> " . $res['nome'] . " </option>\"; \n ";
}
?>
}
</script>
</head>
<body class="site_homepage" style="background-color: #dddb10" onLoad="createListRegions();">
...... ......... ....
<form action="index.php" name="ricerca_geografica" id="ricerca_geografica" method="post">
<select name="NazioneID" tabindex="1" size="4" id="NazioneID" onChange="">
</select>
<input type="submit" value="search">
</form>