朋友们!我正在创建一个具有响应行为的应用程序。我的基本目标是在移动浏览器中打开应用程序。获取“组织ID”后,我将重定向到“enter_mobileno.html文件”。它可以正常使用某些设备(如桌面浏览器,平板电脑(使用HCL平板电脑)和HTC等手机)但它不起作用对于三星,micromax手机浏览器..它的打印“错误Plz再试一次”。请帮我.. 代码是:
<script type="text/javascript">
//$(document).ready(function() {
//alert($.session.get('org_id'));
$("#ok").click(function(){
var org_id = $("#org_id").val();
if(org_id == '')
{
alert("Please enter the organization id");
$("#ok").focus();
exit();
}
else
{
var Organization = StackMob.Model.extend({ schemaName: 'organization' });
var organization = new Organization({ organization_id: org_id });
organization.fetch({
success: function(model, result, options) {
console.debug(model.toJSON());
var array = model.toJSON();
var org_id = $("#org_id").val();
var login_points = array.login_points;
//alert(org_id);
localStorage.setItem("org_id",org_id);
localStorage.setItem("login_points",login_points);
//var org_id = localStorage.getItem("org_id");
//var login_points = localStorage.getItem("login_points");
window.open("enter_mobile_no.html","_top");
}, //end success
error: function(model, result, options) {
alert("Error Plz try again");
//window.open("karna_home.html","_top");
} //end error
}); //end fetch organization id
} //end else
}); //end click ok button
//});
</script>