Using Dotmailer with Mojoportal

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/30/2012 1:25:06 PM
Gravatar
Total Posts 167

Using Dotmailer with Mojoportal

I I was looking at using a tool called dotmailer within mojoportal.

On creating a signup form through this tool they provide source code to embed into the your site. However there appears to be a conflict with the form submission and the mojoportal page which prevents the form from being submitted.

I would really appreciate if anyone can see where this conflict may be. below is the source code.

(I appreciate Mojoportal has an excellent newsletter system, but would really like to offer this functionality if possible to my sites)

<!-- Start of signup --><script language="javascript"> <!-- function validate_signup(frm) {  var emailAddress = frm.Email.value;  var errorString = '';  if (emailAddress == '' || emailAddress.indexOf('@') == -1) {   errorString = 'Please enter your email address';  }

var isError = false;     if (errorString.length > 0)         isError = true;

if (isError)         alert(errorString);  return !isError; }

//--> </script>

<form action="http://smart-news.co.uk/signup.ashx" id="signup" method="post" name="signup" onsubmit="return validate_signup(this)">  

<input name="addressbookid" type="hidden" value="508573" /> <!-- UserID - required field, do not remove --><input name="userid" type="hidden" value="49281" />

<!-- ReturnURL - when the user hits submit, they'll get sent here --><input name="ReturnURL" type="hidden" value="http://" />

<!-- Email - the user's email address -->  

<table>   <tbody>    <tr>     <td>      Email</td>     

<td>      <input name="Email" type="text" /></td>    </tr>   

</tbody>  </table>  

<input name="Submit" type="Submit" value="Subscribe" />  

<div id="dMLink" style="color: rgb(0, 0, 0); font-family: Tahoma, Arial, Helvetica; font-size: 9pt; font-style: normal; font-weight: normal;">   

<a href="http://www.dotmailer.co.uk" target="_blank">Email marketing</a> powered by dotMailer</div>  

<script language="javascript">

<!--  function _dMcA() {   var dmForm = document.getElementById("signup");   if (dmForm) {    dmForm.action = "http://www.dotmailer.co.uk";   }  }  var dMAd = document.getElementById("dMLink");  if (dMAd) {   if (dMAd.innerHTML.length < 2) {    _dMcA();   }  } else {   _dMcA();  } //-->

</script>

</form> <!-- End of signup -->

 

1/30/2012 1:40:11 PM
Gravatar
Total Posts 18439

Re: Using Dotmailer with Mojoportal

Hi,

In ASP.NET WebForms (which mojoPortal is built on) there can be one and only one form on a page and one already exists so you cannot add additional forms.

What you can do is implement a simple custom feature and using an <asp:Button you can set the PostBackUrl property on the button to the url that your form should submit to and that will make it use the already existing form but post to the url you want to post to. There is an article about Building a Simple PayPal Button, that provides a similar solution for the same problem.

Hope that helps,

Joe

1/31/2012 1:17:09 AM
Gravatar
Total Posts 167

Re: Using Dotmailer with Mojoportal

Perfect, many thanks Joe

You must sign in to post in the forums. This thread is closed to new posts.