Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

RD Autos tira error al ir hacia atras

Estas en el tema de RD Autos tira error al ir hacia atras en el foro de Sistemas de gestión de contenidos en Foros del Web. Hola, Tengo instalado el componente Rd Autos Single Dealer y cuando busco con el buscador avanzado me busca los autos y cuando entro a un ...
  #1 (permalink)  
Antiguo 01/10/2011, 07:39
capitank
Invitado
 
Mensajes: n/a
Puntos:
Pregunta RD Autos tira error al ir hacia atras

Hola, Tengo instalado el componente Rd Autos Single Dealer y cuando busco con el buscador avanzado me busca los autos y cuando entro a un auto me lo muestra pero si quiero volver hacia atras para ver otro auto me sale un error de envio de formulario, cosa que no pasa con el el otro buscador que ordena solo por modelo, kilometros, año, etc, aca les dejo el link de la web de ellos:

http://rd-demo.com/mini-pro/faq.html

buscan por defecto y pasan a esta:

http://rd-demo.com/mini-pro/faq/sear...layout=results

cuando entran ahi pinchan un auto y cuando vuelven hacias atras sale el error.
A mi me pasa lo mismo que le pasa a ellos , en mi web.
Alguien con conocimientos de php sabe como solucionarlo? gracias
  #2 (permalink)  
Antiguo 01/10/2011, 07:44
Avatar de Ronruby  
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: RD Autos tira error al ir hacia atras

Tendrías que editar el codigo fuente para que envie la busqueda por URL y no por variables de formulario (POST).
Al ir atras el navegador ve que un request con parametros de formulario fue hecho y para mostrarte los resultados correctamente necesita volver a enviar esos parametros.

No se porque implementaron la busqueda de esa manera pero usualmente las busquedas se envian por URL precisamente para evitar eso.
  #3 (permalink)  
Antiguo 01/10/2011, 07:54
capitank
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: RD Autos tira error al ir hacia atras

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>&nbsp;</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>

Etiquetas: atras, autos, hacia, html, tira
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:05.