have done a little more on this and again more questions - if you are still having issues with the redirect try this javascript code:
[PHP]function confirm_but()
{
if (confirm('Are you sure'))
{
alert('running redirect');
window.location ='http://your/target/dir/file.php';
alert('after redirect');
}
}[/PHP]
fire with an onclick on the submit - if it fixes the problem great, if not, watch the bottom address bar as the 2nd alert is run.. is that showing the correct url for the redirect ?
You are sending the variable via a URL[HTML] index.php?model id=1' [/HTML] If you want to read this in index.php you need [PHP]$var = $_GET['modelid'];[/PHP]
Then [PHP]echo $var;[/PHP] should print 1
Hi Code Green - I am not convinced that is his problem
I have recreated and the redirect appears not to work - I think he has the form set to refresh itself on submit so the javascript redirect is being followed by the form refresh
Try the javascript function I posted and it ilustrates the problem better - I obviously caveat that with I have only tried it on IE7 :)
Comment