|
|
|
สอบถามเรื่องการใช้ Editer ใน Ajax หน่อยครับผม จนปัญหาแล้วคร๊าบบ -*- |
|
|
|
|
|
|
|
Code (PHP)
<? error_reporting(0); session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="admin/module/editor/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
file_browser_callback : "ajaxfilemanager",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js"
});
function ajaxfilemanager(field_name, url, type, win) {
var ajaxfilemanagerurl = "admin/module/editor/jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
var view = 'detail';
switch (type) {
case "image":
view = 'thumbnail';
break;
case "media":
break;
case "flash":
break;
case "file":
break;
default:
return false;
}
tinyMCE.activeEditor.windowManager.open({
url: "admin/module/editor/jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php?view=" + view,
width: 782,
height: 440,
inline : "yes",
close_previous : "no"
},{
window : win,
input : field_name
});
}
</script>
<script language="javascript" src="admin/ajax/httpRequest.js"></script>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<title>Ajax E-commerce</title>
</head>
<body <? if($_SESSION['onload']==""){ $onload='main.php';}else{ $onload=$_SESSION['onload']; }?> onload="onpage('<?=$onload?>');" >
<div id="divstyle">
<div id="divlogo"></div>
<div id="divbanner"></div>
<div id="divbannerflash">
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="746" height="160">
<param name="movie" value="admin/image/banner/flashbanner.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="admin/image/banner/flashbanner.swf" width="746" height="160">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<div id="divquickcart">
<table width="185" height="56" border="0">
<tr>
<td width="129"><div class="fontw"><b>ตระกร้าสินค้า</b></div></td>
<td width="46"></td>
</tr>
<tr>
<td><div class="fontw">ราคาทั้งสิ้น:1,200บาท</div></td>
<td> </td>
</tr>
</table>
</div>
<div id="divmenu">
<table width="190" height="277" cellpadding="2">
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('main.php');"> • หน้าหลัก</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('news.php');"> • ข่าวและกิจกรรม</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('new.php');"> • สินค้าใหม่</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('promotion.php');"> • สินค้าโปรโมชั่น</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('product.php');"> • สินค้าทั้งหมด</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('category.php');"> • หมวดหมู่สินค้า</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('member.php');"> • สมัครสมาชิก</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('forum.php');"> • กระทู้สอบถาม</a></div></td>
</tr>
<tr class="btn_menu">
<td><div class="fontobject"><a href="#" onclick="onpage('contact.php');"> • ติดต่อเรา</a></div></td>
</tr>
</table>
</div>
<div id="divdetail">
<span id="detailSpan"></span>
<div id="divloading"></div>
</div>
</div>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
</body>
</html>
คิดผมใส่เข้าไปแล้ว พอ onloadpage กระทู้สอบถาม แล้ว มันไม่ขึ้นให้ครับ ไม่รู้จะแก้ยังไง
แต่พอเข้า forum.php โดยตรง editer ก็ขึ้นให้ตามปกติครับ
Tag : PHP, HTML/CSS, JavaScript, Ajax, jQuery
|
|
|
|
|
|
Date :
2012-07-20 11:31:03 |
By :
Ex-[S]i[L]e[N]t |
View :
1179 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Capture หน้าจอมาให้ดูหน่อยครับ
|
|
|
|
|
Date :
2012-07-21 21:19:18 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อันนี้เป็นหน้าจา ที่ทำการโหลดหน้า webpage มาครับ
รูปที่ 2 เข้าหน้า webpage โดยตรง
ขอบคุณมากๆครับ T-T
|
|
|
|
|
Date :
2012-07-23 09:53:48 |
By :
Ex-[S]i[L]e[N]t |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ดันด้วยคนครับ เจอปัญหานี้เหมือนกัน คือเรียกผ่านหน้าธรรมาได้ แต่พอเรียกผ่าน ajax กลับเป็นหน้าว่างๆ มีแต่ textarea ธรรมดา
|
|
|
|
|
Date :
2013-06-09 23:32:27 |
By :
marhao |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|