
October 25th, 2012, 02:32 PM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 1
Time spent in forums: 19 m
Reputation Power: 0
|
|
|
Open page in the same window
Hi,
I need to open a new page in the same window when clicked on submit button. Below is my function code.
With window.open(), i can open the page in a new window.
I tried window.open("xxx.jsp",_self) and window.location.href = "xxx.jsp" but can't open the new xxx.jsp page.
can some one help me how to open it in the same page.
function check(form)
{
if(form.username.value == "" || form.password.value == "")
{
alert("xxxxx")
}
else if(form.username.value == "xxx" && form.password.value == "xxx")
{
window.open("xxx.jsp")
//window.location.href = "xxx.jsp"
}
else
{
alert("xxx")
}
}
|