|
 |
|
ดูโค้ด POPUP ให้หน่อยเถอะครับ ถ้าแก้ส่วนนี้ได้ งานฉลุยแล้วออกมาสวยเลยหละครับ ติดตัวนี้เอง |
|
 |
|
|
 |
 |
|
ผมได้โค้ด Popup มาครับ แล้วอยากจะใช้ร่วมกับโค้ด PHP เอาให้ดูเลยละกันนะครับ
เป็นส่วนที่กดแล้วจะลิงค์ขึ้นหน้าต่าง Popup มาใหม่ครับ
ของเดิมที่ได้มา
Code (PHP)
<a href="javascript:NewWindow('http://www.twebmaster.com','acepopup','640','480','custom','front');">LinkText</a>
ของที่ผมเอามาปรับปรุงแล้วมันทำไม่ได้ ไม่รู้ว่าติดตรงไหนนะครับ
Code (PHP)
<a href="javascript:NewWindow('print_prd_mont.php?ym_date=<? echo $ym_date; ?>','acepopup','640','480','custom','front');"> Link Popup </a>
และนี้เป็นส่วนที่ เมื่อเรากดลิงค์มาแล้วจะ ทำงานในส่วนของ หน้าใหม่ที่เป็น Popup ครับ
Code (PHP)
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}
// -->
</script>
ไม่รู้ว่าส่วนไหนที่ผมใช้ผิดไปรึป่าว ดูช่วยแนะนำหน่อยนะครับ ขอบคุณมากครับ
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-12-27 21:33:56 |
By :
nerobenz |
View :
1495 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันก็ใช้ได้ปกตินี่ครับ
ไม่ทราบว่าติดตรงไหน คลิกแล้วไม่มี popup ขึ้น หรือว่าไงครับ
|
 |
 |
 |
 |
Date :
2009-12-28 13:37:46 |
By :
ICrazyMan |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|