Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 14
Registered: ‎07-17-2012
My Device: 8520 curve
My Carrier: vodafone

mailto funtion opens a blank email

Hi,

 

We receive an HTML Approval form as an attachment in the email generated from the System for different transactions. In which approver can select the appropriate approval action and submit it. This approval form works perfectly in all the web browsers (that i have tested like IE-6,7,8,9,Firefox,Chrome) but not in blackberry browsers. When checked the source code of the HTML form, i found that it is using mailto function in the form to submit the approval response to the defined email id in mailto link. Based on that i have also developed a simple HTML form for testing purpose which is also behaving same as the Approval HTML form. Can anbody tell me where the things are going wrong. We are using Blackberry 8520 curve, OS 5. The same form works perfectly in Blackberry 9800 OS 6.

 

Below is the HTML code of  sample form that i have developed:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>

<body>


<form action="mailto:testing@testing.com" method="post" name="emcForm" id="emcForm" enctype="multipart/form-data">

EMail: <input type="text" name="email">

Subject: <input type="text" name="subject">

Message: <textarea rows="5" cols="30" name="message"></textarea>

<input type="submit"  value="send" />

</form>

</body>

</html>

 

Any help will be reallu appreciated.... Moreover.. I'm a PeopleSoft Developer so any help related with HTML will be helpful for me.

 

Regards,

 

Subhash

Developer
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: mailto funtion opens a blank email

The simplest answer is that mailto action in forms in not supported in OS 5.0. This uri type is not mentioned in browser documentation. You can find HTML subset supported in 5.0 here:

 

http://docs.blackberry.com/en/developers/subcategories/?userType=21&category=BlackBerry+Browser

 

Selecting OS as 5.0, it looks like the higher oses documentation has some issues and is unavailable.

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Contributor
Posts: 14
Registered: ‎07-17-2012
My Device: 8520 curve
My Carrier: vodafone

Re: mailto funtion opens a blank email

Thanks for your quick reply... I tried to achieve the same with javascript as well but when i am clicking on submit button nothing happens. Here's the HTML Code:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>JavaScript Example 18.1: Send Email</title>
</head>

&lt;script language="javascript" type="text/javascript">

function sendMail(form){
emailAdd=mailform.emailbox.value;
location.href='mailto:test@test.COM?Subject=Approval Response&body=emcGuid=219945121797965548201713028487' +'Email Address:'+ document.mailform.emailbox.value ;

}




&lt;/script&gt;
<body>
<form name="mailform" id="mailform" onsubmit="sendMail()">
email address:<input name="emailbox" id="emailbox" type="text" value="">
<input type="submit" value="Send email">
</form>
</body>

</html>

Could you please tell me, what's wrong with this code.. As far as i know Blackberry supports javascript.

Regards

Subhash
Contributor
Posts: 14
Registered: ‎07-17-2012
My Device: 8520 curve
My Carrier: vodafone

Re: mailto funtion opens a blank email

one more thing which forgot to mention related to my 1st HTM example is that when i clicking on the submit button its opening the email compose box to send the mail but with blank email body. So my assumption is mailto is working but upto some extent. Somebody told me that it's populating the mail body because of MIME type. Could you please throw some light on it.

Regards

Subhash
Highlighted
Developer
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: mailto funtion opens a blank email

Maybe. Try to use other mime types. I was guessing that support for mailto may be limited in oldest phone models, and they may not support sending forms as mails.

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications