Scenario:

I am receiving variables, temp1,temp2 etc from a different page, say Page1, and grabbing it on
Page 2. The Page 2 has the following code and its main goal is to grab a HTML template and
insert it into an editor.

Code:
<script>
$.extend({
    getUrlVars: function(){
        var vars = [], hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for(var i = 0; i < hashes.length; i++){
            hash = hashes[i].split('=');
            vars.push(hash[0]);
            vars[hash[0]] = hash[1];
        }
        return vars;
    }
})
var button = $.getUrlVars()['button'];

$("#temp1").click(function() {
    $("#sTinyMceEditorId").load("Folder/firsttemplate.html");
});
</script>

<script>
$("#temp2").click(function() {
    $("#sTinyMceEditorId").load("Folder/secondtemplate.html");
});
</script>

<script>
$("#temp3").click(function() {
    $("#sTinyMceEditorId").load("Folder/thirdtemplate.html");
});
</script>
Here is how I have defined my editor:

My editor is defined like the following on Page 2.

Code:
<div class="field">

 <textarea id="sTextBody" name="sTextBody" style="width:948px; max-width:948px; height: 70%"></textarea>
</div>
Here are the relevant Page 1 contents which could help in understanding above code:
Code:
<div id="templatesWrap">
    <div class="template" data-templatelocation="templateone" data-templatename="Template ONE" data-templateid="" >
     <div class="templateContainer">
     <span>
      <a href="" title="Use Template">
    <img class="thumbnail" src="templatefiles/thumbnail_010.jpg" alt="templateone">
    </a>
    </span>
        <div class="templateName">Template ONE</div>
                <p>
        <a href="URL_for_page2?button?=temp1" title="Use Template" class="button secondary" id="temp1">Use Template</a>
                </p>
        </div>
    </div>


 <div class="template" data-templatelocation="templatetwo" data-templatename="Template TWO" data-templateid="" >
    <div class="templateContainer">
    <span>
     <a href="" title="Use Template">
    <img class="thumbnail" src="templatefiles/thumbnail_011.jpg" alt="templatetwo">
    </a>
    </span>
    <div class="templateName">Template TWO</div>
    <p>
    <a href="URL_for_page2?button?=temp2" title="Use Template" class="button secondary" id="temp2">Use Template</a>
    </p>
    </div>

Could anyone please tell me what could be the problem? I am working on this issue for so many days but still it's not working.
Please let me know if you need more clarifications.

P.S: I have included the proper jQuery link while using above jQuery functions and I am using TinyMCE 4.0.8 version

Thanks