Results 1 to 2 of 2

Thread: Price quote generator for website

  1. #1
    Join Date
    May 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Price quote generator for website

    Hello, I am new to this forum, and it looks like the most promising place to ask this question. I am a petsitter, and would like to have a price quote generator like this one at http://www.geocities.com/siliatopetsit/ . I have emailed the sitter on that site, but she has not responded, and since her page was last updated in 2005, I don't think it's likely she will. I tried looking at the page properties/source, but that didn't help. Does anyone know how to do a script for that? I've searched all over the internet, and am empty handed. Help would be MUCH appreciated.
    Thanks!

    Beth T.

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Well, you could store the statements and prices in arrays and output them:
    Code:
    <div id="prices"></div>
    <script type="text/javascript">
    var unit = "$",
      sep = ": ",
      comments = ["Price 1","the second price"],
      prices = ["25.00","683.36"];
    for (var i = 0;i < comments.length;++i) {
      document.getElementById("prices").appendChild(document.createTextNode(comments[i]+sep+unit+prices[i]));
      document.getElementById("prices").appendChild(document.createElement("br"));
    };
    </script>
    - Mike

Bookmarks

Posting Permissions

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