Bruce Gust
asked on
How can I load this text into a div?
So I've got a function in PHP. If no records are found as a result of a SELECT statement, then right now, the syntax I'm working on has this:
echo "We were unable to match the info you provided.";
I want to instead, load some text via JQuery into a div. Right now, I've got this:
echo "<script>$('#header_text') .html('We were unable to match the information you provided.\n Please try again.');</script>";
It's not working. I think I know why in that what I've got currently is something that's put in motion by an action of some kind. A click, a button - something. Without that "event," I don't have anything.
Let me know if that's accurate and, if you would, also tell me how I can use JQuery to load some new text into the <div> rather than simply echoing a message.
Thanks!
echo "We were unable to match the info you provided.";
I want to instead, load some text via JQuery into a div. Right now, I've got this:
echo "<script>$('#header_text')
It's not working. I think I know why in that what I've got currently is something that's put in motion by an action of some kind. A click, a button - something. Without that "event," I don't have anything.
Let me know if that's accurate and, if you would, also tell me how I can use JQuery to load some new text into the <div> rather than simply echoing a message.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!