1
아래에는 사용자가 정보를 비교할 수 있도록 응용 프로그램에서 div의 팝업보기를 만드는 "버튼"(아이콘이있는 스팬)이 있습니다. 별도의 창문.Asp.Net MVC4의 Javascript/Jquery 팝업 윈도우
그러나, 나는 얻을 Asp.Net 오류는 다음과 같이 '/'응용 프로그램에
* * 서버 오류.
리소스를 찾을 수 없습니다. 요청한 URL :/집/[object Object] **
왜 이런 일이 발생했는지 아이디어가 있습니까?
<div class="module_actions">
<div class="actions">
<span class="icon-expand2 pop-out"></span>
</div>
</div>
<script>
$(document).ajaxSuccess(function() {
var Clone =
$(".pop-out").click(function() {
$(this).parents(".module").clone().appendTo("#NewWindow");
});
$(".pop-out").click(function popitup(url) {
LeftPosition = (screen.width) ? (screen.width - 400)/1 : 0;
TopPosition = (screen.height) ? (screen.height - 700)/1 : 0;
var sheight = (screen.height) * 0.5;
var swidth = (screen.width) * 0.5;
settings = 'height=' + sheight + ',width=' + swidth + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,resizable=yes,toolbar=no,status=no,menu=no, directories=no,titlebar=no,location=no,addressbar=no'
newwindow = window.open(url, '/Index', settings);
if (window.focus) { newwindow.focus() }
return false;
});
});
이
','를 +로 바꾸면 라인 window.open에서 무엇을 얻을 수 있습니까? –
url + "Index"+ 설정을 추가하는 경우 요청한 URL :/홈/[object 객체]/Indexheight = 540, width = 960, top = 380, left = 1520, scrollbars = yes, resizable = yes, URL = "Index"를 추가하면 /Home/[object Object]/Index – Mark
으로 설정하면됩니다. 위의 코드는 윈도우의 제목을 '/ Index'로 설정합니다. 제목에 대해 원하는 내용을 가정합니다 ... url에 추가해야한다고 가정하면 + 거기에 넣어야합니다. 그러나 ... 당신은 여전히 자바 스크립트 개체 대신 유효한 URL을 연결하는 URL을 수정해야합니다. – Kevin