eldredm Posted April 12, 2006 Share Posted April 12, 2006 Hi there Newbie with php, I have managed to create hyperlink from my resultset and diplayed it on my page, however, because I am working with frames, how do I get target=mainFrame embedded in my hyperlink. This is my sample code: echo "<tr>\n\t<td bgcolor=\"white\">" . "<b><font color=\"black\">" . $row["date"] . "<a href=\"viewContents.php?newID=" . $row["new_id"] ."\">View</a>" ;where in the syntax do I place : target=mainFrame Hope someone can help ?Thanks Quote Link to comment https://forums.phpfreaks.com/topic/7188-embedded-hyperlinks-in-php/ Share on other sites More sharing options...
Yesideez Posted April 12, 2006 Share Posted April 12, 2006 [code]echo "<tr>\n\t<td bgcolor=\"white\">" . "<b><font color=\"black\">" . $row["date"] . "<a href=\"viewContents.php?newID=" . $row["new_id"] ."\" target=\"framenamehere\">View</a>";[/code] Quote Link to comment https://forums.phpfreaks.com/topic/7188-embedded-hyperlinks-in-php/#findComment-26151 Share on other sites More sharing options...
wildteen88 Posted April 12, 2006 Share Posted April 12, 2006 Make sure you have given your frame a name then use the target attribute in your anchor tag. like so:[code]"<a href=\"viewContents.php?newID=" .$row["new_id"] ."\" target=\"frameNameHere\">View</a>";[/code]Change [b]frameNameHere[/b] to the actual name of your frame. Quote Link to comment https://forums.phpfreaks.com/topic/7188-embedded-hyperlinks-in-php/#findComment-26152 Share on other sites More sharing options...
eldredm Posted April 12, 2006 Author Share Posted April 12, 2006 Thankyou :) Hyperlink loads the page in the mainframe. Thanyou:) Mainframe page loads Quote Link to comment https://forums.phpfreaks.com/topic/7188-embedded-hyperlinks-in-php/#findComment-26355 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.