searchbox extra

pcwacht

Watch the quotes and doublequotes

the '   and the "

text starts with ' and ends with '
so:

$return_value = ' some text and doublequote " " and singlequotes ' ' ';

will error since the text will be not corrct
you need to escape the ' so it will be parsed as text instead of end of text

$return_value = ' some text and doublequote " " and singlequotes \' \' ';



$return_value  .= '<input type="text" name="string" size="22" class="boks" value="fill in your searchbla here..." onClick="if(this.value == \'fill in your searchbla here...\') { this.value = \'\'; }" onBlur="if(this.value == \'\') { this.value = \'Fill in your searchbla here....\'; }" />&nbsp;'

might work


John
[url="http://www.ictwacht.nl"]http://www.ictwacht.nl[/url] = Dutch ICT info
[url="http://www.pcwacht.nl"]http://www.pcwacht.nl[/url] = My first
both still work in progress, since years.....

snark


snark

'kay,

global $TEXT;
$return_value = " ";
if(SHOW_SEARCH) {
   $return_value  = '<div class="box">';
    $return_value  .= '<form action="'.WB_URL.'/search/index'.PAGE_EXTENSION.'" method="get" name="search" class="searchform" id="search">';
   $return_value  .= '<input type="text" name="string" size="22" class="boks" value="fill in your searchbla here..." onClick="if(this.value == 'fill in your searchbla here...') { this.value = ''; }" onBlur="if(this.value == '') { this.value = 'Fill in your searchbla here....'; }" />&nbsp;';
   $return_value  .= '<input name="submit" type="submit" class="buttonq" value="'.$TEXT['SEARCH'].'" />';
   $return_value  .= '</form>';
    $return_value  .= '</div>';
}
return $return_value;

crnogorac081

Hi,

I suggest to post the whole code so coders can take a look.

cheers
Web developer

snark

I want to include
onClick="if(this.value == 'fill in your searchbla here...') { this.value = ''; }" onBlur="if(this.value == '') { this.value = 'Fill in your searchbla here....'; }"

on the textfiel of the searchbox droplet


but I get a red drop...

anyone knows what to change?  in normal code this works fine