Page 2 of 3 FirstFirst 123 LastLast
Results 17 to 32 of 34

Thread: Computer Configurator

  1. #17
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    But i dont need to to select only am2 motherboards with an am2 chip as there will be a seperate AM2 configurator.
    (\__/)
    (='.'=)
    (")_(")

  2. #18
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable
    well, you could do it that way, but one way or another you need javascript anyway to do this effectively. HTML/XHTML has no room for logic what so ever.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  3. #19
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    logic? (sorry n00b here)

    EDIT: also what did u say was wrong with the mailform code?
    (\__/)
    (='.'=)
    (")_(")

  4. #20
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable
    Logic, as in programming logic, lets say you decide that a basic HTML form emailed to you isn't good enough, and you decide you want to add on price calculations as the form changes, you need javascript to do that properly, orrr, if you want to add components later on, it's much easier to have a php/mysql script that lets you add things on via an administration form, thus saving you having to edit the html, save, reupload, and hope users browsers download the new copy.


    Code:
    <form emailto="mailto:nvening@gmail.com" application/x-www-form-urlencoded method="post" action="http://www.qkxyq.com/thalasson/mailform.cgi">
    that part, emailto isn't a legal (html standards) <form> attribute and application/x-www-form-urlencoded should be enctype="application/x-www-form-urlencoded", however, it isn't really needed.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  5. #21
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    I deleted all that not needed stuff - i forgot to get rid of it in the first place.

    The Hidden setting however is not valid but works in internat explorer and firefox so does it really matter??
    (\__/)
    (='.'=)
    (")_(")

  6. #22
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable
    no, the type=hidden attribute is perfectly valid.. it matters as in standards allow any HTML complient web browser, not all browsers allow a page to crap itself like I.E. does. it doesn't hurt to take a closer look at standards to make sure your webpage will work with the broadest possible audiance.

    Here's a reference sheet to give you a hand with that: W3Schools - HTML 4.01 / XHTML 1.0 Reference
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  7. #23
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    Thats strange - a minute ago i checked it with the validator and it said that all my hidden tags were invalid lol

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta name="generator"
        content="HTML Tidy for Linux/x86 (vers 1st November 2002), see www.w3.org" />
    
        <title>Computer Configurator</title>
      </head>
    
      <body>
        <form method="post"
        action="http://www.qkxyq.com/thalasson/mailform.cgi">
          
    Please select a GPU<br />
           
    <input type="radio" name="GPU" value="AMD_70" />AMD £70 
    
    <input type="radio" name="GPU" value="Intel_50" />Intel £50<br />
           
    Please select a CPU<br />
           
    <input type="radio" name="CPU" value="ATI_40" />ATI £40 
    
    <input type="radio" name="CPU" value="Nvidia_30" />Nvidia £30<br />
    
          <p>Name: <input type="text" size="10" maxlength="40" name="Name" /><br />
          </p>
    
          <p>Email: <input type="text" size="20" maxlength="40" name="Email" /><br />
          </p>
    
          <p><input type="submit" value="Submit" /> <input name="subject" type="hidden"
          value="Configuration Details" /> <input name="nextpage" type="hidden"
          value="www.cubicomputers.co.uk" /> <input name="emailto" type="hidden"
          value="nvening@gmail.com" /></p>
        </form>
      </body>
    </html>
    Thats valid.
    (\__/)
    (='.'=)
    (")_(")

  8. #24
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable


    sound.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  9. #25
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    I have found some Java code on the net and have edited it to make it sutable for my needs. However the code did not originally work (even though the guy though it did) but it would be perfect for my needs.

    Can any of you java experts see whats wrong?

    (the problem is that it does not total up the values)

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    
    <SCRIPT language="javascript">
    function cent(amount) {
         return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
    }
    
    function calculate() {
        var p1, p2, p3;
        p1 = test.price1.value * 1;
        p2 = test.price2.value * 1;
        p3 = test.price3.value * 1;
        total_price = p1 + p2 + p3;
        test.total_price.value = cent(Math.round(total_price*Math.pow(10,2))/Math.pow(10,2));
    }
    
    </SCRIPT>
    
    <form name="test" method="post" action="http://www.qkxyq.com/thalasson/mailform.cgi">
    <p>
      <input name="1" type="radio" value="0" onclick="this.form.price1.value='0.00';calculate();">0.00<br />
      <input name="1" type="radio" value="10" onclick="this.form.price1.value='10.00';calculate();">10.00<br />
      <input name="1" type="radio" value="20" onclick="this.form.price1.value='20.00';calculate();">20.00<br />
      <input name="1" type="radio" value="30" onclick="this.form.price1.value='30.00';calculate();">30.00<br />
      <input type="hidden" name="price1">
    </p>
    <p>
      <input name="2" type="radio" value="0" onclick="this.form.price2.value='0.00';calculate();">0.00<br />
      <input name="2" type="radio" value="10" onclick="this.form.price2.value='10.00';calculate();">10.00<br />
      <input name="2" type="radio" value="20" onclick="this.form.price2.value='20.00';calculate();">20.00<br />
      <input name="2" type="radio" value="30" onclick="this.form.price2.value='30.00';calculate();">30.00<br />
      <input type="hidden" name="price2">
    </p>
    <p>
      <input name="3" type="radio" value="0" onclick="this.form.price3.value='0.00';calculate();">0.00<br />
      <input name="3" type="radio" value="10" onclick="this.form.price3.value='10.00';calculate();">10.00<br />
      <input name="3" type="radio" value="20" onclick="this.form.price3.value='20.00';calculate();">20.00<br />
      <input name="3" type="radio" value="30" onclick="this.form.price3.value='30.00';calculate();">30.00<br />
      <input type="hidden" name="price3">
    </p>
    <p>&nbsp;</p>
    <p>Total:   <input type="textfield" name="total_price"></p>
    
    <p>Name: <input type="text" size="10" maxlength="40" name="Name" /><br />
          </p>
    
          <p>Email: <input type="text" size="20" maxlength="40" name="Email" /><br />
          </p>
    
          <p><input type="submit" value="Submit" /> <input name="subject" type="hidden"
          value="Configuration Details" /> <input name="nextpage" type="hidden"
          value="www.cubicomputers.co.uk" /> <input name="emailto" type="hidden"
          value="nvening@gmail.com" /></p>
    
    </form>
    
    </body>
    </html>
    (\__/)
    (='.'=)
    (")_(")

  10. #26
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    i can't see any java - only javascript, which is an entirely different language

    one thing to remember is that javascript rarely works between browsers - msie, mozilla, safari, etc all have different ways of referencing objects in a page

  11. #27
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    How are you going to be storing your data? I've seen no mention from you about a database or anything like that.

  12. #28
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    The prices and everything is to just me put directly into the code as thats the most practicle ting to do.

    Sorry i meant java script - my bad - so i should not use javascript or what?

    EDIT:

    OK basically this is my problem: I am fine with the solution i have come up for the form and sending the data and everything.

    The only other thing i need to do is add a totalling feature - i read through the PHP tutoral and am not sure if PHP could be used or what to look at for this to work.

    Im sorry for keeping on about this.
    Last edited by nvening; 02-07-2006 at 05:11 PM.
    (\__/)
    (='.'=)
    (")_(")

  13. #29
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    Quote Originally Posted by nvening
    The prices and everything is to just me put directly into the code as thats the most practicle ting to do.
    Are you sure that's the most practicle thing to do? It's probably the easiest, but I really don't think that's the best solution at all. I'm not sure what others think, but I'd say a database would be the way to go. You could then easily do your totalling thing through PHP from the database.

  14. #30
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    Well it really only is a small and simple thing that i want to do - i did look at the mysql tutorial though but i dont really get why it keeps on about the code when you can use a gui to do it?
    (\__/)
    (='.'=)
    (")_(")

  15. #31
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    You could use a GUI to do it, but then it wouldn't be dynamic. If it's just a small thing, then it might not matter so much, but think what you'd do if you were doing something bigger. You'd need the code the insert, delete and search data using PHP. I didn't know the scope of your project, so I assumed it was something big. Although I'd still consider it even though it's small.

    Can I ask what exactly it's for? Is it a small Uni project, or something you're being paid to do by a company? If it's for a company or anything like that, I really would consider using a database and making it as expandable as possible. If they came back to you in month time asking for them to be able to add new products into the system, then a database would definatly be needed then.

  16. #32
    lazy student nvening's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    4,656
    Thanks
    196
    Thanked
    31 times in 30 posts
    Its just a small project tbh - its not for anyone else - i dont want to mkae it complicated and the like just want to get it to total.
    (\__/)
    (='.'=)
    (")_(")

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 07-12-2004, 11:45 AM
  2. Replies: 0
    Last Post: 07-12-2004, 10:44 AM

Posting Permissions

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