作者nconqd ('ﳿﰠ NN )
看板Ajax
标题[问题] 视窗的使用...
时间Sat Jul 7 19:11:00 2007
我有个问题想请教各位...
我有一个网页程式(a.php),如下
<?php
require('../config.php' );
require('../function.php' );
?>
<div align="center">
<table border="0" width="95%">
<tr>
<td height="100">logo</td>
</tr>
<tr>
<td>
<table border="0" width="80%" align="center">
<tr>
<td align="center"><?php
include('component/assert_user_profile/assert_user_profile.php');?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><div id='user_data'></div></td>
</tr>
<?php
if($_GET[action]==assert_user_profile){
echo '<script language=JavaScript
src=component/assert_user_profile_ajax.js></script>';
$UserData = 'user_data';
$UserDataSource
='component/assert_user_profile/assert_user_profile_ajax_exec.php?to_user_no='.$_GET[to_user_no].'&AssertUserProfile='.$AssertUserProfile;
echo '<script type=\'text/javascript\'>' ;
echo
'javascript:postData('.'\''.$UserDataSource.'\''.','.'\''.$UserData.'\''.');';
echo '</script>' ;
}else if($_GET[action]==get_other_review){
echo '<script language=JavaScript
src=component/assert_user_profile_ajax.js></script>';
$AssertUserGetOtherReview ='user_data';
$AssertUserGetOtherReviewData
='component/assert_user_get_other_review/assert_user_get_other_review_ajax_exec.php?to_user_no='.$_GET[to_user_no].'&AssertUserGetOtherReview='.$AssertUserGetOtherReview;
echo '<script type=\'text/javascript\'>' ;
echo
'javascript:postData('.'\''.$AssertUserGetOtherReviewData.'\''.','.'\''.
$AssertUserGetOtherReview.'\''.');';
echo '</script>' ;
}
?>
</table>
</div>
<div id='user_get_trust'></div>
<?
echo '<script language=JavaScript src="component/assert.js"></script>';
$AssertUserGetOtherReview ='user_get_trust';
$AssertUserGetOtherReviewData
='component/assert_user_get_other_review/assert_user_get_other_review_ajax_exec.php?to_user_no='.$_GET[to_user_no].'&AssertUserGetOtherReview='.$AssertUserGetOtherReview;
echo '<script type=\'text/javascript\'>' ;
echo
'javascript:postData3('.'\''.$AssertUserGetOtherReviewData.'\''.','.'\''.$AssertUserGetOtherReview.'\''.');';
echo '</script>' ;
?>
其中最後的那几行程式码
<div id='user_get_trust'></div>
<?
echo '<script language=JavaScript src="component/assert.js"></script>';
$AssertUserGetOtherReview ='user_get_trust';
$AssertUserGetOtherReviewData
='component/assert_user_get_other_review/assert_user_get_other_review_ajax_exec.php?to_user_no='.$_GET[to_user_no].'&AssertUserGetOtherReview='.$AssertUserGetOtherReview;
echo '<script type=\'text/javascript\'>' ;
echo
'javascript:postData3('.'\''.$AssertUserGetOtherReviewData.'\''.','.'\''.$AssertUserGetOtherReview.'\''.');';
echo '</script>' ;
?>
如果是放在a.php这一页的话...
他可以正常显示的...
但如果我把他放到component/assert_user_profile/assert_user_profile.php就显示不
出来...
'component/assert_user_profile/assert_user_profile_exec.php'的程式码如下...
<?php
/*require*/
require('../../../config.php' );
require('../../../function.php' );
require('assert_user_profile_ajax.php');
$sql_stmt="select * from shop_user where user_no='".$_GET[to_user_no]."';";
$result=mysql_query($sql_stmt, $link) or die(mysql_error());
$res=mysql_fetch_array($result);
?>
<table border="0" width="80%" align="center" style="border-collapse:
collapse">
<tr bgcolor="#999999">
<td colspan="3">
<div align="center"><?php echo big52unicode($res[user_id].'个人资料
');?></div>
</td>
</tr>
<tr>
<td> </td>
<td></td>
<td></td>
</tr>
<tr>
<td width="20%" rowspan="7" align="center" valign="top">
<table>
<tr>
<td>
<img src="" width="100" height="150">
</td>
</tr>
</table>
</td>
</table>
<p>
我有改了他的路径还是一样没办法...
是因为在div里不能在显示另一个div的内容吗....~"~
请各位帮帮忙噜...
p.s component/assert_user_profile/assert_user_profile.php的资料
会显示在<div id='user_data'></div>里...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.223.10.244