|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
Опции темы | Поиск в этой теме |
27.06.2014, 19:51 | #1 |
Пользователь
Регистрация: 04.11.2013
Сообщений: 48
|
в лево и в право
Уважаемые спецы, есть каталог с со списком товаров, при нажатии на товар появляется окно с расширенным описанием и картинками товара.
Как добавить к окну кнопки прокрутки товара( в лево и в право). Вот часть кода Код HTML:
<script type="text/javascript"> function show_full (link,id) { var wheight = get_wh();lots[id].big_curImg=0; var html = ""; html += '<div class="full_results" style="margin-top:50px;height:'+(wheight-100)+'px; overflow: visible;">'; html += '<a id="sbox-btn-close" href="#" onclick="return close_full();" title="Закрыть"></a>'; html += '<table style="height: 30px;width:100%;" class="pl"><tr>'; html += '<td class="head w100" style=" text-align:center; text-decoration: none; font-weight:bold; font-family:Times New Roman,Times,serif; font-style:italic; font-size:1.7em;"><a style="text-decoration: none; color:#3333CC;" href="/index.php?option=com_spcatalog&view=catalog&id='+lots[id].purchase_id+'&lot_id='+lots[id].id+'">'+esc_tags( lots[id].name)+'</a></td>'; html += '</tr></table>'; html += '<div style="vertical-align: top; margin: 10px 0; height: '+(wheight-160)+'px;overflow: auto;"><table class="w100">'; html += '<tr>'; html += '<td style="width: 360px;vertical-align: top; ">'; html += '<div title="Закрыть" style="text-align:center"><a href="#" onclick="return close_full();">'; html += '<img id="bigimage_'+id+'" src="'+item_image_url(id)+'"'; html += 'style="margin:5px;max-width: 350px;width:expression(document.body.clientWidth > 350? \'350\' : \'auto\');max-height: '+(wheight-170)+'px;height:expression(document.body.clientHeight > '+(wheight-170)+'? \''+(wheight-170)+'\' : \'auto\');"></a></div>'; html += '<div id="bigimages_pages_'+id+'">'+make_bigimg_selector(id)+'</div>'; html += '<td valign=top><div style="overflow: auto;">'; html += '<div id = "result" style=" margin:0 5% 0 5%; width:90%;height: 30px; text-align: center;display:block; box-sizing:border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; color: #660033; font-size: 1.2em;"></div>'; html += '<table class="desc"><tr><td>'; html += '<div style="width: 300px;">'; html += '<div><strong>Цена: </strong><span class="red em14"style="background:none repeat scroll 0 0 #698FE8;padding:0 3px;color:#FFFFFF;font-weight:normal;" >'+format_money(esc_tags(lots[id].price))+'</span> руб. </div>'; html += '<div><strong>%(орг): </strong>'+format_money(esc_tags(lots[id].org_fee))+'</div>'; html += '<div><span style="font-size:12px;color:red;top:4px;width:325px;text-align:left;">*цена указана без учета орг%</span></div>'; var vars = lots[id].vars;var opt_idx = 0;for (v in vars) { html += make_option_for_full( "lot" + id + "_opt" + opt_idx, v, vars[v]); opt_idx ++;} html += '<div><strong>Кол-во:</strong> '; html += '<input name="kol" id="lot_kol" type="TEXT" value="1" style="width: 50px"></div>'; html += '<div style="text-align:right"><a href="javascript:add_to_order(' + id + ',1);" title="Добавить в корзину"><img src="/images/button.png" border=0></a></div>'; html += '<div class="text-align" style="text-align:center"><strong>Описание:</strong></div><div>'+esc_tags2( lots[id].desc ).replace(/\[br\]/gi,"<br>")+'</div>'; html += '</div>';html += '</td>';html += '</tr>';html += '</table></div>';html += '</td>';html += '</tr>';html += '</table></div>'; html += '<table style="height: auto;" class="pl">';html += '<tr>';html += '</tr>';html += '</table>';html += '</div>'; document.getElementById('full_results').innerHTML = html; document.getElementById('full_results').style.display = 'block'; document.getElementById('bg').style.display = 'block'; };function close_full () {document.getElementById('full_results').style.display = "none";document.getElementById('bg').style.display = "none";return false;};var lots=<?php echo $this->lots?>; </script> <?php if (is_array($this->items)){ ?><?php foreach ($this->items as $item){ ?> <div class="client_ci_container" id="tovar_<?php echo $item->lot_id;?>" ><a style=" text-decoration: none;" href="#" onclick="show_full(this,<?php echo $item->lot_id;?>);return false;" title="<?php echo $item->lot_name;?> подробнее"> <div class="client_ci_container_inner"><div style="padding:2px 0px; height:37px; overflow: hidden;"><P style="color:#3333CC;font-weight:bold;"> <?php echo $item->lot_name;?></P> </div><div class="client_ci_img_container" style="height:200px;padding:5px;"><div class="w100"><center><img id="item_<?php echo $item->lot_id;?>" class="img" style="max-height: 175px; max-width: 175px; " src="<?php echo $item->image_url;?>" /> </center></div></div><div><span style="color:#990000; width:auto;float:left; font: 15px Arial; margin-top: 10px;">Цена: <strong><?php echo $item->lot_cost;?></strong> руб.</span> <?php if ($item->p_yes == 1){ ?><span style="float:right"><a href="/index.php?option=com_spcatalog&view=catalog&id=<?php echo $item->purchase_id;?>">Закупка</a></span><?php }?></div></div></a></div><?php }?><?php }?> Последний раз редактировалось Stilet; 27.06.2014 в 20:20. |
28.06.2014, 23:25 | #2 |
Форумчанин
Регистрация: 26.01.2007
Сообщений: 278
|
Это только часть кода?
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Браузерная текстовая игра-право/лево | rusnard | Gamedev - cоздание игр: Unity, OpenGL, DirectX | 0 | 18.02.2013 01:32 |
сместить в лево progressBar | arthur1 | C# (си шарп) | 5 | 23.02.2012 22:35 |
Парсить текст в лево | bulldog5293 | Общие вопросы Delphi | 10 | 12.05.2011 00:00 |
Паскаль, вывести строки массива, поочередно, с лево на право, справа на лево | Amid1990 | Помощь студентам | 2 | 15.11.2010 13:00 |
Право или лево? | Altera | Свободное общение | 13 | 23.12.2008 08:58 |