-
AuthorPosts
-
August 15, 2008 at 8:58 pm #132267
I have a simple question which I cannot seem to get right. I use JA-Mesolite which has this little search box on top left (under logo).
Initially one would not know that it is a search box, thus I did this to make the box grey:
#ja-search .inputbox {
padding: 4px;
background: #555555;
border: 0px;
font-weight: bold;
color: #ffffff;
position: relative;
left: 41px;
top: 7px;
}next, I want to show a text, “search…” in the box, to make it clearer. Usually search text boxes that I see display this text, and will dissapear when you click on it to type in your search phrase.
Joomla user guide said to go to module manager and type in the word that we want displayed in the text field. However I could not get to display this “Search…” indicator
I know this is very simple, but I have not yet found the answer.
Hope to find answer here,
thanks, StefSherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
August 16, 2008 at 3:36 am #265567Hi
you must edit default.php(templatesja_mesolitehtmlmod_search ) folder
Search this line:
$output = '<input name="searchword" id="mod_search_searchword" maxlength="20" alt="'.$button_text.'" class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" />';
Change to
$output = '<input name="searchword" id="mod_search_searchword" maxlength="20" alt="'.$button_text.'" value="Search..." class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" />';
Ashwin Iyer FriendAshwin Iyer
- Join date:
- September 2014
- Posts:
- 78
- Downloads:
- 23
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
November 6, 2008 at 10:46 am #278300Works great. Wish there could be some way around to get the word “search…” disappear when clicked so customer dont have to use backspace and can type it fast. If thats not all possible then may need to go for default search module of Virtuemart. Problem is there isnt enough space left for me in the left side.
Anyway any help is appreciated. Thanks in advance
tonyg Friendtonyg
- Join date:
- June 2008
- Posts:
- 197
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 18
- Thanked:
- 46 times in 27 posts
November 6, 2008 at 3:00 pm #278318Hi
Try using VitueMart Module instead of the Product Categories module. The VirtueMart Module will install both Product Categories and a search module. I hope that’s clear and helps.
November 7, 2008 at 11:34 am #278436Hi all,
I have the same little problem.
$output = '<input name="searchword" id="mod_search_searchword" maxlength="20" alt="'.$button_text.'" value="Search..." class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" />';
I can see “Search…” in the search field but it would be cool if it disappears when clicking on it … for that i used onclick=”this.value=’ ‘;” but this time it doesn’t work … i have blank homepage, means it mess up all my site.
Does anyone fixed it ?? :confused:
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
November 8, 2008 at 2:09 am #278517Can you give us your live URL, any screenshot or more details of the problem will be helpful
zeolite Friendzeolite
- Join date:
- February 2007
- Posts:
- 28
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 3
- Thanked:
- 5 times in 2 posts
November 26, 2008 at 10:07 pm #280424Try this
$output = '<input name="searchword" id="mod_search_searchword" maxlength="20" alt="'.$button_text.'" value="Leita...." onFocus="this.value=''" onBlur="if (this.value == '') this.value='Leita...'" class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" />';
Just replace Leita as that means search in Icelandic. This works for me
3 users say Thank You to zeolite for this useful post
MIchael Mocilac FriendMIchael Mocilac
- Join date:
- September 2014
- Posts:
- 17
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 4 times in 1 posts
December 7, 2008 at 7:28 am #281622I have it working on my Mesolite template just replace mod_search code with this and you should be good.
<?php // no direct access
defined(‘_JEXEC’) or die(‘Restricted access’); ?>
<form action=”index.php” method=”post”>
<div class=”search<?php echo $params->get(‘moduleclass_sfx’) ?>”>
<?php
$output = ‘<input name=”searchword” id=”mod_search_searchword” maxlength=”‘.$maxlength.'” alt=”‘.$button_text.'” class=”inputbox’.$moduleclass_sfx.'” type=”text” size=”‘.$width.'” value=”‘.$text.'” onblur=”if(this.value==”) this.value=”.$text.”;” onfocus=”if(this.value==”.$text.”) this.value=”;” />’;if ($button) :
if ($imagebutton) :
$button = ‘<input type=”image” value=”‘.$button_text.'” class=”button’.$moduleclass_sfx.'” src=”‘.$img.'” onclick=”this.form.searchword.focus();”/>’;
else :
$button = ‘<input type=”submit” value=”‘.$button_text.'” class=”button’.$moduleclass_sfx.'” onclick=”this.form.searchword.focus();”/>’;
endif;
endif;switch ($button_pos) :
case ‘top’ :
$button = $button.'<br />’;
$output = $button.$output;
break;case ‘bottom’ :
$button = ‘<br />’.$button;
$output = $output.$button;
break;case ‘right’ :
$output = $output.$button;
break;case ‘left’ :
default :
$output = $button.$output;
break;
endswitch;echo $output;
?>
</div>
<input type=”hidden” name=”task” value=”search” />
<input type=”hidden” name=”option” value=”com_search” />
</form> -
AuthorPosts
This topic contains 9 replies, has 8 voices, and was last updated by 2khaat 15 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum