« first day (2031 days earlier)      last day (2086 days later) » 

 
3 hours later…
11:30
1 message moved from JavaScript
11:41
@CapricaSix Sorry for telling you to shut it earlier
request = require('request');
request.get(url, (err, res, body) => {
     // How do I use '.findElementById' on the received DOM?
})
1 message moved from JavaScript
request = require('request');
request.get(url, (err, res, body) => {
// How do I use '.findElementById' on the received DOM?
})

'Body.findElementsById ' doesn't work
1 message moved from JavaScript
 
1 hour later…
13:50
[
{
"id": 1,
"ptype_id": "P01",
"ptype_name": "By Cash"
},
{
"id": 2,
"ptype_id": "P02",
"ptype_name": "By Card"
},
{
"id": 3,
"ptype_id": "P03",
"ptype_name": "By IMPS [Paypal or Others]"
},
{
"id": 4,
"ptype_id": "P04",
"ptype_name": "Western Union Money Transfer"
}
]


so this is my thing --
I have a select list which is being bound with data from db. the data format you can see above which is being returned by my web api. and subsequently I am binding it to my list.
Now
upon select change, I want to get the id(value) as well as the selected text.... my code isn't working... I am only ge
1 message moved from JavaScript
this is how I bound my select list --

<select (change)="onSelectPayment($event)" style="height:42px">
<option value="0">--- Select ---</option>
<option *ngFor="let p of payments" [value]="p.id">
{{p.ptype_name}}
</option>
</select>
1 message moved from JavaScript
14:45
@rlemon I created a stackblitz for my issue also, can you take a look,
?
https://stackblitz.com/edit/angular-dntfvm
1 message moved from JavaScript
15:00
this.selectedP_id = pay_Id;
for (var i = 0; i < this.payments.length; i++) {
if (this.payments[i].Id == pay_Id) {
this.selectedPayment = this.payments[i];
this.selectedPName = this.selectedPayment.ptype_name;
}
}
1 message moved from JavaScript
 
5 hours later…
 
2 hours later…
 
2 hours later…

« first day (2031 days earlier)      last day (2086 days later) »