Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 6th, 2025, 9:59 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: post web data problem
PostPosted: November 5th, 2004, 1:19 pm 
I have a button that, when clicked, posts web data and then initiates a further sequence of actions. It all works fine until I publish to the web (using Flex) and then my app seems to stick at the 'post web data' event. It posts the web data, but won't initiate any of the other events. Any ideas why this would happen?


Top
   
 
 Post subject:
PostPosted: November 5th, 2004, 3:16 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

This is not a known issue and I have created several Flex publications which utilise Post Web Data actions without problems.

Could you possibly attach your publication .imp file to a reply post or send the publication to Digital Workshop Technical Support at support@digitalworkshop.com and I will be happy to investigate further.

I look forward to hearing from you. Please do not hesitate to contact me if you have any further queries.

Kind regards,

_________________
Robin Garrett
Digital Workshop Technical Support


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 5th, 2004, 5:18 pm 
It is very easy to replicate. Here's what I've done (I'm away from the office so don't have the original file to hand).

1. Create a blank page
2. Create a text input box that is stored as a variable
3. Create a button that posts the variable to a php script
4. Publish this as flash, and all works 100%

Now do the same thing, but add another event to the button. So, for example, I've got another text field that is initially hidden. When I click my 'post web data' button this text should also be revealed. Works fine during preview, but when it is published as flash, the app seems to stop working after the 'post web data' event. The web data is sent, but it seems as if nothing further is initiated.


Top
   
 
 Post subject:
PostPosted: January 5th, 2005, 12:09 am 
Offline

Joined: November 12th, 2004, 3:28 pm
Posts: 34
Location: Akureyri Iceland
Hello

Is there a solution to this problem?

I am stuck on this same problem - post web data runs fine but noting more happens. The button is supposed to show a "thank you field" and send the reader to a new page after posting the data.

Jonas

_________________
Jonas Helgason
Menntaskolinn á Akureyri
Iceland


Top
 Profile  
 
 Post subject:
PostPosted: January 5th, 2005, 12:51 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

I have tried to reproduce this issue, but the Post Web Data action and all subsequent actions are processed without problems. Here is the procedure I used:

I first uploaded the following script to the document root of the web server with the filename write.php:

Code:
<?php
$emailAddress = $_POST['email'];
$filename = "subscribers.txt";
$content = "$emailAddress\n";
$fp = fopen($filename, "a");
$fw = fwrite( $fp, $content );
fclose( $fp );
?>


This script takes a parameter named 'email' (which will be sent by the publication), stores it to a variable named $emailaddress, then writes this information to a text file named 'subscribers.txt' which will be stored in the document root of the web server.

Once uploaded, I created a new publication in Opus Pro 04 and added a text input box, vector object (a simple red circle) and a button to the page.

I set the text input box to store inputted information into a new variable named 'email' (with a default blank text value).

I set the vector object to Initially Hidden.

In the button actions, I applied a Post Web Data action which sent a parameter named 'email' and the variable 'email' to the address http://localhost/write.php (I was testing this on a local web server). I then applied the changes, previewed the publication, typed an e-mail address into the text input box and clicked the button. I then checked the document root of the web server and found that the 'subscribers.txt' file had been created and contained the e-mail address I had inputted.

Knowing that the script was working, I went back into the actions of the button and applied a Show action AFTER the exisiting Post Web Data action to show the hidden vector object. I again previewed the publication and ensured that the vector object was displayed after the e-mail address was submitted.

I then published the project to Flash and tested. The publication behaved in the same way; the e-mail address was correctly stored to the 'subscribers.txt' file and the vector object was shown.

I have provided below a link to download my publication file although you may need to change the address in the Post Web Data action to test this on your system.

If you are unable to determine the cause of the problem, please forward me your publication .imp file and I will be happy to investigate further.

Kind regards,


You do not have the required permissions to view the files attached to this post.

_________________
Robin Garrett
Digital Workshop Technical Support


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 5th, 2005, 10:08 pm 
Offline

Joined: November 12th, 2004, 3:28 pm
Posts: 34
Location: Akureyri Iceland
Dear Robin

My .imp file is a big one and it would take some time for me to change it and send. - But I did a small experiment. I took your small .imp, duplicated your button and published it to my website. The only difference between the buttons is the sequence of the two actions, post web data and show the vector.
And now both buttons insert the variable into my database, but one is not showing the vector :(

I wonder if this could have something to do with the .ASP file? I know very little about .ASP, my friend is doing that part of the job. Do you want my to send you a copy of the .ASP?

I hope you can help, but this is not a big problem, I can use different buttons to do the two actions.

You can try my publication

http://www.ma.is/kenn/jonas/webdatashow.html

Jonas

_________________
Jonas Helgason
Menntaskolinn á Akureyri
Iceland


Top
 Profile  
 
 Post subject:
PostPosted: February 7th, 2005, 9:15 pm 
BUMP! BUMP!

I have noticed a very similar problem with post web data on pubs that I have been working on. Let me try to explain:

I have a die-rolling simulation that picks a random number between 1 and 20 and writes that die roll to a MySQL database using php.

What I notice is that about 20% of the time when the variable is to be written to the database via an UPDATE or an INSERT, the query does not take place. As a result I built a result check in my script that checks to see if the UPDATE has taken place and send that back to Opus so it can advance to the next action. here is my script I'm using to accomplish this in PHP:

$sk_d20_roll = $HTTP_POST_VARS['sk_d20_roll'];
$activetable = "sk_t"."$sk_table_database"."_gamestart";
//This will store the d20 die roll to the database
if($sk_action == "roll_for_first"){
$query = "UPDATE $activetable SET roll_for_first = '$sk_d20_roll' WHERE user = '$sk_username'";
$result = mysql_query($query);
// This lets Opus know that the data was set
if($result){ print"&sk_datasentver=verified";
}else{
print"&sk_datasentver=not verified";
}
}

What is supposed to happen is the &sk_datasentver=not verified should go back to Opus when for some reason the UPDATE doesn't happen. But, when I monitor the variable in OPUS, the sk_datasentver AND the UPDATE doesn't take place, I get nothing! No &sk_datasentver=not verified and no number stored in the database.

Also in Opus, I was using the sk_datasentver=not verified to loop through a POST WEB DATA action 3 more times to see if it will post the second or third time. Each iteration after the first non-UPDATE will also show NO UPDATE to database nor will sk_datasentver equal verified or not verified (it remains blank), however my sk_counter1 does increment. that tells me that the post action is not being successful every time. Here is the actions tied into my die:

Image

Another important observation!
I notice that my post web data will not WORK AT ALL unless I go into the Internet Explorer Internet Options and change the "Temporary Internet Files" >"Settings..." to "Every Visit to the page". "Automatically" just flat out does not work.

Please, there has to be something going on with the post web data action "hanging" and not letting subsequent Post actions that update or insert to a database. This software is just about perfect and a joy to use, but this issue is an extremely important one to me and others as well.

Thank You for your time!


Top
   
 
 Post subject:
PostPosted: February 7th, 2005, 11:39 pm 
WOAH WOAH! Spoke too soon!

I finally located the problem and it's NOT the post web data action. Actually, what was happening was my sk_action was sometimes getting changed before executing the post action and not doing the database update!

So it looks like the post does what it should!

Still have the probelm with the Internet Explorer options for temp files, though (see above)


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group