Access element, which contains current <script>
<p>I've got following page:</p>

<pre><code>&lt;div&gt;&lt;script&gt;AddSomeContent(??, 1)&lt;/script&gt;&lt;/div&gt;
&lt;div&gt;&lt;script&gt;AddSomeContent(??, 2)&lt;/script&gt;&lt;/div&gt;
</code></pre>

<p>I need to replace the <code>??</code> with the surrounding <code>&lt;div&gt;</code> DOM object, so the function <code>AddSomeContent</code> can modify it. Is there any oportunity to do this?</p>

<p>Before any other comments: I don't have any other option. I'm already trying to hack some existing page, and only thing I can control is content of the <code>&lt;script&gt;</code>. </p>

<p>I'm using jquery, but I can change it.</p>

<p>Edit: for clarification. <code>AddSomeContent</code> looks like:</p>

<pre><code>function AddSomeContent(somediv, parameter)
{
     $(somediv).append('there goes some data, that I dynamically create from some stuff depending on the parameter');
}
</code></pre>

<p>And I want to first div contain result with <code>parameter = 1</code>, second div <code>parameter=2</code></p>
