Click here to Skip to main content
15,891,136 members

Comments by MoiD101 (Top 18 by date)

MoiD101 20-May-13 9:28am View    
I fixed the issue in the end, i added the
//Get the existing Comments into a string
var strCurrentStage = $(".clCurrentStage", row).text();
//Add the any existing Comments
$("select#<%=ddlPopUpEditCurrentStage.ClientID%>").val(strCurrentStage);

Just after where the dropdown options were populated. ill post it beelow
MoiD101 20-May-13 8:53am View    
i have just done this which alters it immediately the user moves over the modal container, but i fear that will happen every time they do and therefore change their selection ;
$('#PopUpTrackerEditFields').live('mouseover', function () {
//Get the existing Comments into a string
var strCurrentStage = $(".clCurrentStage", row).text();

//Add the any existing Comments
$("select#<%=ddlPopUpEditCurrentStage.ClientID%>").val(strCurrentStage);
//Dynamically add the text to the tooltip
$("#<%=ddlPopUpEditCurrentStage.ClientID%>").attr('title', 'Click to select the current stage here for ' + strCurrentStage + strPSTNNum);

});

MoiD101 20-May-13 8:45am View    
i have just noticed that if i press the DOM refresh icon on the IE dev tools window then click on the icon that shows the modal again, the dropdown now shows the correct selected string. So i need some way to refresh the dropdown just after its list has been populated to show the new value
MoiD101 20-May-13 8:38am View    
yeh i was afraid of that i was always using the correct syntax apart from i was using $("#<%=ddlPopUpEditCurrentStage.ClientID%>").val(strCurrentStage);
so it must be something else causing this not to show
MoiD101 20-May-13 8:26am View    
The content of strCurrentStage is 'Order Acknowledgment' so i want that to be showing inside the dropdown...
Below is what is renderd:

<div class="clEditFieldCurrentStageContainer">
<select id="MainContent_ddlPopUpEditCurrentStage" title="Click to select the current stage here for Order AcknowledgmentPSTN26560" name="ctl00$MainContent$ddlPopUpEditCurrentStage">
<option>Civils</option>
<option>Completed</option>
<option>Customer Delay</option>
<option>In escalation</option>
<option>Initial Planning</option>
<option>Not Set</option>
<option>Order Acknowledgment</option>
<option>Order in Progress</option>
<option>Order on Track</option>
<option>Supplier Delay</option>
<option>Wayleave</option>
</select>
</div>