0

Hi..
Is it possible to redirect the page with javascript but keep the data alive and can be read or used by the destination page?
I use PHP scripting..

5
Contributors
5
Replies
13
Views
7 Years
Discussion Span
Last Post by Taywin
0

So you have a page that has a form, a second page that redirects to third, and a third page that handles the data?

Why don't you just implement the third page into the second? Or just change the action="" attribute in the form to the third page?

I don't understand why you want to redirect the page...?

You could also do the following (the data is transferred via url):

<script type="text/javascript">
function redirect() {
var somedata = document.form1.somedata.value;
var url = "http://example.com/page.php?somedata=" + somedata;
}
</script>

~G

0

Okay, I'll explain it..
I have a page with a form, when I submit the form, I validate it via jQuery ajaxSubmit. Then when I return it to 'true", the form won't submit itself physically. So, It try to redirect it from javascript. But, it doesn't work well. The page can be redirected but the destination page can't read the data. In the other word, the form can't be submitted when I redirect the page..
So, is it possible to make the data readable by the destination page when I redirect it via javascript?

Thanks,
Sory for my English..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.