Solved

> creating a confirmation screen <

Posted on 2001-09-05
8
582 Views
Last Modified: 2006-11-17
Hi,

I have a form that e-mails the contains a form that when submitted e-mails the results to me. I would like to take the data they submit and show them it on a confirmation screen before it is sent to me though  so that they can change any entries that are incorrect.

Is there a way of taking my code as it is and adding in the confirmation screen easily before the form is submitted to ../cgi-bin/bookingform.pl?

Any help here would be appreciated

Regards

Charlie

my code:

html>

head>
meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
meta http-equiv="Content-Language" content="en-gb">
title>www.idsun.com</title>
link rel="stylesheet" href="styles/idsun.css" type="text/css">
script language="JavaScript">
!--

if (document.images) {
    nav1on  = new Image(); nav1on.src  = "images/menuoptions/help02.gif";
    nav1off = new Image(); nav1off.src = "images/menuoptions/help01.gif";
    nav2on  = new Image(); nav2on.src  = "images/menuoptions/contact02.gif";
    nav2off = new Image(); nav2off.src = "images/menuoptions/contact01.gif";
    nav3on  = new Image(); nav3on.src  = "images/menuoptions/check02.gif";
    nav3off = new Image(); nav3off.src = "images/menuoptions/check01.gif";
    nav4on  = new Image(); nav4on.src  = "images/menuoptions/info02.gif";
    nav4off = new Image(); nav4off.src = "images/menuoptions/info01.gif";
    nav5on  = new Image(); nav5on.src  = "images/algaida/resa2.gif";
    nav5off = new Image(); nav5off.src = "images/algaida/resa.gif";
    nav6on  = new Image(); nav6on.src  = "images/crown/resa2.gif";
    nav6off = new Image(); nav6off.src = "images/crown/resa.gif";
    nav7on  = new Image(); nav7on.src  = "images/aloha/resa2.gif";
    nav7off = new Image(); nav7off.src = "images/aloha/resa.gif";
    nav8on  = new Image(); nav8on.src  = "images/specials/speca.gif";
    nav8off = new Image(); nav8off.src = "images/specials/speca.gif";
    nav9on  = new Image(); nav9on.src  = "images/footerdiscountdown.gif";
    nav9off = new Image(); nav9off.src = "images/footerdiscount.gif";
    nav10on  = new Image(); nav10on.src  = "images/menuoptions/home02.gif";
    nav10off = new Image(); nav10off.src = "images/menuoptions/home01.gif";
}

function rollOn(img1,text){
    window.status = text;
    if (document.images) {
        document.images[img1].src=eval(img1 + "on.src");
    }
}

function rollOff(img1){
    window.status = "";
    if (document.images) {
            document.images[img1].src=eval(img1 + "off.src");
      }
}

//-->
/script>
SCRIPT LANGUAGE="JavaScript">
!-- jump to first form field onload -->
!-- Begin
function toForm() {
document.bookform.title.focus();
// Replace field in the script with the field name of which you want to place the focus.
}
//  End -->
/script>
SCRIPT LANGUAGE="JavaScript">
!--

function validate(frm)
{
var error = "";
var digits = "0123456789";
    //
    // Check the Name fields to see if any characters were entered
    //
    if (frm.firstname.value.length == 0 || frm.surname.value.length == 0)
    {
        error += ("Please let us know your full name\n");
    }
    //
    // Check address details all except country must be filled in
    //
    if (frm.postaladdress.value.length == 0 || frm.county.value.length == 0 || frm.postcode.value.length == 0)
    {
        error += ("Please let us know your full address\n");
    }
    //
    // Check the staff number is 6 characters long
    //
    if (frm.staffno.value.length > 0 && frm.staffno.value.length != 6)
    {
        error += ("Please enter a valid Staff Number\n");
    }
    //
    // Check that one phone number has been entered
    //
    if (frm.homephone.value.length == 0 && frm.mobilephone.value.length == 0)
    {
        error += ("Please let us know one phone number at least\n");
    }
    //
    // Check that Email address has been entered and it is valid
    //
    if (frm.senderaddr.value.length != 0 && frm.senderaddr.value.indexOf("@") == -1)
    {
        error += ("Please enter a valid e-mail address\n");
    }
    if (frm.senderaddr.value.length == 0)
    {
        error += ("Please let us know your e-mail address\n");
    }
    //
    // Check that a resort has been selected
    //
    if (frm.resort.value == " ")
    {
        error += ("Please select a resort\n");
    }
    //
    // Check that a week number has been selected
    //
    if (frm.weeknumber.value == " ")
    {
        error += ("Please select a week number\n");
    }
    //
    // Check that a check in date has been selected
    //
    if (frm.day.value == " ")
    {
        error += ("Please select a check-in day\n");
    }
    //
    // Check that a duration has been selected
    //
    if (frm.duration.value == " ")
    {
        error += ("Please select a duration\n");
    }
    //
    // Check that a credit card type has been selected
    //
    if (frm.credittype.value == " ")
    {
        error += ("Please select a type of credit card\n");
    }
    //
    // Check that a credit card expiry month has been selected
    //
    if (frm.ccardexpiremm.value == " ")
    {
        error += ("Please select the month your credit card expires\n");
    }
    //
    // Check that a credit card expiry year has been selected
    //
    if (frm.ccardexpireyy.value == " ")
    {
        error += ("Please select the year your credit card expires\n");
    }
    //
    // check credit card holders name has been entered
    //
    if (frm.ccardname.value.length == 0 || frm.ccardname.value == "as printed on card")
    {
        error += ("Please let us know the card holders name\n");
    }
    //
    // check the credit card number 1 is present and is a number
    //
    if (frm.ccardno1.value == "" || frm.ccardno2.value == "" || frm.ccardno3.value == "" || frm.ccardno4.value == "")
      {
        error += "Please fill in all your card number\n";
      }
     for (var i = 0; i  frm.ccardno1.value.length; i++)
     {
     temp = frm.ccardno1.value.substring(i, i+1)

      if (digits.indexOf(temp) == -1 && frm.ccardno1.value != "")
      {
        error += "The card number must be a number.\n";
        break;
      }
      if (frm.ccardno1.value.length  4)
      {
        error += "To few digits in the 1st card number field\n";
        break;
      }
    }
    //
    // check the credit card number 2 is a number
    //
     for (var i = 0; i  frm.ccardno2.value.length; i++)
     {
     temp = frm.ccardno2.value.substring(i, i+1)

      if (digits.indexOf(temp) == -1 && frm.ccardno2.value != "")
      {
        error += "The card number must be a number.\n";
        break;
      }
      if (frm.ccardno2.value.length  4)
      {
        error += "To few digits in the 2nd card number field\n";
        break;
      }
    }
    //
    // check the credit card number 3 is a number
    //
     for (var i = 0; i  frm.ccardno3.value.length; i++)
     {
     temp = frm.ccardno3.value.substring(i, i+1)

      if (digits.indexOf(temp) == -1 && frm.ccardno3.value != "")
      {
        error += "The card number must be a number.\n";
        break;
      }
      if (frm.ccardno3.value.length  4)
      {
        error += "To few digits in the 3rd card number field\n";
        break;
      }
    }
    //
    // check the credit card number 4 is a number
    //
     for (var i = 0; i  frm.ccardno4.value.length; i++)
     {
     temp = frm.ccardno4.value.substring(i, i+1)

      if (digits.indexOf(temp) == -1 && frm.ccardno4.value != "")
      {
        error += "The card number must be a number.\n";
        break;
      }
      if (frm.ccardno4.value.length  4)
      {
        error += "To few digits in the 4th card number field\n";
        break;
      }
    }
  //
  // print error message if there is one
  //
  if (error != "")
  {
    alert(error);
    return (false);
  } else {
    return (true);
  }  
}
//-->
/SCRIPT>
SCRIPT LANGUAGE="JavaScript">
!--
// allows 4 chars to be entered into credit card field and then moves to next field
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode;
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index  arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i  input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
//  End -->
/script>
script type='text/javascript'>
!--
function getParams() {
  var idx = location.href.indexOf('?');
  var params = new Array();
  if (idx != -1) {
    var pairs = location.href.substring(idx+1, location.href.length).split('&');
    for (var i=0; ipairs.length; i++) {
      nameVal = pairs[i].split('=');
      params[nameVal[0]] = nameVal[1];
    }
  }
  return params;
}
var params = getParams();
//-->
/script>
SCRIPT LANGUAGE="JavaScript">
!-- Begin
function checkChoice(whichbox) {
with (whichbox.form) {
if (isNaN(whichbox.value)) {
whichbox.value = whichbox.priorval;
whichbox.focus();
}
whichbox.value = Math.abs(whichbox.value);
var dec = whichbox.value.indexOf('.', 1)
if (dec > 0) {
alert('No decimal places allowed for \"' +whichbox.name +'\" !');
whichbox.value = whichbox.priorval;
whichbox.focus();
}
hiddentotal.value = eval(hiddentotal.value) - eval(whichbox.price * whichbox.priorval);
whichbox.priorval = whichbox.value;
hiddentotal.value = eval(hiddentotal.value) + eval(whichbox.price * whichbox.value);
return(formatCurrency(hiddentotal.value));
   }
}
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num)) num = "0";
cents = Math.floor((num * 100 + 0.5) % 100);
num = Math.floor((num * 100 + 0.5) / 100).toString();
if(cents  10) cents = "0" + cents;
for (var i = 0; i  Math.floor((num.length - (1 + i)) / 3); i++)
num = num.substring(0,num.length - (4 * i + 3))+','+num.substring(num.length-(4 * i + 3));
// or with Cents = return ("?" + num + "." + cents);
return ("?" + num );
}
function InitForm() {
document.bookform.pricepw.value = "?"+ pricepw;
document.bookform.hiddentotal.value = 0;
//for (xx = 0; xx  document.bookform.elements.length; xx++) {
//if (document.bookform.elements[xx].type == 'text') {
//document.bookform.elements[xx].value = 0;
//   }
// }
}
//  End -->
/script>
script type="text/javascript" language="JavaScript">
function changeVal()
{
       if (bookform.ccardname.value=='as printed on card')
      {
            document.bookform.ccardname.value = ''
      }
}
/script>
base target="_top">
/head>
body topmargin="0" leftmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF" onLoad="toForm();InitForm();">
table border="0" width="737" cellspacing="0" cellpadding="0" height="478" background="images/backgroundpool.gif">
  tr>
    td width="100%" valign="top">
      ?
    /td>
  /tr>
