Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 5th, 2012, 01:56 PM
Trena Trena is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 1 Trena User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 41 sec
Reputation Power: 0
HTML and Coldfusion

I am tring to create a random string (unique string), place that string in a hidden field, save it to a table and then pass it and use it in another form. I'm trying to do this with an HTML form and a cold fusion form.

This is what I have so far but, it's not creating the random string. I call randomString when I load the form.

<script language="javascript" type="text/javascript">
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmno pqrstuvwxyz";
var string_length = 8;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.testform.UniqueNum.value = randomstring;
}
</script>

<input name="UniqueNum" id="UniqueNum" type="hidden" value="#UniqueNum#">


This is what I have on the ColdFusion side.

<cfif isdefined("form.UniqueNum") and len(form.UniqueNum)>
#form.UniqueNum#<br>
</cfif>

Thanks.

Reply With Quote
  #2  
Old January 19th, 2013, 09:28 PM
Dan5ielle Dan5ielle is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 4 Dan5ielle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 32 sec
Reputation Power: 0
This is what I have so far but, it's not creating the random string.
URL
URL
URL
URL
URL

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > HTML and Coldfusion


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap