![]() |
|
Home | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]() Hi Eric,
In my shop 30208 I am trying to use dropdown boxes instead of UL lists due to the number of items in the filters. I thought I'd set it all up all right - it works fine in Firefox... however I am seeing some strange behaviour on Chrome. If I go to a category page and click one of the sort options both filter (Model and Price) dropdown boxes disappears. If I select an item in one of the filters the other dropdown box disappears... Would you have any idea what might be causing this? Thanks!
__________________
WordPress Security - Is your WordPress secure? Get our FREE checklist and find out. Easy-Email - Access ALL your email accounts with one login & synchronize automatically on all your computers. |
#2
|
||||
|
||||
![]() Hmm... I don't know...
If you remove onchange="this.form.submit()" from your forms, does it still disappear?
__________________
![]() ![]() ![]() ![]() |
#3
|
|||
|
|||
![]() It appears that it is the code to retain other filters that Chrome does not like...
If I take out the lines in bold it works: Code:
<?php function search_price_value($word) { $word = strip_tags($word); return $word; } ?> <form method="get"> <?php if (@$_GET['word']){ echo "<INPUT TYPE='HIDDEN' NAME='word' Value='".search_price_value($_GET['word'])."'"; } ?> <?php if (@$_GET['ppp']){ echo '<INPUT TYPE="HIDDEN" NAME="ppp" Value="'.search_price_value($_GET['ppp']).'"'; } ?> <?php if (@$_GET['sort']){ echo '<INPUT TYPE="HIDDEN" NAME="sort" Value="'.search_price_value($_GET['sort']).'"'; } ?> <select name="price" id='store_dropdown_box'> <option value="1-50"<?php if (@$_GET['price']=='1-50') {echo ' selected="selected"';}?>>Moins de 50</option> <option value="50-100"<?php if (@$_GET['price']=='50-100') {echo ' selected="selected"';}?>>50 ~ 100</option> <option value="100-150"<?php if (@$_GET['price']=='100-150') {echo ' selected="selected"';}?>>100 ~ 150</option> <option value="150-200"<?php if (@$_GET['price']=='150-200') {echo ' selected="selected"';}?>>150 ~ 200</option> <option value="200-250"<?php if (@$_GET['price']=='200-250') {echo ' selected="selected"';}?>>200 ~ 250</option> <option value="250-"<?php if (@$_GET['price']=='250-') {echo ' selected="selected"';}?>>Plus de 250</option> </select> <input type="submit" value="Go" class="dfsbmt" /> </form> <?php if (@$_GET['price']) { ?> <p><a href="[server.url type='fullpage' query='-price']">[X] Remove Filter</a></p> <?php } ?> By the way I think it is an error in the standard Sorting Template that it does not retain any other filters that might be set... have you already flagged this? Cheers, Anders
__________________
WordPress Security - Is your WordPress secure? Get our FREE checklist and find out. Easy-Email - Access ALL your email accounts with one login & synchronize automatically on all your computers. |
#4
|
||||
|
||||
![]() The problem is you did not close your <input> tags. You basically had this:
<input type="hidden" name="word" value="' . search_price_value($_GET['word']) . '" but it should be this: <input type="hidden" name="word" value="' . search_price_value($_GET['word']) . '" /> HTML Code:
<?php function search_price_value($word) { $word = strip_tags($word); return $word; } ?> <form method="get"> <?php if (@$_GET['word']) { echo '<INPUT TYPE="HIDDEN" NAME="word" Value="' . search_price_value($_GET['word']) . '" />'; } if (@$_GET['ppp']) { echo '<INPUT TYPE="HIDDEN" NAME="ppp" Value="' . search_price_value($_GET['ppp']) . '" />'; } if (@$_GET['sort']) { echo '<INPUT TYPE="HIDDEN" NAME="sort" Value="' . search_price_value($_GET['sort']) . '" />'; } ?> <select name="price" id='store_dropdown_box'> <option value="1-50"<?php if (@$_GET['price']=='1-50') {echo ' selected="selected"';}?>>Moins de 50</option> <option value="50-100"<?php if (@$_GET['price']=='50-100') {echo ' selected="selected"';}?>>50 ~ 100</option> <option value="100-150"<?php if (@$_GET['price']=='100-150') {echo ' selected="selected"';}?>>100 ~ 150</option> <option value="150-200"<?php if (@$_GET['price']=='150-200') {echo ' selected="selected"';}?>>150 ~ 200</option> <option value="200-250"<?php if (@$_GET['price']=='200-250') {echo ' selected="selected"';}?>>200 ~ 250</option> <option value="250-"<?php if (@$_GET['price']=='250-') {echo ' selected="selected"';}?>>Plus de 250</option> </select> <input type="submit" value="Go" class="dfsbmt" /> </form> <?php if (@$_GET['price']) { ?> <p><a href="[server.url type='fullpage' query='-price']">[X] Remove Filter</a></p> <?php } ?>
__________________
![]() ![]() ![]() ![]() |
#5
|
|||
|
|||
![]() Oh, dear!
Well spotted :-) Amazing how well code works when it is written correctly... Thank you!
__________________
WordPress Security - Is your WordPress secure? Get our FREE checklist and find out. Easy-Email - Access ALL your email accounts with one login & synchronize automatically on all your computers. |
Thread Tools | Search this Thread |
Display Modes | |
|
|