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

Jump to new page based on form data

Jump to new page based on form data

Postby jmlynn on Thu Dec 09, 2010 10:50 pm

Hi,

I need to jump to different pages based on user input in current form. I had tried using javascript to jump, it worked for a second or two, then it jump back to the calling form. Here are the methods I used:

url is the intented url, e.g. "form2.htm"

1. from form "form1":
document.forms["form1"].action = url;
document.forms["form1"].submit();

2. document.forms[0].action = url;

3. window.locaton = url;

4. window.location.href = url;

All works, except that it didn't stay, it jumped back to form1 immediately.

I need to finish a project by the end of Christmas, any help will greatly appreciated!

Jeff
jmlynn
 
Posts: 1
Joined: Thu Dec 09, 2010 10:42 pm

Re: Jump to new page based on form data

Postby paolo1 on Sun Dec 12, 2010 1:00 pm

Can you post your whole javascript code? Because I can't figure out why it jumps back.
paolo1
 
Posts: 12
Joined: Fri Dec 10, 2010 11:30 am


Who is online

Users browsing this forum: No registered users and 5 guests