|
 |
|
ผมใช้ JavaScript:doCallAjax เรียกมาโชว์ใหน้าเว็บแล้วไม่โชว์ภาพครับ |
|
 |
|
|
 |
 |
|
พอเรียกมาโชว์อีกหน้านึงรูปไม่ขึ้นอ่ะครับ รบกวนช่วยด้วยครับ

Code (PHP)
<script language="JavaScript">
var HttPRequest = false;
function doCallAjax(url) {
HttPRequest = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
HttPRequest = new XMLHttpRequest();
if (HttPRequest.overrideMimeType) {
HttPRequest.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
HttPRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
HttPRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!HttPRequest) {
alert('Cannot create XMLHTTP instance');
return false;
}
var pmeters = "ddd";
HttPRequest.open('POST',url,true);
HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
HttPRequest.setRequestHeader("Content-length", pmeters.length);
HttPRequest.setRequestHeader("Connection", "close");
HttPRequest.send(pmeters);
HttPRequest.onreadystatechange = function()
{
if(HttPRequest.readyState == 3) // Loading Request
{
document.getElementById("mySpan").innerHTML = "Now is Loading...";
}
if(HttPRequest.readyState == 4) // Return Request
{
document.getElementById('mySpan').innerHTML = HttPRequest.responseText;
}
if(HttPRequest.readyState == 5) // Loading Request
{
document.getElementById("mySpan").innerHTML = "Now is Loading...";
}
}
}
</script>
Code (PHP)
<a href="JavaScript:doCallAjax('webpage/aboutschool/symbol.php');">
Tag : PHP, HTML/CSS, JavaScript, Ajax

|
|
 |
 |
 |
 |
Date :
2013-11-19 22:53:52 |
By :
eos7d |
View :
1248 |
Reply :
8 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ชื่อไฟล์ภาพถูกต้องหรือเปล่าครับ
|
 |
 |
 |
 |
Date :
2013-11-19 23:09:59 |
By :
nprawit |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คือผมดึงอีกหน้านึงมาโชว์นะครับ ถ้าเปิดหน้านั้นโดยตรงภาพขึ้นครับ แต่พอดึงมาโชว์ในหน้านี้มันไม่ขึ้นนะครับ
|
 |
 |
 |
 |
Date :
2013-11-20 18:46:47 |
By :
eos7d |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คลิกขวาที่รูปแล้วเลือก Copy link แล้วเอาไปวาง ว่าpath มันตรงกับที่คุณบอกว่าเข้าตรง ๆ ขึ้น แต่โชว์ไม่ขึ้นหรือเปล่าครับ
|
 |
 |
 |
 |
Date :
2013-11-20 19:00:49 |
By :
telesyn |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คือผมสร้างหน้าไว้ 2 หน้า
-หน้ารูป
-หน้าที่เอามาโชว์
ถ้าเปิดหน้าเพจรูปโดยตรงภาพขึ้นครับ แต่พอเรียกมาโชว์ในอีกหน้านึง ไม่โชว์ครับ ขึ้นแค่ข้อความแต่ภาพ / flash ไม่ขึ้นครับ
|
 |
 |
 |
 |
Date :
2013-11-21 09:04:55 |
By :
eos7d |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เวลาคิวรี่ข้อมูลออกมาเป็นรุปภาพ มันมีค่ามาจริงไหมล่ะ path ของไฟล์ตรงไหมมีจริงไหม
คุณต้องลองเช็คดูอีกที ลองทำหรือยังครับ
มาตอบกี่ครั้ง ๆ ก็เหมือนเดิม
คุณติดปัญหา ไม่โพสต์ code ก็ไม่ผิด
แต่คุณลองไปทำอะไร แก้ยังไงบ้างแล้ว คุณก็ต้องบอก
เหมือนไปหาหมอ หมอถามเป็นอะไร คุณก็ตอบแต่คำว่า ไม่สบาย
หมอถามอีก คุณก็ตอบอีกว่าไม่สบาย
เปลี่ยนวิธ๊ตอบ บ้างนะครับ
|
 |
 |
 |
 |
Date :
2013-11-21 09:23:36 |
By :
telesyn |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Path ต้องยึดหน้าที่เรียกเป็นหลัก ไม่ใช่หน้าที่ถูกเรียนเพราะ ข้อมูลมันจะมาแสดงที่หน้าหลัก
|
 |
 |
 |
 |
Date :
2013-11-21 09:37:05 |
By :
Krungsri |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เห็นม่ะ ทุกคนก็แนะนำเรื่อง path ไฟล์ ทั้งนั้น ไปคิดดีดี เช็คดีดี ถ้าไม่ได้ต้องมาลุย code แล้วล่ะ
|
 |
 |
 |
 |
Date :
2013-11-21 10:09:22 |
By :
telesyn |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|