hi i am using a flash form whats the quickest way to get it to send the info to an email address without using serverside, can you give me the script i need for the btn etc many thanks
on (release){ getURL ("mailto:" +recipient+ "?cc=" + cc + "&subject=" + subject + "&body=" +body) }
Hi i have tried this but i cant get it to work have i typed correctly code below on (release){ getURL ("mailto:" macca2424@hotmail.com "?cc=" macca2424@tiscali.co.uk "&subject=" Website Enquiry "&body=" +body) }
whereever you have a string you need to enclose that string in quotes. where you have a variable (like body) you need no quotes. try: on (release) { getURL("mailto:"+"macca2424@hotmail.com"+"?cc="+"macca2424@tiscali.co.uk"+"&sub ject="+"Website Enquiry"+"&body="+body); } or on (release) { getURL("mailto:macca2424@hotmail.com?cc=macca2424@tiscali.co.uk&subject=Website Enquiry&body="+body); } where body is a string defined in your flash before that release handler is executed.
ok i have tried both of these all i keep getting is another browser that opens with yahoo mail any ideas?
yes, that code must be attached to a button or movieclip. if you're not seeing your default email client opening with the proper fields filled-out it is because of an issue with your local system. that may not be a problem: you probably don't have a default email client that is designated to load when an email function is needed.
ok i understand now so when a user presses the submit btn they then have to send the enquiry using outlook? on the body how do i seperate each item so they apear under eachother in the email ie name address etc
yes, using getURL employs the users email client. that can be a problem, as in your case, where a user has no client. the more reliable alternative is to use a server-side email program, but i know you wanted to avoid that. sometimes you need to url encode symbols to communicate between flash and text files. to encode a line feed use %0a in place of \r and \n: body = body.split("\r").join("%0a").split("\n").join("%0a"); if body is the variable associated with an input text field you might want to use a different variable name for this "new" variable or, at least, remove that textfield from the stage so the user doesn't see his message get garbled.
so how would i code it if i had name,address,address2,tel,email,enquiry? would it be: body = body.split("name").join("address").split("address2").join("tel".split("email".jo in("enquiry); so they list underneath each other
enquiry = enquiry.split("\r").join("%0a").split("\n").join("%0a"); address=address.split("\r").join("%0a").split("\n").join("%0a"); address2=address2.split("\r").join("%0a").split("\n").join("%0a"); body=name+"%0a%0a"+address+"%0a%0a"+address2+"%0a%0a"+tel+"%0a%0a"+email+"%0a%0a "+enquiry this would put a line feed for each new line/paragraph in flash and put a double line feed between name, address, address2 etc
Don't see what you're looking for? Try a search.
|