NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Conditional "target=_blank" ?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
2 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 08-27-2005, 08:59 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Feb 2005
Posts: 345
dabb is on a distinguished road
 



Conditional "target=_blank" ?


I have a form and 90% of the time I want the results to pop up in a new browser window. However, sometimes under certain circumstances I want the results to go ahead and appear in the current window instead of opening a new browser window. Is there any way to implement this sort of conditional browser window control in the forms action PHP file?

Thanks!
dabb is offline  
Old 08-27-2005, 09:19 AM   #2 (permalink)
jon
Senior Member
Join Date: Aug 2004
Location: uk
Posts: 1,378
jon has much to be proud ofjon has much to be proud ofjon has much to be proud ofjon has much to be proud ofjon has much to be proud ofjon has much to be proud ofjon has much to be proud ofjon has much to be proud ofjon has much to be proud of
 



I am not sure how easy this would be to implement into your script, but something like this would work.

PHP Code:
<?php if ($value == true): ?>

<a href="link.html" target="_blank">link</a>

<?php else: ?>

<a href="link.html">link</a>

<? php endif; ?>
Hope that helps.
jon is offline  
Old 08-27-2005, 09:57 AM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Feb 2005
Posts: 345
dabb is on a distinguished road
 



The problem is that it is form results that I either want to show in a new window (ie: show a page from another website in a new window leaving the form on my site in the original window), or redisplay the form in the same window with an error message if bogus parameters are entered.

So I need to make this decision on the fly from the forms action script.
dabb is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Introduction to Programming - Vocab Rudy Webmaster Tutorials 1 08-23-2005 06:08 PM
JavaScript: Conditional Firefox CSS Albatross Programming 0 06-21-2005 08:45 PM

 
All times are GMT -7. The time now is 12:12 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger