Howdy,
I’m working on developing a Google Maps plug-in, which is working quite well. What I currently need, though, is some way to know how many times my module has been called on the same page. I’ve searched this site all through, and haven’t found a thing.
The general gist is this:
{exp:mapper id="testMap1"}
{exp:mapper id="testMap1"}
{exp:mapper id="testMap2"}
I want to know, when the mapper module is called, how many times it’s been previously run.
Perhaps a global of some kind? I tried declaring one, but it didn’t seem to persist.
Thanks for the input!
-Daniel
New question.
So I’m trying to write out JavaScript code, but on every additional call of the module, I need to modify some early written/rendered output. Any thoughts on how to do this? I’m searching through the documentation looking for a way to access previous output, but no luck yet.
If I knew when the last time my module would be called is, I could just create my final Javascript code version during that time.
The code looks something like:
<script type="text/javascript">
function init()
{
Drawbox("div1");
Drawbox("div2");
Drawbox("div3");
}
</script>
When my first call comes along, it would output this:
<script type="text/javascript">
function init()
{
Drawbox("div1");
}
</script>
Second time:
<script type="text/javascript">
function init()
{
Drawbox("div1");
Drawbox("div2");
}
</script>
And the third time would be like I first showed the example.
I’m not sure I can do that. 😕
I’m going to look into some JavaScript get workarounds for now. 😊
Thanks!
-Daniel
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.