By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,116 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

Generate unique random number perform insert,update,delete show into text box value?

P: 12
I need to generate unique random number to show into the text box value and also perform insert,delete,update operation using java script. I need your solution which is better way using mysql or java script.? I'm trying java script and facing problem i could not show unique id.?

java script code:
Expand|Select|Wrap|Line Numbers
  1. document.getElementbyId("random").value=Math.floor(Math.random()*10);
  2.  
May 12 '14 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
javaScript cannot directly communicate with a (server-side) DB. client-side JavaScript needs a server-side language that does all the DB work and for server-side JavaScript you’ll need to look what your DB driver library offers.
May 12 '14 #2

Exequiel
100+
P: 287
u can use ajax . . .
May 14 '14 #3

Post your reply

Sign in to post your reply or Sign up for a free account.