Ruby on Rails javascript getting truncated
Ruby on Rails javascript getting truncated
我在视图中有这个javascript片段
<script type="text/javascript">
function save_RefMD(apt_id,refmd_id) {
//get the value of the text box
cb = document.getElementById("selectall");
if(cb == null){
document.location.href ='/apts/save_refmd?id='+apt_id+'&refmd_id='+refmd_id;
} else {
document.location.href ='/apts/save_refmd?id='+apt_id+'&refmd_id='+refmd_id+'&all='+cb.checked;
}
}
</script>
当我运行本地rails服务器并查看该视图的页面源时。这完全一样。但当我在将源部署到Web服务器后查看它时,它看起来像这个
<script type="text/javascript">
function save_RefMD(apt_id,refmd_id) {
//get the value of the text box
cb = document.getElementById("selectall");
document.location.href ='/apts/save_refmd?id='+apt_id+'&refmd_id='+refmd_id+'&all='+cb.checked;
}
</script>
完全去掉了我的if…else。有人知道发生了什么吗?
是的,只是部署了旧代码。其他人负责部署,我被告知我的东西成功了。假设,假设。抱歉打扰了。
相关文章:
- 试图打印/调用/或提醒数组中的对象:Getting Undefined
- getting id from jsp
- Ruby on Rails javascript getting truncated
- Getting TypeError:$(..).datetimepicker不是函数
- Angularjs app.js getting URL
- Getting a Maximum call stack size exceeded error,但不确定原因
- 如果选择了某个项目,将显示Getting复选框
- Getting无法读取属性'x'的null与谷歌图表LineChart
- Ajax and Google Places API getting json
- getting confused with firebase,angular, node js
- jQuery $.ajax post getting referer url for error debugging
- Parse.com: getting UserCannotBeAlteredWithoutSessionError
- Getting Object.prototype.hasOwnProperty() key
- Getting TypeError:$.ajax(..).done不是函数[ajax,Jquery]
- Getting TypeError:无效'在'使用ajax获取数据时的操作数obj
- NodeJS和MySQL第一次查询后出现Getting 500错误
- getting int from User Javascript
- Getting started with Node.js and JavaScript
- Getting 500:从javascript发送http请求时,来自Web服务器的响应出现内部服务器错误
- document.createElement() getting ignored