Since you are adding html content as
jsp tag is a server side code so it won't get executed at client side.
One way to achive the same you you get the whole html of Page1.html through ajax call and place inside the div if data[0].ReferenceType is Table1. This will do the job.