/table>
!-- ******LAYERS START********-->
!-- **0** Booking Form-->
DIV ID="id100" CLASS="EVNTcls" STYLE="position: absolute; left: 0; top: 0; width: 209; height: 65">
table border="0" width="703" cellspacing="0" cellpadding="0">
  tr>
    td width="100%" valign="top">
      table border="0" width="147%">
        tr>
          td width="100%">
form method="post" action="../cgi-bin/bookingform.pl" name="bookform" onSubmit="return validate(bookform)">
  input type="hidden" name="recipientname" value="charlie.muir@amec.com">
  input type="hidden" name="recipientaddr" value="charlie.muir@amec.com">
  input type="hidden" name="recipientname2" value="charliemuir_uk@hotmail.com">
  input type="hidden" name="recipientaddr2" value="charliemuir_uk@hotmail.com">
  input type="hidden" name="subject" value="ID SUN - Online Booking Request">
table border="0" width="738" height="244">
  tr>
    td width="226" align="right" colspan="2" height="18">
      table border="0" width="100%" cellspacing="0" cellpadding="0">
        tr>
          td width="50%">img border="0" src="images/booking/maincontact.gif" width="132" height="16">/td>
          td width="50%">
            p align="right">img border="0" src="images/booking/i.gif" alt="this should be the person who is the main passenger" width="22" height="11">/td>
        /tr>
      /table>
    /td>
    td width="17" height="18">/td>
    td width="202" align="left" height="18" colspan="3">
      table border="0" width="100%" cellspacing="0" cellpadding="0" height="17">
        tr>
          td width="50%" height="17">img border="0" src="images/booking/resortchoice.gif" width="133" height="17">/td>
          td width="50%" height="17">
            p align="right">img border="0" src="images/booking/i.gif" alt="just let us know how many whole weeks you would like to stay for" width="22" height="11">/td>
        /tr>
      /table>
    /td>
    td width="291" height="18" colspan="2">img border="0" src="images/booking/paymentdetails.gif" hspace="5">/td>
  /tr>

  tr>
    td align="right" width="86" valign="middle" height="19" class="bluesmallnorm">font color="#343C90">first
      name/font>/td>
    td height="19">select size="1" name="title" tabindex="1" style='font: 8pt Arial'>
        option selected value="Mr">Mr/option>
        option value="Mrs">Mrs/option>
        option value="Miss">Miss/option>
        option value="Dr">Dr/option>
      /select>input type="text" name="firstname" size="10" style='font: 8pt Arial' tabindex="1">/td>
    td width="17" height="19">/td>
    td width="50" align="right" height="19" class="bluesmallnorm">resort/td>
    td height="19" colspan="2" align="left">
    script type='text/javascript'>
    !--
            resort = unescape(params["resort"]);
            document.write("input type='text' name='resort' value='"+ resort +"' size='20' style='font: 8pt Arial' onFocus='this.blur()'>");
            if (bookform.resort.value=='cr1')
            {
            document.bookform.resort.value = 'Crown Resorts';
            }
            if (bookform.resort.value=='ca1')
            {
            document.bookform.resort.value = 'Club Algaida'
            }
            if (bookform.resort.value=='ag1')
            {
            document.bookform.resort.value = 'Aloha Gardens'
            }
            if (bookform.resort.value=='ag2')
            {
            document.bookform.resort.value = 'Aloha Gardens'
            }
            if (bookform.resort.value=='ag3')
            {
            document.bookform.resort.value = 'Aloha Gardens'
            }
            if (bookform.resort.value=='ag4')
            {
            document.bookform.resort.value = 'Aloha Gardens'
            }
      //-->
      /script>
    /td>
    td height="19" class="bluesmallnorm" align="right" width="70">card type/td>
    td width="215" height="19">select size="1" name="credittype" style='font: 8pt Arial' tabindex="27">
        option selected value=" ">select a card type/option>
        option value="Visa">Visa/option>
        option value="Mastercard">Mastercard/option>
        option value="Switch">Switch/option>
        option value="etc">etc/option>
      /select>/td>
  /tr>

  tr>
    td align="right" width="86" valign="middle" height="19" class="bluesmallnorm">font color="#343C90">surname/font>/td>
    td width="134" height="19">input type="text" name="surname" size="20" style='font: 8pt Arial' tabindex="2">/td>
    td width="17" height="19">/td>
    td width="50" align="right" height="19" class="bluesmallnorm">check-in?/td>
    td height="19" colspan="2" align="left">
    script type='text/javascript'>
    !--
            day = unescape(params["day"]);
            document.write("input type='text' name='day' value='"+ day +"' size='7' style='font: 8pt Arial' onFocus='this.blur()'>");
      //-->
      /script>
    script type='text/javascript'>
    !--
            weeknumber = unescape(params["weeknumber"]);
            document.write("input type='text' name='weeknumber' value='"+ weeknumber +"' size='6' style='font: 8pt Arial' onFocus='this.blur()'>");
      //-->
      /script>      
      script type='text/javascript'>
    !--
          weekno = unescape(params["weekno"]);
            document.write("input type='hidden' name='weekno' value='"+ weekno +"'");
      //-->
      /script>      
    /td>
    td height="19" class="bluesmallnorm" align="right" width="70">card no/td>
    td width="215" height="19">

    input type="text" name="ccardno1" onKeypress="if (event.keyCode  45 || event.keyCode > 57) event.returnValue = false;" onKeyUp="return autoTab(this, 4, event);" size="1" style='font: 8pt Arial' maxlength="4" tabindex="28">-input type="text" name="ccardno2" onKeypress="if (event.keyCode  45 || event.keyCode > 57) event.returnValue = false;" onKeyUp="return autoTab(this, 4, event);" size="1" style='font: 8pt Arial' maxlength="4" tabindex="29">-input type="text" name="ccardno3" onKeypress="if (event.keyCode  45 || event.keyCode > 57) event.returnValue = false;" onKeyUp="return autoTab(this, 4, event);" size="1" style='font: 8pt Arial' maxlength="4" tabindex="30">-input type="text" name="ccardno4" onKeypress="if (event.keyCode  45 || event.keyCode > 57) event.returnValue = false;" size="1" style='font: 8pt Arial' maxlength="4" tabindex="31">

    /td>
  /tr>
  tr>
    td align="right" width="86" valign="middle" class="bluesmallnorm">font color="#343C90">address/font>/td>
    td width="134" rowspan="3">textarea rows="6" name="postaladdress" cols="22" style='font: 8pt Arial' tabindex="3">/textarea>/td>
    td width="17">/td>
    td width="50" align="right" class="bluesmallnorm" valign="top">for/td>
    td colspan="2" align="left" valign="top">
    script type='text/javascript'>
    !--
            pricepw = unescape(params["pricepw"]);
            document.write("pre>select size='1' name='duration' priorval=0 price='"+ pricepw +"' tabindex='12' onChange='this.form.pricepw.value=checkChoice(this);'>option selected value='1'>1/option>option value='2'>2/option>option value='3'>3/option>option value='4'>4/option>/select>font size='1' face='Arial' color='#333366'>week(s) is /font>input type='text' name='pricepw' style='font: 8pt Arial' value='"+ pricepw +"' size=4 readonly>input type=hidden name=hiddentotal value=0>/pre>");
      //-->
      /script>      
    /td>
    td class="bluesmallnorm" align="right" width="70">card holder/td>
    td width="215">input type="text" name="ccardname" size="20" style='font: 8pt Arial' tabindex="32" value="as printed on card" onFocus="changeVal()">

    /td>
  /tr>
  tr>
    td width="86" align="right" valign="middle" height="3" class="bluesmallnorm">/td>

    td width="17" height="3">

    td align="left" height="18" class="bluesmallnorm" colspan="3" valign="top" rowspan="2">      

    table border="0" width="100%" cellspacing="0" cellpadding="0">
      tr>
        td width="5%">/td>
        td width="95%">font size="1">font color="#808080">A deposit will be
          required of ?50 via credit card and the remainder can be paid by
          cheque, switch or credit card (/font>font color="#FF6600">*/font>font color="#808080">)/font>/font>/td>
      /tr>
    /table>
    td height="3" class="bluesmallnorm" align="right" width="70">

    expiry date

    td width="215" height="3">select size="1" name="ccardexpiremm" style='font: 8pt Arial' tabindex="33">
        option selected value=" ">--/option>
        option value="Jan">Jan/option>
        option value="Feb">Feb/option>
        option value="Mar">Mar/option>
        option value="Apr">Apr/option>
        option value="May">May/option>
        option value="Jun">Jun/option>
        option value="Jul">Jul/option>
        option value="Aug">Aug/option>
        option value="Sept">Sept/option>
        option value="Oct">Oct/option>
        option value="Nov">Nov/option>
        option value="Dec">Dec/option>
      /select>select size="1" name="ccardexpireyy" style='font: 8pt Arial' tabindex="34">
        option selected value=" ">--/option>
        option value="2001">2001/option>
        option value="2002">2002/option>
        option value="2003">2003/option>
        option value="2004">2004/option>
        option value="2005">2005/option>
        option value="2006">2006/option>
      /select>

  /tr>
  tr>
    td width="86" align="right" valign="middle" height="15" class="bluesmallnorm">/td>

    td width="17" height="15">

    td height="15" class="bluesmallnorm" align="right" width="70">

    issue no

    td width="215" height="15">input type="text" name="ccardissueno" size="20" style='font: 8pt Arial' tabindex="35">

  /tr>
  tr>
    td width="86" align="right" valign="middle" height="19" class="bluesmallnorm">font color="#343C90">county/state/font>/td>

    td width="134" height="19">

    input type="text" name="county" size="20" style='font: 8pt Arial' tabindex="4">

    td height="19" colspan="4">

    table border="0" width="100%" cellspacing="0" cellpadding="0">
      tr>
        td width="50%">img border="0" src="images/booking/yourguests.gif" hspace="17">

        /td>
        td width="50%">
          p align="right">img border="0" src="images/booking/i.gif" alt="please let us know the ages of all guests under 25" width="22" height="11">/td>
      /tr>
    /table>

    td width="291" height="19" class="bluesmallnorm" align="right" colspan="2">

    p align="left">img border="0" src="images/booking/anythingelse.gif" width="134" height="23" hspace="4">/tr>
  tr>
    td width="86" align="right" valign="middle" height="25" class="bluesmallnorm">font color="#343C90">postcode/zip/font>/td>

    td width="134" height="25">

    input type="text" name="postcode" size="20" style='font: 8pt Arial' tabindex="5">

    td height="126" colspan="4" align="right" rowspan="8" valign="top">

    p align="right">

    SCRIPT LANGUAGE="JavaScript">
   !-- automatically generate guests depending on numbers for that resort-->
      !-- Begin
      data = "";    
      inter = "'";
      //default number of guests = max = 7
      number = 7;
            if (bookform.resort.value=='Crown Resorts')
            {
            number = 5;
            }
            if (bookform.resort.value=='Club Algaida')
            {
            number = 3;
            }
            if (bookform.resort.value=='Aloha Gardens')
            {
            number = 7;
            }
      tabno = 13;
      for (i=1; i = number; i++) {
      data = "select size='1' name=" + inter + "title" + i + inter + " tabindex=" + inter + "tabno" + i + inter + " style='font: 8pt Arial'>option selected value='Mr'>Mr/option>option value='Mrs'>Mrs/option>option value='Miss'>Miss/option>option value='Dr'>Dr/option>/select>input type='text' size=12 style='font: 8pt Arial' name=" + inter + "guest" + i + inter + "'>input type='text' size=1 style='font: 8pt Arial' name=" + inter + "age" + i + inter + "'>
";
      document.write(data);
      }
      //  End -->
      /script>
    td height="25" class="bluesmallnorm" align="right" width="70">

    map request

    td width="215" height="25">select size="1" name="maprequest" style='font: 8pt Arial' tabindex="36">
        option selected value="no thank you">no thank you/option>
        option value="by e-mail">by e-mail/option>
        option value="by post">by post/option>
      /select>/tr>
  tr>
    td width="86" align="right" valign="middle" height="10" class="bluesmallnorm">font color="#343C90">country/font>/td>

    td width="134" height="10">

    select size="1" name="country" style='font: 8pt Arial' tabindex="6">
                                    option>Antigua and Barbuda      option>Argentina      option>Arubaoption>Australia      option>Austriaoption>Bahamasoption>Bahrainoption>Barbadosoption>Belgiumoption>Belizeoption>Bermudaoption>Boliviaoption>Botswanaoption>Braziloption>Brunei
      Darussalamoption>Bulgariaoption>Canadaoption>Cayman Islands BWIoption>Chileoption>Chinaoption>Colombiaoption>Corsicaoption>Costa
      Ricaoption>Croatiaoption>Cyprusoption>Czech Republicoption>Denmarkoption>Dominicaoption>Dominican Republicoption>Ecuadoroption>Egyptoption>El Salvadoroption>Estoniaoption>Fijioption>Finlandoption>Franceoption>French
      Polynesiaoption>Gabonoption>Germanyoption>Gibraltaroption>Greeceoption>Grenadaoption>Guatemalaoption>Haitioption>Hondurasoption>Hong Kongoption>Hungaryoption>Icelandoption>Indiaoption>Indonesiaoption>Irelandoption>Israeloption>Italyoption>Jamaicaoption>Japanoption>Jordanoption>Kenyaoption>Kuwaitoption>Latviaoption>Liechtensteinoption>Lithuaniaoption>Luxembourgoption>Macedoniaoption>Malaysiaoption>Maltaoption>Mauritiusoption>Mexicooption>Moroccooption>Mozambiqueoption>Namibiaoption>Nepaloption>Nether.
      Antil.option>Netherlandsoption>New Zealandoption>Nicaraguaoption>Norwayoption>Omanoption>Pakistanoption>Panamaoption>Papua New Guineaoption>Paraguayoption>Peruoption>Philippinesoption>Polandoption>Portugaloption>Qataroption>Romaniaoption>Russiaoption>Saudi
      Arabiaoption>Seychellesoption>Singaporeoption>Slovakiaoption>Sloveniaoption>Solomon Islandsoption>South Africaoption>South Koreaoption>Spainoption>Sri Lankaoption>St Vincent/Grenadineoption>St. Christopheroption>St. Luciaoption>St.
      Vincentoption>Swedenoption>Switzerlandoption>Syriaoption>Taiwanoption>Thailandoption>Trinidad and Tobagooption>Turkeyoption>United Arab Emirateoption selected>United
      Kingdomoption>Uruguayoption>USAoption>Vatican Cityoption>Venezuelaoption>Vietnamoption>Zimbabwe
    /select>

    td height="19" class="bluesmallnorm" align="right" width="70" rowspan="2">

    requests

    td width="215" rowspan="3" height="33" valign="top">textarea rows="3" name="requests" cols="22" style='font: 8pt Arial' tabindex="37">/textarea>/tr>
  tr>
    td width="86" align="right" valign="middle" height="9" class="bluesmallnorm">font color="#343C90">staff
      number/font>/td>

    td width="134" height="9">

    input type="text" name="staffno" size="20" style='font: 8pt Arial' tabindex="7">

  /tr>
  tr>
    td width="86" align="right" valign="middle" height="19" class="bluesmallnorm" rowspan="2">font color="#343C90">home
      phone/font>/td>

    td width="134" height="19" rowspan="2">

    input type="text" name="homephone" size="20" style='font: 8pt Arial' tabindex="8">

    td height="19" width="70" rowspan="2">

  /tr>
  tr>

    td width="215" height="16" valign="top">
      p class="bluesmallnorm">input type="checkbox" name="cotrequired" value="ON" tabindex="38">cot
      required/tr>
  tr>
    td width="86" align="right" valign="middle" height="19" class="bluesmallnorm">font color="#343C90">mobile
      phone/font>/td>

    td width="134" height="19">

    input type="text" name="mobilephone" size="20" style='font: 8pt Arial' tabindex="9">

    td width="70" height="19">

    td width="215" height="16" valign="middle">

  /tr>
  tr>
    td width="86" align="right" valign="middle" height="19" class="bluesmallnorm">font color="#343C90">e-mail
      address/font>/td>

    td width="134" height="19">

    input type="text" name="senderaddr" size="20" style='font: 8pt Arial' tabindex="10">

    td width="291" height="19" colspan="2">
    /tr>
  tr>
    td width="86" align="right" valign="middle" height="19" class="bluesmallnorm">/td>

    td width="134" height="19">

    td width="70" height="19">

    td width="215" height="19">input type="submit" value="Submit" name="submit"  style='font: 8pt Arial' tabindex="38">  input type="reset" value="Reset" name="reset" style='font: 8pt Arial' tabindex="39">

  /tr>
  tr>
    td width="86" align="right" valign="middle" height="10" class="bluesmallnorm">/td>

    td width="134" height="10">

    td width="17" height="10">

    td width="45" align="right" height="10" class="bluesmallnorm">

    td width="99" height="10">

    td width="46" height="10">

    td width="70" height="10">

    td width="215" height="10">

  /tr>
  tr>
    td width="86" align="right" valign="middle" height="19" class="bluesmallnorm">
    /td>

    td width="134" height="19">

    td width="17" height="19">

    td width="499" align="right" height="19" class="bluesmallnorm" colspan="5">

    p align="left">please feel free to read out a href="termsandconditions.htm" target="_self">terms
    and conditions/a> and remember b>don't/b> book your flights till your
    apartment has been confirmed to you.

  /tr>
