
Let me know how i went?
Search Box Module 1.4.0
The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."
Code: Select all
<div class="box">
<div class="top"><img src="catalog/view/theme/defult/image/icon_search.png" alt="" /><?php echo $heading_title; ?></div>
<div id="module_search2" class="middle">
<?php if ($keyword) { ?>
<input type="text" name="keyword" value="<?php echo $keyword; ?>" id="filter_keyword2" />
<?php } else { ?>
<input type="text" name="keyword" value="<?php echo $text_keywords; ?>" id="filter_keyword2" onclick="this.value = '';" onkeydown="this.style.color = '000000'" style="color: #999;" />
<?php } ?>
<br/>
<a onclick="moduleSearch2();" class="button"><span><?php echo $button_search; ?></span></a>
</div>
<script type="text/javascript"><!--
$('#module_search2 input').keydown(function(e) {
if (e.keyCode == 13) {
moduleSearch2();
}
});
function moduleSearch2() {
location = 'index.php?route=product/search&keyword=' + encodeURIComponent($('#filter_keyword2').attr('value'));
}
//--></script>
<div class="bottom"> </div>
</div>
The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."
Code: Select all
<div class="box">
<div class="top"><img src="catalog/view/theme/defult/image/icon_search.png" alt="" /><?php echo $heading_title; ?></div>
<div id="module_search2" class="middle">
<?php if ($keyword) { ?>
<input type="text" name="keyword" value="<?php echo $keyword; ?>" id="filter_keyword2" />
<?php } else { ?>
<input type="text" name="keyword" value="<?php echo $text_keywords; ?>" id="filter_keyword2" onclick="this.value = '';" onkeydown="this.style.color = '000000'" style="color: #999;" />
<?php } ?>
<br/>
<a onclick="moduleSearch2();" class="button"><span><?php echo $button_search; ?></span></a> </div>
<div class="bottom"> </div>
</div>
<script type="text/javascript"><!--
$('#module_search2 input').keydown(function(e) {
if (e.keyCode == 13) {
moduleSearch2();
}
});
function moduleSearch2() {
location = 'index.php?route=product/search&keyword=' + encodeURIComponent($('#filter_keyword2').attr('value'));
}
//--></script>
The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."
Users browsing this forum: No registered users and 2 guests