Calculated Value on HTML Page?

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Calculated Value on HTML Page?

    Please help...! I am in need of a solution that would allow me to display a
    numberical value on the homepage of a site I'm developing - with that value
    increasing by a given increment (e.g. x+24) each day.

    I also am in need of a solution or script that would take the resulting value
    from above and divide it by another value (e.g. result from above divided by 9)
    - and display THAT result separately on the same HTML page.

    Can this be done?? Any help would be greatly appreciated.


    bfanok Guest

  2. Similar Questions and Discussions

    1. Flash .html Plays on Server but NOT on html page
      Sorry for being so green. Running IIS Microsoft Server 1. Installed FMS 2. Installed Player 8 and 9 Uploaded .flv and .swf files to server....
    2. How to update html page from another html page
      I have developed one Real estate site for my client, now my client wants to update the CurrentOffers.html page himselves, where in he wants to...
    3. how to jump from html page to html page
      Good Evening, I would like to know the way to jump from webpage to webpage, without the user pressing anything. For example, if the user...
    4. including html files in a .html page
      4bb: Investigate Server-side includes. If your host supports them, they do just what you want. Be aware that the file included MUST BE AN...
    5. Calling a html page from an asp page then returning to the next statement on the original asp page
      Hi! I have an ASP page that calls excel to create a report. This works fine. Now I need to call a html calendar page to filter what rows are...
  3. #2

    Default Re: Calculated Value on HTML Page?

    Here's one solution for you in PHP:

    <?php
    $days = -1*(strtotime("2005-08-17") - strtotime(date("Y-m-d"))) / (60 * 60 *
    24); //First date is the start date; second is today's date
    echo "The date 2005-08-17 was $days day(s) ago."; //Prints the number of days
    since start date
    $divisor = 9; //Number to divide days by
    $dividend = $days/$divisor;
    ?>
    <p>
    If I divide the number of days by <?php echo $divisor; ?>, I get <?php echo
    $dividend; ?>.

    [url]http://www.lokeys.net/test[/url]

    -tod

    thlokey Guest

  4. #3

    Default Re: Calculated Value on HTML Page?

    Thanks - I'll try this. Can I just plug this into my HTML? (I'm not familiar with PHP). Thanks again!
    bfanok Guest

  5. #4

    Default Re: Calculated Value on HTML Page?

    You can only use that script snippet if your host supports PHP. Do they?

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "bfanok" <webforumsuser@macromedia.com> wrote in message
    news:de29ik$db$1@forums.macromedia.com...
    > Thanks - I'll try this. Can I just plug this into my HTML? (I'm not
    > familiar with PHP). Thanks again!

    Murray *TMM* Guest

  6. #5

    Default Re: Calculated Value on HTML Page?

    I use Omnis.com - I believe they do and I can request it be turned on for my site. You've been a big help...thanks!
    bfanok Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139