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
Solved

getting value when page loads

Posted on 2006-11-27
1
222 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

790 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