1
选择下拉选项&后不工作后,如果我们点击“见案例”,我们要使用选定的选项作为名称重定向到特定的URL。
我们正在做一些AJAX代码。当我们点击按钮时,它会显示合适的型号和品牌ID,但它不会重定向到正确的URL。
我们要像here
PHP
<a href="#" onclick="geturlandredirec()"><span class ="cc5"> See Cases > </span> </a>
脚本
<script>
function geturlandredirec()
{
var brand=$('brand_select').value;
var model=$('model_select').value;
array = [brand, model];
alert(array)
url="<?php echo Mage::getbaseUrl()?>customized-mobile-cases/customcase/ajax";
new Ajax.Request(url, {
method: 'POST',
onFailure: function(response){
},
parameters: {
brand: brand, model: model
},
onSuccess: function(response)
{
window.location = response.responseText
return ;
}
});
}
</script>
好的,该如何解决? – fresher
正确的方法将正确的URL你试图发送信息。 目前它是http://sbdev2.kidsdial.com/customized-mobile-cases/customcase/ajax 它应该是什么网址? – BorysekOndrej
我们想重定向到这个网址:[链接](http://sbdev2.kidsdial.com/customized-mobile-cases/customcase/) – fresher