Hi there, I created few step order form. I use function below to move to the next step of order, but at the same time when customer press button it shoudl called function: onClick="takeDetalis(0)" in js sheet and take personal detalis. But because (0) is treated as error.

<script type="text/javascript">
<!--
function takeOrder(num) {
var url=new Array();
url[0]="confirm.html";

window.location=url[num];
}
// -->
</script>

So any idea how to take detalis and automatically move order to the next stage (page) ??

Functions can call other functions, so you might want something like this:

function takeOrder(num) {
  var url=new Array();
  url[0]="confirm.html";
  var details = takeDetalis(num);//pass num in case takeDetails() needs it
  if(details){
    window.location = url[num] + '?' + details;
  }
}

Where takeDetalis() is a function that displays a dialog and returns:

  • a url-encoded query string representing the user's data,
  • false if the user cancels

Airshow