mashby
07-17-2002, 04:59 AM
I'm trying to add a simple pop-up window for the member profile page. I've made a good bit of progress, but I'm missing one small element and I'm hoping that the collective brain trust here can help :)
========================
What I Did
========================
Step 1: I added the following code to my postbit:
<a href="JavaScript:PopWindow658827()">$post[username]</a>
Step 2: Then I placed the following code in the headerinclude template:
<script language="JavaScript" type="text/javascript">
<!--
function PopWindow658827()
{
window.open('member.php?s=&action=getinfo&userid=$popup', 'popup658827', etc...);
}
//-->
</script>
Step 3:Lastly, I added the following code mistakenly in my phpinclude template
$popup=$bbuserinfo[userid];
========================
How Can I Fix It?
========================
As you can probably tell, the last bit of code actually calls the logged in user's id and not the userid of the post. The original postbit_profile has $ post[userid] for the query. How can I get $ post[userid] in the header?
To say it another way, how can I get this URL to function properly in the header?
<a href="member.php?s=&action=getinfo&userid=$ post[userid]</a>
========================
What I Did
========================
Step 1: I added the following code to my postbit:
<a href="JavaScript:PopWindow658827()">$post[username]</a>
Step 2: Then I placed the following code in the headerinclude template:
<script language="JavaScript" type="text/javascript">
<!--
function PopWindow658827()
{
window.open('member.php?s=&action=getinfo&userid=$popup', 'popup658827', etc...);
}
//-->
</script>
Step 3:Lastly, I added the following code mistakenly in my phpinclude template
$popup=$bbuserinfo[userid];
========================
How Can I Fix It?
========================
As you can probably tell, the last bit of code actually calls the logged in user's id and not the userid of the post. The original postbit_profile has $ post[userid] for the query. How can I get $ post[userid] in the header?
To say it another way, how can I get this URL to function properly in the header?
<a href="member.php?s=&action=getinfo&userid=$ post[userid]</a>