Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Question on Javascript Callback parameter
https://www.tinywebgallery.com/forum/viewtopic.php?f=13&t=2655
Page 1 of 1

Author:  darinh [ 27. Jul 2010, 16:45 ]
Post subject:  Question on Javascript Callback parameter

Hello,

I have looked at the documentation for using the javascript callbacks and I have a few of questions question for using this from the mambot/plugin perspective.

I am not sure where to find the "loc" parameter in the config. The documentation says "loc is the parameter you provide in the config!". I'm just not sure what parameter to be looking to be using.

In the example it shows "alert(loc);". Is the following valid alert("Upload Finished");

Here is what my code looks like so far:
<h3 style="text-align: center;">Please Upload your files prior to completing the submission form.</h3>
<p>{joomla_flash_uploader type=1 id=2}</p>
<script type="text/javascript">
function uploadFinished(loc) {
alert("Upload Finished");
}
</script>
<hr />
{rsform 25}
<p>Required fields - (*)</p>
<p> </p>
<hr />

Thanks

Author:  TinyWebGallery [ 27. Jul 2010, 17:12 ]
Post subject: 

loc is the parameter you provide in the config. I sometimes e.g. use staus.php there and then load the status with from the server. You find a working example on the tfu demo for registered users...

- Michael

Author:  darinh [ 27. Jul 2010, 18:05 ]
Post subject: 

I'm still confused on the correct setup.

So in the "Registered Flash Uploader settings" tab on a specific configuration setting. In the "Enable Javascript upload call" parameter you have "status.php" entered.

Then there is a php file called "status.php" in the correct directory which is coded to display some information, correct?

So then the javascript should look like "function uploadFinished(loc)", correct?

In the end I'd like to have happen is just have an alert box display telling the user the uploads have completed and I'm not sure how to do this based on the example.

Author:  TinyWebGallery [ 27. Jul 2010, 18:11 ]
Post subject: 

If you don't need to use the parameter. In you case you can enter what you want there. If something is entered the the Javascript is called.
E.g. the parameter is nice if you have 2 profiles and want to do something different there...
I always use status.php which is loaded from the server and displayed aome extra information. Like in the registered demo...

- Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/