Javascript won't run inside of DIV

I have a form that submits and after it inserts, the data into my database the results results are returned using an include statement.  I have a "Please Wait" loader that is is a DIV and is hidden when the results are returned.  The problem is that when I load this into the final product the javascript does not load any longer  I am housing the pages inside of a DIV so the loader would end up being a nested DIV.  At the end of the day, I need a "Please Wait" loader to display while the user is waiting on the query results so any help is appreciated.
techguy20170Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

khsaterCommented:
Can you include some code that shows what you're trying to do?
0
HonorGodSoftware EngineerCommented:
If you are putting the javascript into the div as part of this process, you are correct.  It will not execute.

What kind of code is being loaded?  A function, a statement?

You might be able to eval() the statement.
0
techguy20170Author Commented:
I have a form that is nested in a div and uses AJAX to submit.  When the form is submitted, my returned page is a page that inserts the form data into my database.  The page also has an include which is a page the returns the new data as well as all previous that that meet the query requirements.  I need to have a "page loading..." place holder while the query is being run.  We have shared internet at my office so it is a bit difficult to get actual code to this site

The returning page is roughly structured as follows:

<DIV><LOADING IMAGE><DIV>
<INSERT STATEMENT>
<INCLUDE STATEMENT> (QUERY RESULTS)
<HIDE DIV JAVASCRIPT> (THIS DOES NOT WORK FROM THE WHEN THE PAGE IS LOADED INTO THE MAIN DIV WHERE THE FORM WAS ORIGINALLY SUBMITTED)
0
HonorGodSoftware EngineerCommented:
Ah, I would put a call to the "Hide()" routine in the Ajax callback routine, when it determines that the Ajax call is complete (i.e., when the HTTP Response readyState == 4 && the status == 200).

Does this make sense?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CWS (haripriya)Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.