Here's a brief rundown of my issue:
but when I press the "Make My Notes" button that calls the function, it grabs the variables, hits my alert to dump the variables to make sure its working, then outputs to the form field I want it to... however, IMMEDIATELY after the function completes, it clears itself. By itself, I mean the whole form clears, including the outputArea.
I've checked my source numerous times and there are 0 references to a reset button or anything that should be clearing these values after the function is called, so I'm at a loss.
Below is my function:
the button that calls the function is simply:
and the output field:
<textarea name="outputArea" id="outputArea" onClick="this.select();" readonly="yes"></textarea>
I've done this tons before and actually have an application with a similar method running and working fine right now, so I'm completely baffled. What in the heck am I doing wrong here?
I greatly appreciate anyone taking time looking into this for me. Cheers!
This actually looks to me like your page is refreshing itself because the button is performing a submit action. Change your onClick event to this:
onClick="getNotes(); return false;"
Because this is generating a POST request (probably to itself), the page is loading as if for the first time.