Commit af756a1e authored by tbrehm's avatar tbrehm

Fixed: FS#854 - Display Error in Internet Explorer creating a website

parent 34a3f8a1
......@@ -300,6 +300,28 @@ function loadContentInto(elementid,pagename) {
var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename, itemContentCallback);
}
function loadOptionInto(elementid,pagename) {
var itemContentCallback = {
success: function(o) {
var teste = o.responseText;
var elemente = teste.split('#');
el=document.getElementById(elementid);
el.innerHTML='';
for (var i = 0; i < elemente.length; ++i){
var foo2 = document.createElement("option");
foo2.appendChild(document.createTextNode(elemente[i]));
foo2.value=elemente[i];
el.appendChild(foo2);
}
},
failure: function(o) {
alert('Ajax Request was not successful.');
}
}
var pageContentObject2 = YAHOO.util.Connect.asyncRequest('GET', pagename, itemContentCallback);
}
function keepalive() {
var pageContentCallbackKeepalive = {
success: function(o) {
......
......@@ -41,11 +41,11 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') {
$sql = "SELECT ip_address FROM server_ip WHERE server_id = $server_id";
$ips = $app->db->queryAllRecords($sql);
// $ip_select = "<option value=''></option>";
$ip_select = "<option value='*'>*</option>\r\n";
$ip_select = "*";
if(is_array($ips)) {
foreach( $ips as $ip) {
//$selected = ($ip["ip_address"] == $this->dataRecord["ip_address"])?'SELECTED':'';
$ip_select .= "<option value='$ip[ip_address]'>$ip[ip_address]</option>\r\n";
$ip_select .= "#$ip[ip_address]";
}
}
unset($tmp);
......
......@@ -15,7 +15,7 @@
<input type="hidden" name="server_id" value="{tmpl_var name='server_id_value'}" />
<tmpl_else>
<label for="server_id">{tmpl_var name='server_id_txt'}</label>
<select name="server_id" id="server_id" class="selectInput" onChange="loadContentInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value)">
<select name="server_id" id="server_id" class="selectInput">
{tmpl_var name='server_id'}
</select>
</tmpl_if>
......
......@@ -15,7 +15,7 @@
<input type="hidden" name="server_id" value="{tmpl_var name='server_id_value'}" />
<tmpl_else>
<label for="server_id">{tmpl_var name='server_id_txt'}</label>
<select name="server_id" id="server_id" class="selectInput" onChange="loadContentInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value)">
<select name="server_id" id="server_id" class="selectInput" onChange="loadOptionInto('ip_address','sites/ajax_get_ip.php?server_id='+document.getElementById('server_id').value)">
{tmpl_var name='server_id'}
</select>
</tmpl_if>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment