So I have an input box in a custom pop up div that is in a hidden div on the page until the user clicks on something activating the pop up box. When the user clicks we get the html of the hidden div and add it to our popup box div which is located in the master page(MVC.)
<input type="text" id="from" name="from" value="MM/DD/YYYY" style="width: 90px;" />
If I change this field and run a script on the submission of the form
var fromDate = document.getElementById("from").value;
I still get the MM/DD/YYYY Default value and not the value I entered. Even more oddly I did an onchange event on the from field and I still get MM/DD/YYYY.
Any help would be greatly appreciated, I have no idea whats going on. Could it be that it’s still fetching the value from the hidden div?
I was filling this temporary element with a hidden div on the page. Because of this I was not returning the value in the temporary pop up but, instead, the value in the hidden div. I needed to rearrange to get it to work.