скрипт фрейма
Вложений: 1
есть интересный скрипт фрейма, он выводит как бы новое окно и загружает там сайт. Проблема в том, что у меня сайт на аджаксе и jquery, и один из файлов отвечающих за фрейм просто напросто рушит весь сайт, как я не пытался и не извращался с ним, а итог один.
можно ли как то ограничить работу скипта только в определённом куске кода или заставить динамически по клику работать, не подгружаясь заранее?) вот сам виновник торжества https://docs.google.com/open?id=0B1N...Xp1YklYMXp4Zzg (загрузил на гугл диск, ибо весит под 100 кб) что посоветуете, может есть какие другие решения на мой счёт? (пхп инклуд не работает как надо) вот сам скрипт <script type="text/javascript" src="prototype.js"> </script> <script type="text/javascript" src="effects.js"> </script> <script type="text/javascript" src="window.js"> </script> <script type="text/javascript" src="debug.js"> </script> <link href="../themes/default.css" rel="stylesheet" type="text/css" > </link> <br><br> <script> var index= 0; var contentWin = null; // Debug window showDebug(); // Windows with an URL as content win2 = new Window('dialog2', {title: "Блог", bottom:0, left:10, width:800, height:600, resizable: true, url: "http://сайт", showEffectOptions: {duration:3}}) win2.show(); win2.setDestroyOnClose(); function openConfirmDialog() { Dialog.confirm("Test of confirm panel, check out debug window after closing it<br>Test select for IE <SELECT NAME='partnumber'><OPTION VALUE='1'> One<OPTION VALUE='2'> Two<OPTION VALUE='3'> Three<OPTION VALUE='5'> Five<OPTION VALUE='4'> Oooopppppppps I forgot four</SELECT>", {windowParameters: {width:300, height:100}, okLabel: "close", cancel:function(win) {debug("cancel confirm panel")}, ok:function(win) {debug("validate confirm panel"); return true} }); } function openAlertDialog() { Dialog.alert("Test of alert panel, check out debug window after closing it", {windowParameters: {width:300, height:100}, okLabel: "close", ok:function(win) {debug("validate alert panel"); return true} }); } var timeout; function openInfoDialog() { Dialog.info("Test of info panel, it will close <br>in 3s ...", {windowParameters: {className: "alert_lite",width:250, height:100}, showProgress: true}); // timeout=3; // setTimeout("infoTimeout()", 1000) Dialog.closeInfo() } function infoTimeout() { timeout--; if (timeout >0) { Dialog.setInfoMessage("Test of info panel, it will close <br>in " + timeout + "s ...") setTimeout("infoTimeout()", 1000) } else Dialog.closeInfo() } function openModalDialog() { debug($('modal_window_content')) var win = new Window('modal_window', {className: "dialog", title: "Ruby on Rails",top:100, left:100, width:300, height:200, zIndex:150, opacity:1, resizable: true}) //win.getContent().innerHTML = "Hi" win.setContent("select") win.setDestroyOnClose(); win.show(true); } function openContentWindow() { if (contentWin != null) { Dialog.alert("Close the window 'Test' before opening it again!", {windowParameters:{ width:200, height:130}}); } else { contentWin = new Window('content_win', {className: "darkX", resizable: false, hideEffect:Element.hide, showEffect:Element.show}) contentWin.setContent('test_content', true, true) contentWin.toFront(); contentWin.setDestroyOnClose(); contentWin.show(); } } // Sample code to see how to implement a closeCallback function canClose(win) { debug("You cannot close " + win.getId()); // return false, the window cannot be closed return false; } // Set up a deleagte for win2 (the one with rubyonrails.org in it) win2.setCloseCallback(canClose); date=new Date(); date.setMonth(date.getMonth()+3); win2.setCookie("test", date); // Set up a windows observer, check ou debug window to get messages var myObserver = { onStartMove: function(eventName, win) { debug(eventName + " on " + win.getId()) }, onEndMove: function(eventName, win) { debug(eventName + " on " + win.getId()) }, onStartResize: function(eventName, win) { debug(eventName + " on " + win.getId()) }, onEndResize: function(eventName, win) { debug(eventName + " on " + win.getId()) }, onClose: function(eventName, win) { debug(eventName + " on " + win.getId()) }, onDestroy: function(eventName, win) { if (win == contentWin) { $('container').appendChild($('test_content')); contentWin = null; } debug(eventName + " on " + win.getId()) } } Windows.addObserver(myObserver); </script> |
up
вышел из положения с помощью другого файла, схожим с моим что на сайте |
Часовой пояс GMT +3, время: 23:36. |