web design templateweb design templateweb design template

Page : 1 2 3 4

1. Insert a new layer (Choose Insert > Layer) above the layer named as 'Name Title'

2. Rename the layer as 'Thank You'

3. Select frame 2 of all the layers and Choose Insert > Blank Keyframe. Refer the image given below,

4. At frame 2 of the layer named as 'Thank You', type the following text 'Thank You for Submitting.' with the Text Tool
and in the Properties panel apply the following text settings :Text Type = Static Text, Font = Arial, Font Size = 20, Text (fill) Color = #697A94, Text Align = Align Center and Character Spacing= 0. Refer the image given below

5. Select the 'Thank You for Submitting.' text on the layer named as 'Thank You', Choose Window > Info

6. In the Info panel, set X position = 135 px and Y position = 95 px, keeping Top-Left Registration point selected.

7. Select frame 2 of the layer named as 'Background' and Choose Insert > Clear Keyframe.

1. Insert a new layer (Choose Insert > Layer) above the layer named as 'Thank You'

2. Rename the layer as 'Actions'

3. Select frame 1 on the layer named as 'Actions' and Choose Window > Actions.

4. In the Frame Actions panel type the following ActionScript as given below,

1 stop();

// Making the default setting for below mentioned textfield variables
name = "";
email = "";
suggestion = "";
//
//-------------------------------------------------------
// Submit Button action

submit.onRelease = function() {
//
//Add Path of the php file

feedbackpath = "mailto.php";
//
str1 = email.indexOf("@");
str2 = email.indexOf("@")+1;
str3 = email.charAt(str1+1);
str4 = email.lastIndexOf(".");
str5 = email.charAt(str4+1);
len = length(email);
counter = 1;
flag = 0;
while (Number(counter)<=Number(len)) {
Char = substring(email, counter, 1);
if (Char ne "@") {
flag = Number(flag)+1;
}
counter = Number(counter)+1;
}
//
//Name field validation

if (name == "") {
condition1 = "";
namemark._visible = true;
} else {
condition1 = "ok";
namemark._visible = false;
}
//E-Mail Address validation
if (str4<=str2 || str3 =="." || str5 =="" || Number(flag) != Number(len-1)) {
condition2 = "";
emailmark._visible = true;
} else {
condition2 = "ok";
emailmark._visible = false;
}
//Suggestion field validation
if (suggestion == "") {
condition3 = "";
suggestionmark._visible = true;
} else {
condition3 = "ok";
suggestionmark._visible = false;
}
//Sending data to php file only if all the above validations are fulfilled
if (condition1 == "ok" && condition2 == "ok" && condition3 == "ok") {
loadVariablesNum(feedbackpath+
"?name="+name+"&email="+email+"&feedback="+suggestion, 0);
gotoAndStop(2);
}
};
//
//-------------------------------------------------------
// Reset Button action

reset.onRelease = function() {
// Making the default setting for below mentioned textfields
name = "";
email = "";
suggestion = "";
// Making '*' Marks Invisible
namemark._visible = false;
emailmark._visible = false;
suggestionmark._visible = false;
};

 

1. Insert a new layer (Choose Insert > Layer) above the layer named as 'Thank You'

2. Rename the layer as 'Error Info'

3. At frame 1 of the layer named as 'Error Info', type the following text ' * ' Indicates an error in the Textfield with the Text Tool Refer the image given below,

4. Select frame 2 on the layer named as 'Error Info' and Choose Insert > Blank Keyframe.

5. Choose File > Save

6. Choose File > Publish

On Publishing the form.fla file it will create an form.html and form.swf files.

Php file can be created using any Text Editor Application on an Microsoft Windows platform as well as on an Mac OS platform.

We will be creating it using a Notepad Application on a Microsoft Windows platform.

1. Open a Notepad Application on a Microsoft Windows platform.

2. Write the following code as shown in the image given below and save the Notepad file (Choose File > Save ) as 'mailto.php' at the same destination where you have saved the form.fla file.

3. In the 'mailto.php' file replace the word 'dest' with the destination email address on which you want to receive the feedback messages.

4. Save the Notepad file (Choose File > Save)

1. All the files (form.html, form.swf and mailto.php) have to be uploaded on the server at the same destination.

Test the form application.

Regards,

Manoj Kotak.
The author is Director of Image Online Pvt. Ltd.
Developer of Layout Galaxy web site design templates for photoshop and Flash.

All accompanying logos, brands and product names are trademarks of their respective companies.

Blood for humans comes only from humans : Donate Blood
http://www.donate-blood.org E-mail - om@donate-blood.org

© Image Online  2001-2003