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..

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

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..

Member Avatar

you kan subit the form manually width javascript : document.forms["myform"].submit();

Hmm... Necro post...