test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • jalankaki Friend
    #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, Stef

    Sherlock Friend
    #265567

    Hi
    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 Friend
    #278300

    Works 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 Friend
    #278318

    Hi

    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.

    madfish2008 Friend
    #278436

    Hi 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 Friend
    #278517

    Can you give us your live URL, any screenshot or more details of the problem will be helpful

    zeolite Friend
    #280424

    Try 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

    MIchael Mocilac Friend
    #281622

    I 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>

    2khaat Friend
    #284355

    thank you thank you!

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 8 voices, and was last updated by  2khaat 15 years, 12 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum