1. For some reason the error message is not expanding to page full width, it only expands to about 60% of my screen 1920 x 1200.

2. i would like to implement it not by clicking links but by when a certain url is loaded ex.
index.php?id=2&success=s1
index.php?id=2&success=s2
index.php?id=2&error=e0
index.php?id=2&error=e1
index.php?id=2&error=e2

Edit..
Rereading your code you are seperating the types of message (in the url), you should only need one var for the message type to be shown. Maybe a little rethinking of how you are returning the message - shouldn't matter if it's an error or success - you just need the message code returned.

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…

The viewer will learn the basics of jQuery, including how to invoke it on a web page.
Reference your jQuery libraries: (CODE)
Include your new external js/jQuery file: (CODE)
Write your first lines of code to setup your site for jQuery.: (CODE)