Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

getting value when page loads

Posted on 2006-11-27
1
Medium Priority
?
245 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

Independent Software Vendors: 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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

618 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