Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 03:16
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash Ecards (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  No action on clicking the submit button
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: No action on clicking the submit button  (Read 3649 times)
dhamaal
Server what's that
*
Posts: 3


Flash-db Rules


View Profile
« on: 01/16/02, 10:05 »

I tried to implement the e-card tutorial on my website. I started with all the swf cards and also have the appropriate actionscript in the first frame of one of them for test. When I choose that card, the text boxes come up. The problem starts from there.

1. The validation aint working. Even if I click on the Submit button, nothing happens.
2. If I fill in all the details properly and then click on the submit button, still nothing happens.

I have created a dir dBText and given the appropriate permissions to it too (777). But when I go back and see its contents, there is no txt file being made there. After all that I tried to execute the PHP files directly by keying in the URL. I got an error in the SendEcard.php file as

Parse error: parse error in /home/mywebsite/www/E-cards/SendEcard.php on line 2

After analysing the PHP file, one point which was not clear to me was the date function. Could someone help me on this? Is this is whatcreating the problems? Please let me know how do I correct all this so a card can be sent successfully.   Smiley
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 01/16/02, 17:01 »

1) The date function when using the U format option such as in

$CreateEcard = date(U);

Returns the number of seconds since the epoch which was some time in 1970 I think for unix.  This was used as a way to uniquely orgainize all of the text files that are being written.  You can view more information on this at: http://www.php.net/manual/en/function.date.php

2) I'm not sure why the validation and submit button is not working. The one reason that I can think of is that you changed the dynamic text field named Status to a different name and possibly changed the name of other text fields as well with out updateing the validation actionscript on the submit button to reflect those changes.  That seems like the only reason why that would not be working.

3) If the Submit button is not working then the rest of it will not work as well.  

The rest of your errors are probably due to a different setup of PHP.  I should really get around to small items to check for.  The script was set up to work in most cases but sometimes certain items in the php.ini file are changed for various reasons that will not allow the script to run properly as I have it set up.  Some of these reason's may include:

1: Your using PHP 4.1.0 on an NT server with register globals turned on.  In that case you would have to use something like:  <?php $ToName = $_Post ["ToName"]; ... .. ?>  For all of the variables.

2:  The server has has short_tags = Off in php.ini, This would mean that you would have to use <?php to start the script and not just <?

Their are a couple other's and I'll try to go over them.  The problem is probably with the server although.  And until I have a comprehensive list of different differences and possible solutions for them it's going to be hard to answer all server specific questions.

If you can't submit the vars and the script has an error their is no way that it will be writing to the text file which is the reason why they are not being created in the dbText folder.
« Last Edit: 01/16/02, 17:02 by Flash-db » Logged

-Jeff.
akimbo
Server what's that
*
Posts: 4


Flash-db Rules


View Profile Email
« Reply #2 on: 01/17/02, 04:04 »

for some reason the email isn't getting sent. the validation works and the .txt file is being created all right, so the variables are being sent to SendECard.php ok. i can't work out why the email wouldn't get sent though. any thoughts?
Logged
dhamaal
Server what's that
*
Posts: 3


Flash-db Rules


View Profile
« Reply #3 on: 01/17/02, 09:10 »

Hi Flash-db

Thanx for all ur help.  I acted on all the points and almost got everything sorted out. Except that I couldnt see the card.  Sad

Allow me to explain - The card is being sent successfully now. The email too comes fine with the proper URL. I'm able to see a text file also in the dBText directory. Everything seems fine till the time I click on the URL received in my email. When I do that, I just get a blank page. I tried to figure out the SelectCard.php file, since I thought the only thing it aint understanding is that when the number shows ENum=3 (the last thing in my URL), then it has to show me the ECard3.swf.

Please help!

Logged
akimbo
Server what's that
*
Posts: 4


Flash-db Rules


View Profile Email
« Reply #4 on: 01/17/02, 14:00 »

thanks very much. this works perfectly now...


Akimbo - are you running this locally, I think you mentioned that you where using PHP and PWS.  If that is the case you may need to configure your SMTP mail server - the same one you would specify in for example Outlook for outgoing mail.

To do this open up your PHP.ini file - located usually in the C:/ folder.  (Open with Notepad) - Then do a search for SMTP to find it faster.  Once you've found that change the SMTP setting from the default (usually localhost) to mail.yourisp.com.  You should try to use the one that your ISP gives you - but you can use others.  Change the line below that as well to reflect your own email address.  

You should then be able to send mail from the computer your running as long as you have the webserver running.  (I'm not entirely sure if this will work with PWS).  

Logged
dhamaal
Server what's that
*
Posts: 3


Flash-db Rules


View Profile
« Reply #5 on: 01/18/02, 04:36 »



Hi Flash-db

I tried to figure out the SelectCard.php file, since I thought the only thing it aint understanding is that when the number shows ENum=3 (the last thing in my URL), then it has to show me the ECard3.swf.

Please help!




Your correct - That would be a problem with the SelectCard.php file.  I'm not sure which one of the changes helped you with the previous fix - but the same items would apply here.  ENum=3 specify's the 3rd card.  The first part of this script is a switch statement.  A switch statement is the same thing as an if/then statement.  For example if ENum is equal to 3 then it will use the 3rd case.  The only thing I can think of that would cause this error is that it can not find the Ecard3.swf, or the Dimensions are missing.  

One thing you can do to test this is to have everything set up then you can just type the URL in to where the SelectCard.php script is located with Enum=3 attached to the end.  Something like www.yourserver.com/Ecards/EcardSelect.php?ENum=3 - If this does not show the Flash Ecard - let me know.  


Hi

I got things working fine now...atleast the cards are showing up. Let me tell u what the problem was. As figured out, there was a problem with the SelectCard.php file. There was no html code for the swf to be embedded in the page. Wot a silly mistake from my side. Wink

But then, this happened since on flashkit.com tutorials, (where I found this), this code aint displaying on SelectCard.php file. When I looked in more, I found out that while they have displayed the code properly using the <pre> statement, while the <object> started, they used the angle brackets instead of its equivalent. So, on those tutorials, the browser keeps on looking for that 1 item and it never finds that.

Anyways, thanks a lot for all this. This is a wonderful tutorial and hope that u write more soon. Thanx!
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!