<?php
$results = array(
array(
'value' => 'None',
'name' => 'keine',
'selected' => false),
array(
'value' => 'ASIN',
'name' => 'ASIN (Amazon)',
'selected' => false),
array(
'value' => 'EAN',
'name' => 'EAN',
'selected' => true),
array(
'value' => 'GTIN',
'name' => 'GTIN',
'selected' => false),
array(
'value' => 'ISBN',
'name' => 'ISBN',
'selected' => false),
array(
'value' => 'UPC',
'name' => 'UPC',
'selected' => false),
);
?>
<select name="StandardProductIDType" id="StandardProductIDType" class="TxtField">
<? foreach ($results as $result): ?>
<option value="<?= $result['value']; ?>" <?= ($result['selected'] ?
'selected="selected"' : null); ?>><?= $result['name']; ?></option>
<? endforeach; ?>
</select>
<div id="background">#ffffff</div>
<!DOCTYPE HTML>
<html>
<head>
<meta charset = "utf-8" >
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<title>...</title>
</head>
<body>
<?php
include "file.php";
?>
<script type="text/javascript">
if (location.search.substring(1) == 'color') {
var color = prompt('Введите цвет в формате HEX:', '');
color = color.replace(/#([0-9A-F]){6}/gi, '#$1');
if (!color || color == '') { color = '#ffffff'; }
$.get( 'file.php', { background: color});
}
var a = $('#background').html();
$('body').css('background', a);
</script>
</body>
</html>