I have created a form where there's an option or 2 user types.
All the data collected will be posted to my msaccess table.
I have user java servlet to link the html to msaccess table so that user can view the table.
Now I need to complete another task which is I can allow 1st user to assign 2nd user to any existing 1st users available on my database.
I hope someone can advise me how to go about doing this.
23 3004 gits 5,390
Recognized Expert Moderator Expert
it is a bit confusing ... could you please explain that a bit better or give a more detailed example for that requirement?
kind regards
I have this html form whereby user enter their information including choosing the option of usertype 1 and usertype2.
All the data collected will be posted to my msaccess table.
I have created a java servlet to link the html to msaccess table so that user can view the table.
Now I need to complete another task which is I can allow the user who view my table to assign user type 2 to any existing user type 1 in my msacess table. N this will also be show all the view table page using the servlet.
I hope the explantion is ok this time. tks.
Sorry the last sentence should read :-
When the user view the table, they can see that the assigning of usertype 2 to usertype 1 in the table also. The Ms access table will show the assigning accordinlgy also.
gits 5,390
Recognized Expert Moderator Expert
sorry ... but i don't get it yet. let me summarize what i could understand until now.
you have a webpage where you collect some data from the user. therefor the user decides to input some data for a usertype? let's say he types in some data for usertype 2 then you store the data that way. for example the user enters a name, age and gender.
what should happen now? especially whatfor are the different usertypes good? is there a hierarchy or whatever? or are the usertypes linked somehow? is there a special direction from usertype 1 to 2 and/or vice versa?
kind regards
No. The user has an option button to choose whether he wants to be a user type 1 or user type 2. the user also has to enter the rest of the data like name, gender etc.
And the rest of the story follows. Hope you can understand it now.
Here's is my html code to show you :- -
<body>
-
<form id="frmData" name="frmData" action="ProcessAddMember2"
-
method="post" >
-
<table border="1" style="width:500px;padding:3px;" table id="myTable" >
-
-
<tr>
-
<td colspan="2" class="tdTitle" >Member Registration</td>
-
</tr>
-
<tr>
-
<thead>
-
<td>Full Name</td>
-
<td><input type="text" id="txtFullName" name="txtFullName" value=""></td>
-
</thead>
-
</tr>
-
<tr>
-
<td>Email</td>
-
<td><input type="text" id="txtEmail" name="txtEmail" value=""></td>
-
</tr>
-
<tr>
-
<td>Address</td>
-
<td><input type="text" id="txtAddress" name="txtAddress" value=""></td>
-
</tr>
-
<tr>
-
<td>NRIC No</td>
-
<td><input type="text" id="txtNRIC" name="txtNRIC" value=""></td>
-
</tr>
-
<tr>
-
<td>Contact</td>
-
<td><input type="text" id="txtContact" name="txtContact" value=""></td>
-
</tr>
-
<tr>
-
<td>Gender</td>
-
<td><input type="radio" id="txtGender" value="Male" name="txtGender"/>Male
-
<input type="radio" id="txtGender" value="Female" name="txtGender"/>Female</td>
-
</tr>
-
<tr>
-
<thead>
-
<td>Type</td>
-
<td><select name="txtMember" id="txtMember">
-
<option>User type 1</option>
-
<option>User type 2</option>
-
</select>
-
</td>
-
</thead>
-
</tr>
-
<tr>
-
<td>Remarks</td>
-
<td><input type="text" id="txtRemarks" name="txtRemarks"></td>
-
<tr>
-
<td colspan="2"><div id="divMessage"></div></td>
-
</tr>
-
<tr>
-
<td align="right">
-
<td align="right"><input type="button" id="btnSubmit" name="btnSubmit" value="Submit" onclick="checkForm()"/>
-
<input id="reset" type="reset" name="reset" value="reset" onclick="clearErr();"/></td>
-
</tr>
-
</table>
-
</form>
-
</body>
-
</html>
-
gits 5,390
Recognized Expert Moderator Expert
ok ... that form collects data from a user and you add that to the database ... i understood that already ... and now: What is the rest of the story that follows from here? ... that was my question above ...
Name Email Address NRIC Contact Gender Type Remarks
Mandy Low ****@example.org null S1110432J null null null null
fdg sfg sgf sdfg sdfgd null User type1
rgfgrf null User type2
wttr wrte ertr wet ertet Female User type1
Kee Tuan Bin ****@example.org Seambawang S8439031C 98768122 Female User type2 Happy New Ye
I got this table when I run my servlet. So, the story is how do I make the user able to assign user type2 to user type1?
gits 5,390
Recognized Expert Moderator Expert what should the user assign? for example what should/wants Mandy Low do now? What should be the result ... should Mandy Low have entries for both of the usertypes so that two entries are linked? or should she just be able to update (replace) her usertype?
there will be a separate log in page to allow a staff user to assign usertype2 to mandy low who is user type 1.
gits 5,390
Recognized Expert Moderator Expert
so the staff member logs in - then chooses the Mandy Low record from a list ... the data are loaded from this record and the staff member updates the usertype? is that the goal of that all?
in case it is then you would need to create a list-control that displays the available records, let the user choose one record and insert the record's data into a form where the staff member could edit the values ... you might use a form or a grid-control for this purpose ...
Yes. That is the 1st task.
But, I'm not sure how to go about implement this list-control records things. Would be be able to advise?
What kind of codes I must modify in my html form - the one where I collect the data from user1 and user 2 as per my html form above?
I
gits 5,390
Recognized Expert Moderator Expert
there are different options to create such a list ... you might create a select-node with the user-records as options and on select of one of the records you might fill a form like the one you already have.
you could even create a table from the records, assign a click-event to the rows and then fill the form or create a input node in the clicked cell to edit the values in place - so that it is more like a grid control.
anyway i think you would need to have another page where you would have implemented this handling ... and of course you might reuse the form there ... since it would collect basicly the same data. so the 'new' thing you would need to build is the record-list from where you might choose a record.
kind regards
Frinavale 9,735
Recognized Expert Moderator Expert
Sorry, maybe I'm misunderstanding something, but how is this a JavaScript question?
-Frinny
gits 5,390
Recognized Expert Moderator Expert
Hi Frinny,
in case it deals from now on with the record-list control and events on a webpage it turns out as a JavaScript question ... probably with some ajax-based data-streams or something like this ... @the moment it is a bit unclear ... of course ...
kind regards,
gits
Hi,
Sorry I'm really new into this. Do you mind share with me any example codes that I can follow and I follow them accordingly?
Thank you.
Sorry just to check my understanding.
I have to create another page - a jsp page? to get the data from the same html form. This jsp page would have a control list - user type1 and user type 2 inside is that right?
After that when the servlet display that jsp page, it would enable the staff the do the assigning by pulling down the drop down list at user type 2 a list of all the names of usertype 1 and select the user type 1. After that, the user type 1 will appear in a separate column, is that right?
But, how to implement things like that?
acoder 16,027
Recognized Expert Moderator MVP
For the JSP code help, ask in the Java forum. Even if you're going to eventually use Ajax, you'll still need to use some server-side code to connect to the database and get the data.
Ok. I'll post it to jsp forrum. tks.
I have this form which has an option to choose between user 1 and user 2, along with other infor like name, id, address, contact etc.
Now, I need to make a log in administrator to assign user 2 to user 1 and populate it to a table for viewing.
How do I make it happen?
gits 5,390
Recognized Expert Moderator Expert
threads merged - please keep everything that is related to one issue in one thread. in case you wanted to ask something about jsp then ask in the java-forum since JavaScript doesn't have anything to do with JSP.
regards,
MOD
Seems like there's no one that can answer this question or know how.
acoder 16,027
Recognized Expert Moderator MVP
You probably meant to post this in the Java forum. Here's a link to the Java forum.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: ppcguy |
last post by:
i've got a progress bar that tracks a process running on
a server (java servlet).
i know i can refresh the page and update the status...but
this results in the page being redrawn everytime.
...
|
by: Oleg Konovalov |
last post by:
Hi,
I am trying to pass a bunch of checked checkboxes (Javascript array)
from page1 to the Java action class on subsequent web page (page2).
(on page 1 I have a bunch of DB rows with a checkbox,...
|
by: misdst23 |
last post by:
Hi,
I know I can call a static java method within javascript by using the
<% ... %tags. But how can pass a javascript variable ?
function thefunction()
{
var = javascriptvariable ;
|
by: archanagp |
last post by:
Hi,
I am trying to develop a portlet which has a javascript function which uses ajax to call a servlet in the server.
The portlet I am trying to develop is in websphere application developer.
My...
|
by: ajos |
last post by:
hi frnds,
im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception.
to verify this error ive...
| |
by: moongeegee |
last post by:
I have compile my java program as myjava.class. And I can run as "java
myjava" without any program.
As now, I need to execute myjava.class in javascript. Please shed a
light how to execut "java...
|
by: sid0404 |
last post by:
Hi
I need to send data from my servlet to my html(which contains AJAX), so as per the motivation of the AJAX, this should be done without my webpage reloading / refresh.
my code on the ajax...
|
by: ramprakashjava |
last post by:
This is index.jsp page code:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| | |