It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

problem with location.href

problem with location.href

Postby rajkumar001 on Fri May 30, 2008 9:46 am

function callme(form)
{
if(document.forms[0].elements[1].value=="ajax" && document.forms[0].elements[2].value=="ajax")
{
window.location.href = "home.jsp"
//document.location.href="http://localhos:8080/jsp-examples/tech_fb/retrieve1.jsp";
}
else
{
alert("--------");
}
}

I need the above code to check username and password. If they are correct then it goes to home.jsp otherwise it shows an alert box. Here the location.href wont work. Why it happens so? I have also tried window.open..it works. but i need a page to be open by overwrite the existing window and not a new one. How can i do this . Any help regard this would be appreciated...
rajkumar001
 
Posts: 0
Joined: Fri May 30, 2008 9:34 am

Postby rangana on Fri May 30, 2008 10:42 am

Could you show us your markups (HTML) ;)
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 5 guests