CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   I have an issue need a little hand shouldnt be to hard. (http://www.codingforums.com/showthread.php?t=275170)

KoRe 10-04-2012 05:35 PM

I have an issue need a little hand shouldnt be to hard.
 
I have an issue and i need to redirect a link that is not in an iframe, to a location that uses an iframe.

Confusing yes, so let me show you.

Example On that page you will see the block for "Forum statistics" Our newest member and then the persons name which is a link, I need this link to redirect to this page: Iframe

As you can see if the main page link is clicked it will load it up in the same window, i need it to some how redirect to that iframe..

I have to use Iframe because the integration with drupal.

PHP Code:

if (($row['session_viewonline']) || $auth->acl_get('u_viewonline')) {
              if (
$row['user_type'] <> USER_IGNORE) {
                
$user_online_link '<a href="' append_sid("{$phpbb_url}/memberlist.$phpEx"'mode=viewprofile&amp;u=' $row['user_id']) . '"' $user_colour '>' $user_online_link '</a>';
              }
              else {
                
$user_online_link = ($user_colour) ? '<span' $user_colour '>' $user_online_link '</span>' $user_online_link;
              }

              
$online_userlist .= ($online_userlist != '') ? ', ' $user_online_link $user_online_link;
            } 

Any help would be appreciated thx.

Fou-Lu 10-04-2012 07:04 PM

This hasn't a thing to do with PHP. You need to specify a named target in your HTML anchor in order to change an iframe.
So simply modify the anchor tag and add a target to the named iframe.

This is part of the reason why I would suggest not using an iframe.

KoRe 10-05-2012 02:06 AM

if your talking about adding ' target="forumFrame">'

the Id of the iframe to the ending of that code i listed

PHP Code:

$user_online_link '<a href="' append_sid("{$phpbb_url}/memberlist.$phpEx"'mode=viewprofile&amp;u=' $row['user_id']) . '"' $user_colour '>' $user_online_link '</a>' 

I already tried adding an target id, and it wouldn't work, so i came seeking alternatives.


I found an issue with the script im using as its not pathing properly i think i can figure it out without doing in an iframe but thx for helping can close this thread.


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.