Ok so I'm dumb. I needed to use a callback function when I use load to make sure the load is done first, the it worked.
On Jul 6, 11:09 am, Erich93063 <erich93...@gmail.com> wrote: > I have a div on my site that I am populating with a "load" that gets > some html from another file on the server. This included file has a > div on it that I want to now reference and populate with the value of > a hidden form field on the page doing the loading, but when I do it, > it looks like nothing is happening. > > code: > > //load data from external file into generalInfoData div > $('#generalInfoData').load('_displayGeneralInfo.cfm'); > > //_displayGeneralInfo.cfm contains an empty div with ID homePhone > > //the calling page has a hidden form field with an ID of homePhoneData > var temp = $('#homePhoneData').val(); > > //when I try to set the homePhone divs html to that of the hidden form > field, nothing happens > $('#homePhone').html(temp); > > Is this a timing issue? Where the code that tries to populate the div > fires before the included file is actually there yet?