Solved

getting value when page loads

Posted on 2006-11-27
1
196 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
1 Comment
 
LVL 22

Accepted Solution

by:
WMIF earned 250 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now