/table>

/form>/td>
        /tr>
      /table>
      p>?/td>
  /tr>
/table>
/DIV>
!-- **100** Orange easyJet Discount -->
DIV ID="id100" CLASS="EVNTcls" STYLE="position: absolute; left: 0; top: 407; width: 209; height: 65">
            table border="0" width="232" cellspacing="0" cellpadding="0" background="images/menuback.gif">
              tr>
                td width="209" bgcolor="#FF6600">
                  p align="center">a href="#" onmouseover="rollOn('nav9','10% Discount'); return true;" onmouseout="rollOff('nav9'); return true;" target="_self">img border="0" src="images/footerdiscount.gif" width="209" height="65" name="nav9" alt="10% discount for all easyJet Staff">/a>/p>
                /td>
                td width="19">img border="0" src="images/footerdiscountsplit.gif">/td>
              /tr>
            /table>
/DIV>
!-- **101** Blue Bottom Menu -->
DIV ID="id101" CLASS="EVNTcls" STYLE="position: absolute; left: 230; top: 455; width: 544; height:35">
                  table border="0" width="544" cellspacing="0" cellpadding="0" height="23" bgcolor="#343C90">
                    tr>
                      td width="51" height="3" align="center">a href="help.htm" onmouseover="rollOn('nav1','Help'); return true;" onmouseout="rollOff('nav1'); return true;" target="_self">img border="0" src="images/menuoptions/help01.gif" width="40" height="21" name="nav1" alt="Help" hspace="5">/a>/td>
                      td width="91" height="3" align="center">a href="contactus.htm" onmouseover="rollOn('nav2','Contact Us'); return true;" onmouseout="rollOff('nav2'); return true;" target="_self">img border="0" src="images/menuoptions/contact01.gif" width="80" height="21" name="nav2" alt="Contact Us" hspace="5">/a>/td>
                      td width="154" height="3" align="center">a href="check.htm" onmouseover="rollOn('nav3','Check Your Booking'); return true;" onmouseout="rollOff('nav3'); return true;" target="_self">img border="0" src="images/menuoptions/check01.gif" width="143" height="21" name="nav3" alt="Check Your Booking" hspace="5">/a>/td>
                      td width="142" height="3" align="center">a href="info.htm" onmouseover="rollOn('nav4','More Information'); return true;" onmouseout="rollOff('nav4'); return true;" target="_self">img border="0" src="images/menuoptions/info01.gif" width="131" height="21" name="nav4" alt="More Information" hspace="5">/a>/td>
                      td height="3" align="center" width="96" valign="middle">
                        p align="center">a href="home.htm" onmouseover="rollOn('nav10','Home Page'); return true;" onmouseout="rollOff('nav10'); return true;" target="_self">img border="0" src="images/menuoptions/home01.gif" align="left" name="nav10" alt="Home Page" hspace="5">/a>/p>
                      /td>
                    /tr>
                  /table>
/DIV>
/body>
/html>
0
Comment
Question by:cmuir
  • 3
  • 2
  • 2
  • +1
8 Comments
 

Author Comment

by:cmuir
Comment Utility
The code above looks strange on my machine - if it is on your machine then I will happily give you a href to the code on the net

- sod it! it is http://www.idsun.com/fullsite/bookingform.htm

:o)
0
 
LVL 3

Accepted Solution

by:
davlun20080 earned 35 total points
Comment Utility
I am no expert on cgi, but you should be able to have your script gather that data up again and send it to a confirmation page, then on the confirmation page extract the data from the post or querystring and display it in the html page.

this is done easily with asp, just don't do any cgi programming.
0
 
LVL 8

Expert Comment

by:bebonham
Comment Utility
<HTML>
  <HEAD>
      <TITLE></TITLE>
  <SCRIPT>
 
function previewForm()
{
   form=document.forms[0]
            str="this is what you are about to submit<BR><BR>"
  for(i=0;i<form.elements.length;i++)
  {

            if(form.elements[i].type=="text")
          {
               str+=form.elements[i].name + " = " + form.elements[i].value + "<BR>"
          }
     }
          str+='<FORM><INPUT TYPE="BUTTON" VALUE="submit it" ONCLICK="window.opener.document.forms[0].submit();opener.focus();window.close()"></FORM>'
          d=window.open();
          d.document.open()
          d.document.write(str)
          d.document.close();
     
}
 
  </SCRIPT>
 
  </HEAD>
  <BODY> 35 points is not enough for the "full" version :)
  this works only w/ text boxes.
  <FORM METHOD="POST" ACTION="blah">
  <INPUT TYPE="TEXT" NAME="one">
  <INPUT TYPE="TEXT" NAME="two">
  <INPUT TYPE="TEXT" NAME="three">    
  <INPUT TYPE="BUTTON" ONCLICK="previewForm()">
  </BODY>
</HTML>
0
 
LVL 8

Expert Comment

by:bebonham
Comment Utility
like was said,

cgi version is more typical...cleaner I guess..

but sometimes you just wanna do it with javascript...with a little work on the above script you can have a pretty cool effect.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 3

Expert Comment

by:davlun20080
Comment Utility
good catch bebonham, until i saw your deal missed the part that he wanted to do this before submission.

davlun
0
 
LVL 8

Expert Comment

by:bebonham
Comment Utility
yeah...

cgi gives you a lot more benifit though...
, especially, since you can make it work for people that don't use javascript (but not an issue for cmuir, because his page is already loaded with js)
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20073867.html
http://www.experts-exchange.com/questions/Q.20077151.html
http://www.experts-exchange.com/questions/Q.20093662.html
http://www.experts-exchange.com/questions/Q.20099223.html
http://www.experts-exchange.com/questions/Q.20102607.html
http://www.experts-exchange.com/questions/Q.20103888.html
http://www.experts-exchange.com/questions/Q.20103954.html
http://www.experts-exchange.com/questions/Q.20104496.html
http://www.experts-exchange.com/questions/Q.20073596.html
http://www.experts-exchange.com/questions/Q.20134707.html
http://www.experts-exchange.com/questions/Q.20141120.html
http://www.experts-exchange.com/questions/Q.20144314.html
http://www.experts-exchange.com/questions/Q.20144320.html
http://www.experts-exchange.com/questions/Q.20147657.html
http://www.experts-exchange.com/questions/Q.20157375.html
http://www.experts-exchange.com/questions/Q.20173004.html
http://www.experts-exchange.com/questions/Q.20178986.html
http://www.experts-exchange.com/questions/Q.20231062.html
http://www.experts-exchange.com/questions/Q.20233830.html
http://www.experts-exchange.com/questions/Q.20234427.html
http://www.experts-exchange.com/questions/Q.20237331.html
http://www.experts-exchange.com/questions/Q.20241979.html
http://www.experts-exchange.com/questions/Q.20102555.html
http://www.experts-exchange.com/questions/Q.20262558.html
http://www.experts-exchange.com/questions/Q.20274450.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20276466.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 

Author Comment

by:cmuir
Comment Utility
went with CGI in the end - just called the html code from it though.

Charlie
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now