pragmaMx Support Forum

pragmaMx => Themes & Design => Thema gestartet von: cihan am 23 Februar 2007, 16:43:49

Titel: searchform vorbelegen funktioniert nicht
Beitrag von: cihan am 23 Februar 2007, 16:43:49
Hallo,
habe da ein kleines Problemchen... Wenn ich versuche, den Suchfeld mit "suchen..." vorzubelegen, dann verschwindet die ganze Seite  :gruebel:

So mache ich das:

function mx_theme_searchform()
{
    $out = '';
    if (mxModuleAllowed('Search')) {
        $out = '
<form action="modules.php" method="get" title="' . _SEARCH . '">
<input type="hidden" name="name" value="Search">
<input type="text" name="query" size="20" title="' . _SEARCH . '">
<input type="submit" value="' . _SEARCH . '" title="' . _SEARCH . '">
</form>
';
    }
    return $out;
}


wird ersetzt durch:

function mx_theme_searchform()
{
    $out = '';
    if (mxModuleAllowed('Search')) {
        $out = '
<form action="modules.php" method="get" title="' . _SEARCH . '">
<input type="hidden" name="name" value="Search">
<input type="text" name="query"  title="' . _SEARCH . '"  size="20" value="suchen..." onblur="if(this.value=='') this.value='suchen...';" onfocus="if(this.value=='suchen...') this.value='';" >
<input type="submit" value="' . _SEARCH . '" title="' . _SEARCH . '">
</form>
';
    }
    return $out;
}


Dann bekomme ich nur eine weiße Seite... Wäre nett, wenn jemand sagen könnte, woran es liegt  :)
schonmal danke im voraus.

Titel: Re: searchform vorbelegen funktioniert nicht
Beitrag von: jubilee am 23 Februar 2007, 19:05:20
Versuche es damit einmal ...


function mx_theme_searchform()
{
    $out = '';
    if (mxModuleAllowed('Search')) {
        $out = '
<form action="modules.php" method="get" title="' . _SEARCH . '">
<input type="hidden" name="name" value="Search">
<input type="text" name="query"  title="' . _SEARCH . '"  size="20" value="suchen..." onblur="if(this.value==\'\') this.value=\'suchen...\';" onfocus="if(this.value==\'suchen...\') this.value=\'\';" >
<input type="submit" value="' . _SEARCH . '" title="' . _SEARCH . '">
</form>
';
    }
    return $out;
}



Titel: Re: searchform vorbelegen funktioniert nicht
Beitrag von: cihan am 23 Februar 2007, 19:16:09
Danke jubilee  :) funktioniert nun super :thumbup: