Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Hi All!

I am trying to design a simple page that will show the list of usernames that are available and can be grab even if its taken already. What I am trying to achieve here is when someone grab one of the usernames, the button will turn red and will also update the name in third column cell labeled "Used By" from the text area input.

Below is my basic html code:

HTML
<table class="tftable" border="1">

  <tr bgcolor="yellow">
<td>User Name List</td><td> Status </td> <td>Used By</td>
 </tr>
  <tr>
 <td>User1 </td><td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
  </tr>

 <tr>
 <td>User2 </td><td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </tr>

 <tr>
 <td>User3 </td><td bgcolor="red"> </td><td>Troy</td>
 </tr>

 <tr>
 <td>User4 </td><td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </tr>

 <tr>
 <td>User5</td><td bgcolor="red"> </td><td>John</td>
 </tr>

 <tr>
 <td>User6<td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </td></tr>

 <tr>
 <td>User7 </td><td bgcolor="red"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </tr>

 <br>
 </br></table>
 <form>
 <select name="userlist">
 <option value="User1">User1</option>
 <option value="User2">User2</option>
 <option value="User3">User3</option>
 <option value="User4">User4</option>
 <option value="User5">User5</option>
 <option value="User6">User6</option>
 <option value="User7">User7</option>
 </select>
 <br>
 <form method="post">
 <textarea cols="20" rows="1">Type your name here</textarea>
 <br>
 <input type="button" value="Grab">
 <input type="reset" value="Reset" >
 </form>


Hope that somebody can create a simple script/code for me to update to my website as this is not available in my website creator.

Thanks in advance.
Posted
Updated 27-Aug-14 0:15am
v3
Comments
Sergey Alexandrovich Kryukov 26-Aug-14 15:54pm    
There is no such thing as "java script", because Java is not a scripting language; see also Solution 1, item #0.
—SA

Sure. Many of us can create such thing. But none will. Let's see why:
0) There is no such thing as "java script", just Javascript — which has little to do with java.
1) You can't make any GUI just with Javascript. Even if you don't add any static HTML markrup to your page, you still need HTML. So "OR" mаkеs no sense.
2) In general you can't make such an inventory just with Javascript and HTML. Since you would loose any data you enter as soon as you close your browser. So you need some storage.
3) I wrote "in general" since in HTML5 you have locladb[^]. But as it is local, the data entered on one client remains on that client. So you can't make any multi-user application this way.
4) And as soon as you need to upload data to a server, you need a server, a storage (like database server application with a database having a proper schema) and a server side custom application that handles anything about interfacing between the client and the storage - and many other things. A "website creator" is rarely suitable for such thing. You need to code!
5) At least you could have told us what are the capabilities of your website hothing server, like: what database engine you have there, what kind pf application can you run there (PHP, ASP, ASP.NET, Python, Ruby, NodeJS,…) and many other things needed to develop the server side.

So, what you requested can not't be made. But even if it could be, no one would here, because things don't work like this here. We are willing to help if you ask for help — but you want somebody to do your work. Well, we rather won't…
 
Share this answer
 
v5
Comments
Sergey Alexandrovich Kryukov 26-Aug-14 15:58pm    
Agree, a 5.
(I hope, you won't mind: there was some typo in most lines; I fixed some...)
—SA
I have let my self study java and seems I got what I need.

Thanks everyone!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900