Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Details window

  1. #1
    New to the CF scene
    Join Date
    Mar 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Details window

    So hears the problem this page has a validation window for all the text options all these windows open and work but when i try to place a check details window to bring up what
    data has been inputed so fare nothing happens it as if nothing is there can anyone help me the page code is in full below

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html xmlns="http://www.w3.org/199/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html;
    charset=utf-8"/> 
    <meta name="description" content="Wave Custom Computers was established in 2005 by Douglas Brooks and stephen Feist. Wave is a dublin Ireland based company that specializes in building custom Pc for its cliental from high end gaming and home computers to office Pc’s. ">
    <meta name="keywords" content="Wave Custom Computers, wave Dundalk, Wave dundalk Ireland, Wave Web project, Wave college Project,">
    <link href="mystiles.css" rel="stylesheet" type="text/css">
    <title>sales</title>
    
    <script type="text/javascript" language="javascript" src="rollover.js"></script>
    <center><span id="pendule"></span></center>
    
    <script language="javascript">
    
    function clock() {
    var digital = new Date();
    var hours = digital.getHours();
    var minutes = digital.getMinutes();
    var seconds = digital.getSeconds();
    var amOrPm = "AM";
    if (hours > 11) amOrPm = "PM";
    if (hours > 12) hours = hours - 12;
    if (hours == 0) hours = 12;
    if (minutes <= 9) minutes = "0" + minutes;
    if (seconds <= 9) seconds = "0" + seconds;
    dispTime = '<b>'+hours + ":" + minutes + ":" + seconds + " " + amOrPm+'</b>';
    document.getElementById('pendule').innerHTML = dispTime;
    setTimeout("clock()", 1000);
    }
    window.onload=clock;
    
    </script>
    <script>
    function Validate_Form()
    {
        valid = true;
            if ( document.validation.txtName.value == "" )
            {
            alert ( "Please enter you're First Name " );
            valid = false;
            }
    
            if ( document.validation.txtsur.value == "" )
            {
            alert ( "Please enter you're Surname" );
            valid = false;
            }
            
            if ( document.validation.address1.value == "" )
            {
            alert ( "Please enter you're Address " );
            valid = false;
            }
            
            
            
            if ( document.validation.phone.value == "" )
            {
            alert ( "Please enter you're Phone Number" );
            valid = false;
            }
            
            if ( document.validation.card.value == "" )
            {
            alert ( "Please enter you're credit card details " );
            valid = false;
            }
            
        if(document.validation.txtEmail.value == "")
        {
            window.alert(" Invalid Email ")
            valid = false
        }
        if (document.validation.terms.checked == false)
        {
            alert(" Please tick Terms and Conditions")
            valid = false
        }
        if( document .validation.Newsletter_yes.checked == false && 
         document . validation.Newsletter_no.checked == false)
         {
         alert ("Do you want to Subscribe to our Newsletter")
         }
         
         if (document.validation.county.selectedIndex=="0" )
         {
         alert ("Please Enter you're County")
         
         }
    
    }
    function CheckEmail (inputText)// checks if the email entered is correct format
    {
    var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
    
    if(inputText.value.match(mailformat))
    {
    document.validation.txtEmail.focus();
    return true;
    }
    else
    {
    alert("Invalid Email");
    document.validation.txtEmail.focus();
    return false;
    }
    
    
    function display()
    {
        
        DispWin = window.open('','NewWin','toolbar = no, status = no, width = 300, height = 200')
        message = "<ul><li><b> FIRST NAME: </B> " + document.validation.txtName.value
        message += "<ul><li><b> SURNAME: </B> " + document.validation.txtsur.value
        message +="<li><b> Email: </B> " + document.validation.txtEmail.value
        message += "<li><b> Terms: </B>" + document.validation.terms.checked
        
         Newsletter = document.getElementsByName("newsletter");
    
                    if (newsletter[0].checked == true)
                    {
                        newsletter = "newsletter_yes";
                    }
                    else if (newsletter[1].checked == true)
                    {
                        newsletter = "newsletter_no";
                    }
    
        message += "<li><b> Newsletter: </B> " + Newsletter + "</ul>";
    
        DispWin.document.write(message);
    
        DispWin.document.write('<input type="button" name="button" id="button" value="OK" onclick = "window.close()">')
    
    
    }
    
    
    }
    
    </script>
    <script type="text/javascript" language="javascript" src="lytebox.js"></script>
    <link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" />
    </head>
    
    <body background="http://www.codingforums.com/images/Untitled-1.gif" onload="clock();onLoad=MM_preloadImages('images/homeover.png')">
    
    <div id="wrapper">
    <p align="center"><a name="top"><img src="http://www.codingforums.com/images/top-wave.gif" width="800" height="200" alt="banner" /> </a></p>
    
     <div id="nav"><p align="center">
    
       
    <a href="index.html">Home</a>| 
    
    <a href="pc.html">Gaming PC's</a>|
    
     <a href="workpc.html">Work PC's</a>| 
    
     <a href="laptop.html">Gaming Laptops</a>|
     
     <a href="worklaptop.html">Work Laptops</a>|
    
    <a href="http://ie.ign.com/"target="_blank">Games </a>|
    
    <a href="http://www.computerworld.com/"target="_blank">News </a>|
    
    <a href="support.html">Support</a>| 
    
    
    <a href="contact.html" class="lytebox" data-title="login" 
       data-lyte-options="width:1000 height:800 scrollbars:yes">Contact</a>
    
    </p></div>
    
     
    
    <div id ="container">
    
    
    
    
    
    
    <div id ="leftcolumn" align="center"><p>
    <a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Home','','images/homeover.png',1)"><img src="http://www.codingforums.com/images/homeup.png" alt="Home" name="Home" width="140" height="68" border="0"></a>
    
    <a href="pc.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('gamepc','','images/pcover.png',1)"><img src="http://www.codingforums.com/images/pcup.png" alt="Gaming pc" name="gamepc" width="140" height="68" border="0"></a>
    
    <a href="workpc.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('work pc','','images/workpcover.png',1)"><img src="http://www.codingforums.com/images/workpcup.png" alt="Workpc" name="work pc" width="140" height="68" border="0"></a>
    
    <a href="laptop.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('gamelaptop','','images/glapover.png',1)"><img src="http://www.codingforums.com/images/glapup.png" alt="Gaming laptops" name="gamelaptop" width="140" height="68" border="0"></a>
    
    <a href="worklaptop.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('work laptops','','images/wlapover.png',1)"><img src="http://www.codingforums.com/images/wlapup.png" alt="Work laptops" name="work laptops" width="140" height="68" border="0"></a>
    
    <a href="http://ie.ign.com" target="_blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('gaming news','','images/gnewsover.png',1)"><img src="http://www.codingforums.com/images/gnewsup.png" alt="Gaming news" name="gaming news" width="140" height="68" border="0"></a>
    
    <a href="http://www.computerworld.com" target="_blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('tech news','','images/techover.png',1)"><img src="http://www.codingforums.com/images/techup.png" alt="Tech news" name="tech news" width="140" height="68" border="0"></a>
    
    <a href="support.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('support','','images/supportover.png',1)"><img src="http://www.codingforums.com/images/supportup.png" alt="Support" name="support" width="140" height="68" border="0"></a>
     
    <a href="contact.html" class="lytebox"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','images/contactover.png',1)"><img src="http://www.codingforums.com/images/contactup.png" alt="contact" name="contact" width="140" height="68" border="0"></a>
    
    
    </div>
    <div id= "rightcolumn"><p><a name=""><h2>Order Sheet </h2></a>
    <p><form align="centre"  name="validation" method="post" action="http://www.soundstore.ie/category/Other-Computer-Accessories/2218.4.8" onsubmit= "return Validate_Form()">
      <table cellpadding="5" cellspacing="5" width="500" border="0" bgcolor="" >
        <tr>
        <td>First Name:</td>
        <td><label><input type="text" name="txtName" id="txtName" /></label></td>
      </tr>
      <tr>
        <td>Surname:</td>
        <td><label><input  type="text" name="txtsur" id="txtsur" /></label></td>
      </tr>
      <tr><td>County:</td>
      
      <td><label><select name="county" id="county">
            <option value="Please" selected="selected">Please select County</option>
            <option value="Antrim">Antrim</option>
            <option value="Armagh">Armagh</option>
            <option value="Carlow">Carlow</option>
            <option value="Cavan">Cavan</option>
            <option value="Clare">Clare</option>
            <option value="Cork">Cork</option>
            <option value="Derry">Derry</option>
            <option value="Donegal">Donegal</option>
            <option value="Down">Down</option>
            <option value="Dublin">Dublin</option>
            <option value="Fermanagh">Fermanagh</option>
            <option value="Galway">Galway</option>
            <option value="Kerry">Kerry</option>
            <option value="Kildare">Kildare</option>
            <option value="Killkenny">Killkenny</option>
            <option value="Laois">Laois</option>
            <option value="Leitrim">Leitrim</option>
            <option value="Limerick">Limerick</option>
            <option value="Longford">Longford</option>
            <option value="Louth">Louth</option>
            <option value="Mayo">Mayo</option>
            <option value="Meath">Meath</option>
            <option value="Monaghan">Monaghan</option>
            <option value="Offaly">Offaly</option>
            <option value="Roscommon">Roscommon</option>
            <option value="Sliog">Sligo</option>
            <option value="Tipperary">Tipperary</option>
            <option value="Tyrone">Tyrone</option>
            <option value="Waterford">Warterford</option>
            <option value="Westmeath">Westmeath</option>
            <option value="Wexford">Wexford</option>
            <option value="Wicklow">Wicklow</option>
            </select></label>
        </td></tr>
      <tr>
        <td>Address 1:</td>
        <td><label><input type="text" name="address1" id="address1"/></label></td>
      </tr>
      <tr>
        <td>Address 2:</td>
        <td><label><input type="text" name="address2" id="address2"/></label></td>
      </tr>
      <tr>
        <td>Phone Number:</td>
        <td><label><input type="text" name="phone" id="phone"/><label></td>
      </tr>
       <tr><td><p>EMail:</td>
       <td> <label>
          <input type="text" name="txtEmail" id="txtEmail"  onchange=        "CheckEmail(document.validation.txtEmail)"/>
        </label></td></tr>
      <tr>
        <td>Credit card details:</td>
        <td><v><input type="text" name="card" id="card"/></label></td>
      </tr>
      <tr>
    <td> Total: </td>
    <td><label><input type="value" name="total" id="total"/></label></div></td>
    </tr>
    
    </tr>
    
    
    
    <tr>
        <td><h2>Would you like to sign up to our Newsletter:</h2></td>
        <td><p>
        <label><input type="radio" name="Newsletter_yes" id="newsletter_yes" value="Yes"/>
        Yes</label>
        <br />
        <label><input type="radio" name="Newsletter_no" id="newsletter_no" value="no"/>
        No</label>
        <br/>
        </p>
        </td>
    </tr>
    
    
    
    <tr>
        <td> <h2>Please let us know where you heard about us from one of the following:</h2></td>
        <td>
        <p>
            <label><input type="checkbox" name="Google" id="google" value="google"/> Google</label><br/>
            <label><input type="checkbox" name="Yahoo" id="yahoo" value="yahoo"/> Yahoo</label><br/>
            <label><input type="checkbox" name="Bing" id="bing" value="bing"/> Bing</label><br/>
            <label><input type="checkbox" name="Magazine" id="magazine" value="magazine"/>Magazine</label><br/>
            <label><input type="checkbox" name="Tv" id="tv" value="tv"/> Tv</label><br/>
            <label><input type="checkbox" name="Other" id="other" value="other"/> Other</label><br/>
        </p>
        </td>
    </tr>
    <tr >
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr><td><label><input type="checkbox" name="terms"  id="terms" /> I Agree to Terms and conditions:</label><br/></td></tr>
    <tr>
    <td><label>
          <input type="submit" name="btnSubmit" id="btnSubmit" value="Send" />
        </label>
        <label>
          <input type="reset" name="btnClear" id="btnClear" value="Reset" />
        </label>
        <label>
          <input type="button" name="display" id="display" value="Cheack details" 
          onclick = "display()"/>
        </label>
        </td><td>&nbsp;</td>
    </tr>
        </table>
        </form>
        </p>
    </div>
    <div id="footer"><a name="top"><img src="http://www.codingforums.com/images/Bottomwave.png" width="800" height="117" alt="banner"/> </a>
    </div>
    </div>
    </body>
    
    </html>
    Last edited by VIPStephan; 03-28-2014 at 05:15 PM. Reason: added code BB tags

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,581
    Thanks
    23
    Thanked 644 Times in 643 Posts
    Where is the 'check details window' code your trying to bring up?
    Please go to The W3C Markup Validation Service and fix your code. I got 43 Errors, 34 warning(s) when I submitted it. Fix now so it doesn't cause problems later.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •