Currently I am working on a bit of a easy setup, but I am confused how to proceed any further. I have exhausted roughly 4 hours looking for the right solution. What I basically am trying to do is pass values from the URL to an iFrame on my Sharepoint page. I setup a basic webpart page, added a content editor webpart. I then added my code in the text file and then attached my text file to the content editor webpart after uploading it to the Site Assests folder. I am still unable to get the result i need. 

I want the following to happen.

User types in the following URL: `www.sharepoint.com/home.aspx?123xyz`

The page loads and the iFrame source is updated to: `www.abc.com/123xyz`

I know in order to do this I need to use JavaScript I have attempted to use two of them listed below. Any help is greatly appreciated. 

This is the first method:

```
<script language="javascript" type="text/javascript">

  $(function() {
    var loc = window.location.toString(),
    params = loc.split('?')[1],
    iframe = document.getElementById('myIframe');
    iframe.src = 'wwww.abc.com/?' + params;
  });
</script>

<iframe name="myIframe" src="about:blank" style="position:absolute; height:100%; width:100%; border:none;"></iframe>`

```

This is the second Method: 

```
<script type="text/javascript">
  alert('test error message');
  $(function() {
    var loc = window.location.toString(),
    params = loc.split('?')[1],
    iframe = document.getElementById('myIframe');
    iframe.src = iframe.src + '?' + params;
  });
</script>

<iframe id="myIframe" src="www.abc.com/" style="position: absolute; height: 100%; width: 100%; border: none;"></iframe>`

```