open page in same window using window.open() [Resolved]

Posted by Kavi.Sirius under JavaScript on 2/14/2013 | Points: 10 | Views : 53632 | Status : [Member] | Replies : 2
hi,

i am try to write the code for redirect the page using javascript
like
 window.open('frmEmployee.aspx?Id=' + document.getElementById('LblEmpId').innerText + '&Name=' + document.getElementById('TxtEmpName').value,'_blank');

for open the next page in same window
but it doest work it opened the page in separate window
some one help for these scenario

Thanks in Advance.......

Regards
Kavi.n



Responses

Posted by: Durgammahesh22 on: 2/14/2013 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi,

Try one of the following methods to solve your issue.

[code]

<script type="text/javascript">
window.open ('YourPg.aspx','_self',false)
</script>

or

window.open("www.yourwebaddress.com","_self")

or

window.location.href = newurl;

[/code]

Thanks,
Mahesh

Thanks,
Mahesh

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kavi.Sirius on: 2/15/2013 [Member] Starter | Points: 25

Up
0
Down

Resolved
hi mahesh

window.location.href=newurl;

return false;


this code woking fine
thanks

Regards
Kavi.n

Kavi.Sirius, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response