last day (15 days later) » 

12:33
0
Q: Depending on selecting value from dropdown show the checked mark for the particular selected value in grid list in javascript

sureshHi guys i have ticket source dropdown list and when i select one ticket source from dropdown and click on add it will add the particular ticket in below grid list But what happened here if i select some ticket source from dropdown it is selecting different ticket source in grid list. Means for...

could you create a plnkr or jsfiddle for the same. Unable to get your question.
jsfiddle.net/ev40d6oj you can check this
At least you can paste html code. Unable to get what is happenning in if condition. Maybe your html is not rendering correctly.
could you paste your generated html code on same fiddle? You can copy html code from inspecting element.
Sorry, you have pasted main source code. Please paste your generated code from the browser.
check this na jsfiddle.net/ev40d6oj/4/..is it okay or do u want more
your code is perfect.
12:33
But it is showing the wrong value which i have selected from dropdown.
Hi
Let me show u image
I think got solution
change your if condition like $('#ticketId-' + order['orderId']).prop('checked', true);
12:34
Okay
check now and let me know
Check my 2 images in my first image i have selected argus but it is selecting another one..it should select argus in table list
No its not working..now its not selecting anything
hmm
I think you are passing wrong ticket id in the option
12:39
where?
ok change above code like this: $('#ticketId-' + order[orderId]).prop('checked', true);
/**
* Set ticket id to order object
*
* @param {integer} ticketId
* @returns {undefined}
*/
function setTicketIdToOrder(ticketId)
{
order.requestTicketId = ticketId;
}
no no
in if condition change code like above
Okay
i am just showing you code
12:41
No its not working..now its not selecting anything
ok do one thing
Haa
in function getOrderTicketDetails do following changes
console.log(orderId, order['requestTicketId'], order[orderId])
in if condition paste this code and tell me what is output on your console
12:44
ok
172081 2966224 undefined
this is my url
Yes I got your problem
Ha whats that
your id is wrong with everytime
orderid?
now you inspect the element of dropdown and tell me what is your selected element's id
12:47
which one i shoudl inspect?
The main dropdown from table's upper corner
@suresh Uanble to open this link
yeah thats local
ha ha ha
I didn't understand which one can u please write code and show me
@Laxminarayan ha ha ha
you have one dropdown which you are selecting and then you are checking checkbox, right?
12:49
yes
and that dropdown's id and the radio item's ids are same?
so you want me to show the dropdown list in inspec
yes but tell me the answer of above question.
this is my select box values <select id="ticketSource">
<option value="">--Select--</option>
<option value=""></option>
<option value="2dehands">2dehands</option>
<option value="Aanbieding">Aanbieding</option>
<option value="African Bulletin">African Bulletin</option>
<option value="African Courier">African Courier</option>
<option value="Agritrader">Agritrader</option>
<option value="Akafi">Akafi</option>
<option value="[email protected]">[email protected]</option>
<option value="Argus">Argus</option>
ok
do one more thing paste your order array also
12:51
let me show you table values
order array?
<div class="basGrid"><table id="bvbGridTable" cellspacing="0" cellpadding="0" align="center">
<thead><tr> <th></th>
<th dragposition="1" dragcolumnname="source"><a href="javascript:gridAjax('orderTicket','order/customer/ticket-details/orderId/172081/contactId/5226577/gridmodorderTicket/ajax/_zfgid/orderTicket/orderorderTicket/source_ASC/') "><span>Source</span></a></th>
<th dragposition="2" dragcolumnname="subject"><a href="javascript:gridAjax('orderTicket','order/customer/ticket-details/orderId/172081/contactId/5226577/gridmodorderTicket/ajax/_zfgid/orderTicket/orderorderTicket/subject_
In if condition you have written code like this: $("#ticketId-" + order['requestTicketId']).prop('checked', true);
then what is order[] here
Actually thats existing code so am little bit confused of that where that is coming..
Hey, It's time to leave office
so simple console order and paste here
12:53
hey please help me to solve this na
console.log(order);
??
yes
in if condition
actionAllowedInsidesales: 0

actionAllowedTransport: 0

actionAllowedWorkshop: 0

bondDeposit: null

bondDepositDate: null

bondDepositMethod: 0

cmr: "/v1/order/172081/cmr"

conceptbilloflading: "/v1/order/172081/conceptbilloflading"

contact: Object { id: 5226583 }

createdAt: "Thu, 01 Nov 2018 12:54:52 +0100"

createdBy: 303

currency: "EUR"

deliveryCity: null

deliveryContactEmail: null

deliveryContactName: null

deliveryContactPhone: null

deliveryCountry: null

deliverydocument: "/v1/order/172081/deliverydocument"
Hey, it's complicated share your personal details here. I will contact you directly.
Okay so what is the exact problem
I will definitely help you.
actually you are passing wrong data in if condition. That's it.
Share your email. I will contact you there and we will have a look at your code.
ok
I will call you at 9 o'clock today
from my personal gmail. And don
and don't worry 100% we will solve this issue together. Is it ok?
because my office is closing now. Sorry for that
By that i cant be accesible..i will leave ofc..and i cant take this code to my home
Its okay
will see tomorrow.
if it is possible then I can do it for today night but if you want tomorrow it is not possible because from office laptop I can't help you to take call or contact your personal email id
Okay i will be avialble here up to 8
in the mean while you can
its okay
Sorry, I have some planned something upto 9 and I can't miss it
That's why
If possible I will login again and have discussion
13:03
its okay
okay
But personally i will call you on your gmail at 9 today
ok?
bye byer
not sure
bye bye
Hi
Are you there?
Check your hangout

last day (15 days later) »