Rank: Member
Groups: Member
Joined: 7/22/2006(UTC) Posts: 3
|
Hi, I'm using php ajax as the framework for my site. When someone creates a new entry, an ID is created, that connects the pictures with data. After uploading pictures i want to forward them to the page that corresponds with that ID. I don't know the ID when I load the applet on the page and i haven't figured out a way to update the RedirectUrl in a meaningful way. EX. user's create entries at post.php then after the process is complete they should be forwarded to post.php?id=x, where x is the ID created in the post process I saw this post and thought it might help, but i can't find any functions listed that will update the RedirectUrl. http://www.aurigma.com/Forums/Topic3798-12-1.aspxI've also tried modifying the RedirectUrl attribute of the embed tag, but that doesn't seem to affect the java applet. Lastly, i thought maybe you posted values to the page in the RedirectUrl attribute, but that did not seem to be the case. I can't think of anything else, and would appreciate it if someone could let me know how to do change this behavior.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Hello, First of all please read Handling Upload Completion topic. In short you can handle upload completion using Progress event. In its event handler you can get access to the server response using StatusText param. So way during upload processing (upload.php) you can return the entry ID: And then redirect to it from the client code: Code:<script type="text/javascript" src="iuembed.js"></script>
<script type="text/javascript">
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText)
{
if (Status=="COMPLETE"){
[b]window.location = "viewmyentry.php?ID=" + StatusText;[/b]
}
}
var iu = new ImageUploaderWriter("ImageUploader", 710, 500);
//...Any other params or event handlers...
iu.addEventListener("Progress", "ImageUploader_Progress");
//...
iu.writeHtml();
</script>
Please note, that server response can contain some white spaces except your explicit output. Edited by user Wednesday, October 29, 2008 1:52:16 PM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/22/2006(UTC) Posts: 3
|
Thanks, yeah... i feel pretty retarted. I have spent hours looking at the documentation and seemed to have missed this section entirely. Anyway, works great now.
-matt
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.