В течение страницы я выбираю рамку рисунка, чтобы создать изображение с матированием - эта часть работает. Что я хочу сделать: Скажем, матирование установлено на 1 мат, а фрейм установлен на Frame8, если я решу, что хочу 2 мата, как я смогу загрузить frame8, когда страница перезагрузится. Прямо сейчас он возвращается к рамке по умолчанию. Jquery и php используются на странице.
в шапке:
$('#mattes-radio-0').click(function() {
window.location = 'index-custom.php?mattes=0';
});
$('#mattes-radio-1').click(function() {
window.location = 'index-custom.php?mattes=1';
});
$('#mattes-radio-2').click(function() {
window.location = 'index-custom.php?mattes=2';
});
$('#mattes-radio-3').click(function() {
window.location = 'index-custom.php?mattes=3';
});
в теле:
Здесь устанавливается Javascript var, в каком кадре я щелкнул -
$('#frame$frame_id[$i]').click(function() {
$('#top-left-frame').html('<img src=\"$upper_left[$i]\" alt=\"\" />');
$('#top-mid-frame').css('background-image','url($upper_middle[$i])');
$('#top-right-frame').html('<img src=\"$upper_right[$i]\" alt=\"\" />');
$('#mid-left-frame').css('background-image','url($middle_left[$i])');
$('#mid-right-frame').css('background-image','url($middle_right[$i])');
$('#bottom-left-frame').html('<img src=\"$bottom_left[$i]\" alt=\"\" />');
$('#bottom-mid-frame').css('background-image','url($bottom_middle[$i])');
$('#bottom-right-frame').html('<img src=\"$bottom_right[$i]\" alt=\"\" />');
$('#frame-select').html('$prod_id');
$('#pid-form').val('$frame_id[$i]');
$('#oa_id-form').val('$prod_id');
var frameState = $(this).attr('id');
alert(frameState + ' was clicked.');
});
<tr>
<td>
No Mats: <input type="radio" name="mattes-radio" align="middle"<?php if($_GET['mattes'] == 0){ echo 'checked="checked"';} ?> id="mattes-radio-0">
</td>
</tr>
<tr>
<td>
Single Mat: <input type="radio" name="mattes-radio" <?php if($_GET['mattes'] == 1){ echo 'checked="checked"';} ?> id="mattes-radio-1">
</td>
</tr>
<tr>
<td>
Double Mat: <input type="radio" name="mattes-radio" <?php if($_GET['mattes'] == 2){ echo 'checked="checked"';} ?> id="mattes-radio-2">
</td>
</tr>
<tr>
<td>
Triple Mat: <input type="radio" name="mattes-radio" <?php if($_GET['mattes'] == 3){ echo 'checked="checked"';} ?> id="mattes-radio-3">
</td>
</tr>