crazysaint Posted May 9, 2007 Share Posted May 9, 2007 hi, i have the following hyperlink but i want it to open a pop up window. am still new to php and any help is welcome <?php Spacer(); ?> <TR><td align=center><img <?php echo createComIcon($root_path,'qkvw.gif','0','',FALSE) ?>></td> <TD vAlign=top ><FONT face="Verdana,Helvetica,Arial" size=2> <nobr> <a href="show_encounter_list.php<?php echo URL_APPEND ?>&pid=<?php echo $pid ?>&target=<?php echo $target ?>"><?php echo $LDListEncounters ?></a> </nobr> </FONT></TD> </TR> Quote Link to comment https://forums.phpfreaks.com/topic/50632-pop-up-window/ Share on other sites More sharing options...
ToonMariner Posted May 9, 2007 Share Posted May 9, 2007 <a href="show_encounter_list.php<?php echo URL_APPEND ?>&pid=<?php echo $pid ?>" target="<?php echo $target ?>"><?php echo $LDListEncounters ?></a> this is if you are using a dtd that has target= as a valid attribute for the a tag OR (and preference) you can use a standards compliant code... <a href="show_encounter_list.php<?php echo URL_APPEND ?>&pid=<?php echo $pid ?>" onclick="window.open(this.href);" onkeypress="window.open(this.href);"><?php echo $LDListEncounters ?></a> Quote Link to comment https://forums.phpfreaks.com/topic/50632-pop-up-window/#findComment-248876 Share on other sites More sharing options...
MadTechie Posted May 9, 2007 Share Posted May 9, 2007 <a href="show_encounter_list.php<?php echo URL_APPEND ?>&pid=<?php echo $pid ?>&target=<?php echo $target ?>"><?php echo $LDListEncounters ? target='_blank'></a> EDIT: ToonMariner is a better (more compleate reply) Quote Link to comment https://forums.phpfreaks.com/topic/50632-pop-up-window/#findComment-248877 Share on other sites More sharing options...
crazysaint Posted May 9, 2007 Author Share Posted May 9, 2007 thanks guys for the help, i have used toomariners option and it has worked but now the problem is that even the previous page is also being redirected, how can i work on this? Quote Link to comment https://forums.phpfreaks.com/topic/50632-pop-up-window/#findComment-248900 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.