HELP Needed on input Box instead Select Box - Joomla! Forum - community, help and support
hi all,
i need on php script of module shows select box/drop down box.
i need input box instead select box /drop down box
i need enter text (title) in input box instead choosing option drop down/select box
help me replace select box input box
i
to replaced with
please check script below
below complete code
i need on php script of module shows select box/drop down box.
i need input box instead select box /drop down box
i need enter text (title) in input box instead choosing option drop down/select box
help me replace select box input box
i
code: select all
echo "<select name='add' id='add'";
foreach ($rows $row)
{
echo "<option value='" .$row->url. "' /> ". $row->title;
}
echo "</select>";
to replaced with
code: select all
foreach ($rows $row)
{
echo "< input type = 'text' name='add' id =' ". $row->title."';
}
please check script below
below complete code
code: select all
<?php
defined('_jexec') or die ('direct access not allowed');
$allweblinks = intval($params->get('allweblinks',0));
$golabel = $params->get('buttonname','go');
$blank = intval($params->get('firstblank',0));
$custom = $params->get('firsttext','');
$separator = $params->get('separator','');
$image = $params->get('buttonimage','-1');
$catname = strtolower($params->get('catname','jumplinks'));
$autodirect = intval($params->get('autodirect',0));
if (isset($_post['submit']) || isset($_post['submit_x']))
{
$link = $_post['add'];
$target = $params->get('target','parent');
switch ($target)
{
case 'parent':
echo "<meta http-equiv='refresh' content='0;url=" .$link. "' />";
break;
case 'newwith':
echo "<meta http-equiv='refresh' content='0;url=" .$_server["php_self"]. "' />";
echo "<script type='text/javascript'>window.open('".$link."');</script>";
break;
case 'newwithout':
echo "<meta http-equiv='refresh' content='0;url=" .$_server["php_self"]. "' />";
echo "<script type='text/javascript'>window.open('".$link."','',config='toolbar=no');</script>";
break;
}
exit();
}
$db = jfactory::getdbo();
$cat = "lower(jc.title) = '".$catname."' , ";
if ($allweblinks == '1')
$cat = '';
$order = $params->get('order',0);
switch ($order)
{
case 0:
$orderstr = "ordering";
break;
case 1:
$orderstr = "j.title asc";
break;
case 2:
$orderstr = "j.title desc";
}
$query = "select j.* #__weblinks j inner join #__categories jc on j.catid = jc.id $cat j.published='1' , jc.published='1' order $orderstr";
$db->setquery($query);
$rows=$db->loadobjectlist();
error_reporting(e_error);
$url = $_server['server_uri'];
echo "<form action='" . $url . "' method='post' >";
echo "<select name='add' id='add'";
foreach ($rows $row)
{
echo "<option value='" .$row->url. "' /> ". $row->title;
}
echo "</select>";
if ($image !=-1 )
{
if ($autodirect ==1)
echo "<input type='submit' ".$style." id='submit' name='submit' value='".$golabel."' />";
$image = 'images/stories/'.$image;
echo "<input type='image' " .$style." src='".$image."' id='submit' name='submit' alt='".$golabel."' />";
}
else
{
echo "<input type='submit' ".$style." id='submit' name='submit' value='".$golabel."' />";
}
echo "</form>";
?>
you help, suggestion highly appreciated ... in advance.
ramesh chaudhary
Comments
Post a Comment