I need a little help with just a jquery implementation on a particular scenario. Actually I’m a little unsure/mixed up with the concept/what to do in the case I’m about to describe, that’s why asking.
Basically, I have a page, where I have a dropdown list. Also a span tag. Now, on the document ready event I’m executing some jquery, filling up the dropdown with items fetched from database; also setting the text of the span tag to the first item from the dropdown. The flow of my application requires that I execute another jquery call to a server side method once the page is steadily loaded, by taking the text value of that span tag. Appears pretty simple. But the thing is, no matter what I try to do, my jquery code always picks null/blank from the span tag text even though text is very much there. I’ve tried to put this 2nd block of jquery ajax call inside window.load, window.onload, document.onload and all kinds of other things hoping that one will work [trial and error basically]. But none have actually. That’s the catch. It’s a mystery. Why on earth it fails to pick up the text from that span tag, is the most weird mystery to me.I’m posting the relevant code blocks for what I did. This is what I have so far.