?
Solved

getting value when page loads

Posted on 2006-11-27
1
Medium Priority
?
239 Views
Last Modified: 2007-02-15

Hello, I am using the md5 script from http://pajhome.org.uk/crypt/md5/

when I have the script and the form below I add content into the input and onclick ing the button I get my value. I would prefer to have prefer to ave it so when my page loads a unique id wil be created, I would like to have the value set from time now() .

how can I have the value of now() populate the hex_md5(input.value) and show on my page, perhaps inside a hidden field or something. I am using asp. would be gratful for any help.

regards

kenny


<form><table class="indented">
  <tr><th>Input</th><td><input type="text" name="input" size="40"></td></tr>
  <tr><th>Calculate</th>
  <td style="text-align:center">
  <input type="button" onclick="hash.value = hex_md5(input.value)" value="MD5">
</td></tr>
  <tr><th>Result</th><td><input type="text" name="hash" size="40"></td></tr>
</table></form>
0
Comment
Question by:thatelvis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
WMIF earned 1000 total points
ID: 18022662
i would put a script in the page to run.

<form><table class="indented">
  <tr><th>Input</th><td><input type="text" name="input" size="40"></td></tr>
  <tr><th>Calculate</th>
  <td style="text-align:center">
  <input type="button" onclick="hash.value = hex_md5(input.value)" value="MD5">
</td></tr>
  <tr><th>Result</th><td><input type="text" name="hash" size="40"></td></tr>
</table></form>
<script language=javascript>
var now = new Date();
document.getElementById('hash').value = hex_md5(now)
</script>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

801 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