Hola Ronruby, gracias por tu respuesta, si te paso el código no me podrias ayudar a modificarlo porque nose como modificarlo, yo ya trate de modificarlo pero no tengo tantos conocimientos, acá te dejo el código por si queres echarle un vistazo, muchas gracias.
Código PHP:
## Check if the file is included in the Joomla Framework
defined('_JEXEC') or die ('No Acces to this file!');
## Adding the AJAX part to the dropdowns & Lightbox functions
$document =& JFactory::getDocument();
$document->addScript( JURI::root(true).'/administrator/components/com_rdautos/helper/ajax.js');
?>
<style type="text/css">
#container{
height: 100%;
width: 100%;
margin: 2;
}
#top{
border: 1px solid;
border-color:#CCCCCC;
padding-left: 3px;
padding-bottom: 2px;
padding-top: 2px;
background-color:#EEEEEE;
}
#normal{
border: 0px solid;
border-color:#CCCCCC;
padding: 3px;
}
</style>
<script type="text/javascript">
var ajax = new Array();
function getModelList(sel)
{
var Code = sel.options[sel.selectedIndex].value;
document.getElementById('modelid').options.length = 0;
if(Code.length>0){
var index = ajax.length;
ajax[index] = new sack();
ajax[index].requestFile = 'index.php?option=com_rdautos&controller=search&task=getModels&format=raw&makeid='+Code;
ajax[index].onCompletion = function(){ createModels(index) };
ajax[index].runAJAX(); // Execute AJAX function
}
}
function createModels(index)
{
var obj = document.getElementById('modelid');
eval(ajax[index].response); // Executing the response from Ajax as Javascript code
}
</script>
<script language="javascript">
function getKeyCode(eventObject)
{
if (!eventObject) keyCode = window.event.keyCode; //IE
else keyCode = eventObject.which; //Mozilla
return keyCode;
}
function onlyNumeric(eventObject)
{
keyCode = getKeyCode(eventObject);
if (((keyCode > 31) && (keyCode < 48)) || ((keyCode > 57) && (keyCode < 127)))
{
if (!eventObject) window.event.keyCode = 0; //IE
else eventObject.preventDefault(); //Mozilla
return false;
}
}
</script>
<style type="text/css">
select{
width:140px;
}
</style>
<h1 class="contentheading">
<?php echo JText::_( 'SEARCH VEHICLE' ); ?> </h1>
<?php echo JText::_( 'SEARCH EXPLANATION' ); ?><br><br>
<form action = "index.php?option=com_rdautos&view=results" method="POST" name="adminForm" id="adminForm">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="69%">
<div id="container">
<div id="top">
<strong><?php echo JText::_( 'SEARCH OPTIONS' ); ?></strong>
</div>
<div id="normal">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="23%"><strong><?php echo JText::_( 'SEARCH MAKE' ); ?></strong></td>
<td width="25%"><strong><?php echo JText::_( 'SEARCH MODEL' ); ?></strong></td>
<td width="25%"><strong><?php echo JText::_( 'SEARCH BUILD' ); ?></strong></td>
<td width="27%"><strong><?php echo JText::_( 'SEARCH PRICE' ); ?></strong></td>
</tr>
<tr>
<td><?php echo $this->lists[make]; ?></td>
<td><?php echo $this->lists[model]; ?></td>
<td><input name="buildfrom" type="text" class="inputbox" id="buildfrom" size="9" maxlength="4"
value="1990" onfocus="this.value = (this.value=='1990')? '' : this.value;"
onkeypress="onlyNumeric(arguments[0])"/>
- <input name="buildtill" type="text" class="inputbox" id="buildtill" size="9" maxlength="4"
value="2008" onfocus="this.value = (this.value=='2008')? '' : this.value;"
onkeypress="onlyNumeric(arguments[0])"/></td>
<td>
<input name="pricefrom" type="text" class="inputbox" id="pricefrom" size="8" maxlength="7"
onkeypress="onlyNumeric(arguments[0])" />
- <input name="pricetill" type="text" class="inputbox" id="pricetill" size="9" maxlength="7"
onkeypress="onlyNumeric(arguments[0])" /></td>
</tr>
<tr>
<td><strong><?php echo JText::_( 'SEARCH TRANS' ); ?></strong></td>
<td><strong><?php echo JText::_( 'SEARCH FUEL' ); ?></strong></td>
<td><strong><?php echo JText::_( 'SEARCH MILEAGE' ); ?></strong></td>
<td> </td>
</tr>
<tr>
<td><?php echo $this->lists[transmission]; ?></td>
<td><?php echo $this->lists[fuel]; ?></td>
<td><input name="mileageFrom" type="text" class="inputbox" id="mileageFrom" size="9" maxlength="7" />
- <input name="textfield" type="text" class="inputbox" id="textfield2" size="9" maxlength="7" /></td>
<td><div align="right">
<input type="submit" name="button" id="button" class="button" value="<?php echo JText::_( 'SEARCH NOW' ); ?>" />
</div></td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
<br /><br />
</form>