Jump to content

Use <span> inside script


JoshWelford

Recommended Posts

Sorry, I didn't explain too well.

 

I want to do this: <script type="text/javascript"><span id="Response"></span></script>

 

The span will be filled with one of two variables from an Ajax request.

 

If something was inserted into a database echo "success()"

Or if there was an error echo "error();"

 

The function's are filled with notification-like messages.

 

So if the script is "success()" show the success notification

however if it's "error()" show the error notification.

 

Hope I cleared things up.

Link to comment
https://forums.phpfreaks.com/topic/274346-use-inside-script/#findComment-1411789
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.