Fatal error: Class 'JHTMLSelect' not found in...
The code is:
Code: Select all
foreach ($weblinks as $link) :
echo JHTMLSelect::option($link->url, $link->url);
endforeach;
Can Someone Help me? Thank you...
Code: Select all
foreach ($weblinks as $link) :
echo JHTMLSelect::option($link->url, $link->url);
endforeach;
Code: Select all
jimport("joomla.html.html.select");
Code: Select all
foreach ($weblinks as $link) {
$options[] = JHTMLselect::option($link->url, $link->url);
}
$html = JHTMLselect::genericlist($options, "name_to_use");
echo $html;
Is there any reason why the above jimport statement still gives me a class not found error?ircmaxell wrote:Well, you need to load it. Before the foreach loop, try adding this:
Code: Select all
jimport("joomla.html.html.select");
Code: Select all
include_once JPATH_ROOT . "/libraries/joomla/html/html/select.php";
Code: Select all
JHTML::_( 'select.option', $link->url, $link->url );