-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
264 lines (255 loc) · 9.18 KB
/
index.html
File metadata and controls
264 lines (255 loc) · 9.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<html>
<head>
<meta charset="UTF-8" />
<meta
name="”description”"
content=" show modal when user selects the option and Passing select table value in textareaa field from modal via JavaScript | Javascript"
/>
<meta
name="keywords"
content="HTML, CSS, JavaScript,Jquery,bootstrap,modal,padding value in field,table"
/>
<meta name="author" content="Radwan Anik | Radwan Ahmed" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous"
/>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<div class="container">
<h1>Example for show modal when user selects the option and Passing select table value in textarea field from modal via JavaScript | Javascript</h1>
<div class="row">
<div class="col-md-12 col-lg-12">
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="control-label req"
>Item Type<span class="error-start">*</span></label
>
<select
id="ItemType"
name="ItemType"
class="form-control form-control-border req"
>
<option value="">-- Select --</option>
<option value="test">test 1</option>
<option value="test">test 2</option>
</select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="control-label req"
>Quantity <span class="error-start">*</span></label
>
<input
id="quantity"
name="quantity"
value=""
type="text"
class="form-control req"
placeholder="quantity"
/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="control-label req"
>UoM <span class="error-start">*</span></label
>
<input
id="uom"
name="uom"
value=""
type="text"
class="form-control req"
placeholder="uom"
/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="control-label req"
>Requested Date<span class="error-start">*</span>
</label>
<input
name="requisitionDate"
value=""
id="requisitionDate"
class="
form-control form-control-inline
input-medium
default-date-picker
"
size="16"
type="date"
placeholder="Requisition Date"
/>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label req"
>Location <span class="error-start">*</span></label
>
<input
id="location"
name="location"
value=""
type="text"
class="form-control req"
placeholder="Location"
/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label req"
>Purpose <span class="error-start">*</span></label
>
<textarea
id="purpose"
name="purpose"
value=""
type="text"
class="purposeField form-control req"
placeholder="purpose"
rows="5"
></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label req"
>Item Description <span class="error-start">*</span></label
>
<textarea
id="itemDescription"
name="itemDescription"
value=""
type="text"
class="descriptionField form-control req"
placeholder="purpose"
rows="5"
></textarea>
</div>
</div>
<div class="col-md-12">
<button type="button" class="btn btn-primary add-inventory-Btn">
Add
</button>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="" style="margin-top: 20px">
<div class="">
<table class="table table-bordered">
<thead>
<tr>
<th scope="col" style="width: 5%">#</th>
<th scope="col" style="width: 20%">Item Type</th>
<th scope="col" style="width: 10%">Location</th>
<th scope="col" style="width: 10%">Quantity</th>
<th scope="col" style="width: 5%">UoM</th>
<th scope="col" style="width: 8%">Requested Date</th>
<th scope="col" style="width: 22%">Purpose</th>
<th scope="col" style="width: 25%">Item Description</th>
<th scope="col" style="width: 5%">Action</th>
</tr>
</thead>
<tbody id="showTable"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<button type="submit" class="btn btn-primary submit-inventory-Btn">
submit
</button>
</div>
</div>
</div>
<!-- Modal Based on Item Type Select -->
<div
class="modal fade"
id="PurposeModal"
tabindex="-1"
role="dialog"
aria-labelledby="myModalLabel"
>
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">Purpose Modal</h4>
</div>
<div class="modal-body">
<div class="purpose-type-modal-content">
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table
id="purposeTable"
class="table table-bordered table-striped"
>
<thead>
<th width="5%">#</th>
<th>Purpose</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td><input type="checkbox" class="checkthis" /></td>
<td class="purpose-row">Mohsin</td>
<td class="description-row">Irshad</td>
</tr>
<tr>
<td><input type="checkbox" class="checkthis" /></td>
<td class="purpose-row">fsdf</td>
<td class="description-row">Irshad</td>
</tr>
<tr>
<td><input type="checkbox" class="checkthis" /></td>
<td class="purpose-row">Mosdfsdhsin</td>
<td class="description-row">Irshad</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
Close
</button>
<button type="submit" id="purposeAddBtn" class="btn btn-primary">
Add
</button>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"
></script>
<script src="script.js"></script>
</body>
</html>