tags:

views:

22

answers:

1

I have this code:

function submitTwice(f){ 
  f.action = 'http://mydomain.com/threevideopage.php'; 
  f.target='name'; 
  f.submit(); 
 }

I left out the form code. What it does is display the name of the visitor after submission. It works great. But I would like to open it in the current tab, not on another tab. How would I do it?

If possible only provide suggestions/tips in pure javascript, not jQuery..

Thanks!

+1  A: 

Change it to be

function submitTwice(f){ 
  f.action = 'http://mydomain.com/threevideopage.php'; 
  f.target='_self'; 
  f.submit(); 
 }

Using _self will make it open on the same tab

Marcos Placona