ShaolinF Posted July 30, 2007 Share Posted July 30, 2007 Hi Guys, I send php emails to myself and when click on the link it opens a new windows. Is there anyway I can force the link to opened in the current window its in ? Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/ Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 lets see your code its probally a browser preference more then a code you could alwasys use target=_self Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311035 Share on other sites More sharing options...
ShaolinF Posted July 30, 2007 Author Share Posted July 30, 2007 Here you go: <?php $to = "Username <[email protected]>"; $subject = "Thank you for your email"; $headers = "From: Sender <[email protected]>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "Reply-To: Sender <[email protected]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSmail-Priority: High\n"; $headers .= "X-mailer: My mailer"; $message .= '<a href="http://www.google.com">http://www.google.com</a>'; mail ($to, $subject, $message, $headers) ?> Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311050 Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 what is opening in a new window? exactly? Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311053 Share on other sites More sharing options...
ShaolinF Posted July 30, 2007 Author Share Posted July 30, 2007 This: $message .= '<a href="http://www.google.com">http://www.google.com</a>'; I think its standard in most email clients to open links in new windows. I just want a way to open the link in the same window. Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311057 Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 ohh your saying when u recive the email on your hotmail you want the link u sent to your self to be opened in the hotmail window! gotcha try makeing the link $message .= '<a href="http://www.google.com" target="_self">http://www.google.com</a>'; Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311067 Share on other sites More sharing options...
ShaolinF Posted July 30, 2007 Author Share Posted July 30, 2007 Nope, that didn't work. Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311082 Share on other sites More sharing options...
soycharliente Posted July 30, 2007 Share Posted July 30, 2007 _parent ? Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311134 Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 yah you can try _parent but i think it might be something within hotmail so you dont navigate away from them $message .= '<a href="http://www.google.com" target="_parent">http://www.google.com</a>'; Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311228 Share on other sites More sharing options...
ShaolinF Posted July 31, 2007 Author Share Posted July 31, 2007 That didnt work either. Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311828 Share on other sites More sharing options...
soycharliente Posted July 31, 2007 Share Posted July 31, 2007 Your e-mail client is probably forcing a new window. There's most likely nothing you can do about it. From an IA perspective, it's annoying to click a link and have the page redirect. I'd be upset if I wasn't done reading my mail, clicked a link, and lost my inbox. Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.