Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
- <title>My Environment</title>
- <link href="http://my-environment.s3.amazonaws.com/style.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
- <script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.form-n-validate.js"></script>
- <script type="text/javascript" src="http://my-environment.s3.amazonaws.com/jquery.defaultText.js"></script>
- <script type="text/javascript">
- jQuery(document).ready( function($) {
- $.defaultText();
- $('#mce-NAME').focus(function() {
- $('#mce-success-response').hide();
- $('#mce-error-response').hide();
- });
- });
- </script>
- </head>
- <body>
- <div id="wrapper">
- <div class="intro">
- I call upon both sides of the Victorian parliament to approve legislation to create new forest reserves and bring to an end native forest logging in the state.
- </div>
- <div class="subscribe">
- <!-- Begin MailChimp Signup Form -->
- <form action="http://myenvironment.us2.list-manage.com/subscribe/post?u=6927d3e0e362818c9fb02cfa8&id=52a3560046" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
- <div class="input-container"><input type="text" name="NAME" class="required myClass" id="mce-NAME" title="Name"></div>
- <div class="input-container"><input type="text" name="EMAIL" class="required email myClass" id="mce-EMAIL" title="Email Address"></div>
- <div class="receive-updates">Tick to receive updates from MyEnvironment<input type="checkbox" value="1" name="group[3505][1]" id="mce-group[3505]-3505-0"></div>
- <div id="mce-responses" class="clear">
- <div class="response" id="mce-error-response" style="display:none"></div>
- <div class="response" id="mce-success-response" style="display:none"></div>
- </div>
- <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
- </form>
- <script type="text/javascript">
- var fnames = new Array();var ftypes = new Array();fnames[1]='NAME';ftypes[1]='text';fnames[0]='EMAIL';ftypes[0]='email';
- jQuery(document).ready( function($) {
- var options = { errorClass: 'mce_inline_error', errorElement: 'div', onkeyup: function(){}, onfocusout:function(){}, onblur:function(){} };
- var mce_validator = $("#mc-embedded-subscribe-form").validate(options);
- $("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator
- options = { url: 'http://myenvironment.us2.list-manage1.com/subscribe/post-json?u=6927d3e0e362818c9fb02cfa8&id=52a3560046&c=?', type: 'GET', dataType: 'json', contentType: "application/json; charset=utf-8",
- beforeSubmit: function(){
- $('#mce_tmp_error_msg').remove();
- $('.datefield','#mc_embed_signup').each(
- function(){
- var txt = 'filled';
- var fields = new Array();
- var i = 0;
- $(':text', this).each(
- function(){
- fields[i] = this;
- i++;
- });
- $(':hidden', this).each(
- function(){
- var bday = false;
- if (fields.length == 2){
- bday = true;
- fields[2] = {'value':1970};//trick birthdays into having years
- }
- if ( fields[0].value=='MM' && fields[1].value=='DD' && (fields[2].value=='YYYY' || (bday && fields[2].value==1970) ) ){
- this.value = '';
- } else if ( fields[0].value=='' && fields[1].value=='' && (fields[2].value=='' || (bday && fields[2].value==1970) ) ){
- this.value = '';
- } else {
- this.value = fields[0].value+'/'+fields[1].value+'/'+fields[2].value;
- }
- });
- });
- return mce_validator.form();
- },
- success: mce_success_cb
- };
- $('#mc-embedded-subscribe-form').ajaxForm(options);
- });
- function mce_success_cb(resp){
- $('#mce-success-response').hide();
- $('#mce-error-response').hide();
- if (resp.result=="success"){
- // redirect to facebook wall
- window.location.replace("http://www.facebook.com/pages/MyEnvironment-Inc/130823970271123");
- $('#mce-'+resp.result+'-response').show();
- $('#mce-'+resp.result+'-response').html(resp.msg + ' In the meantime click on the wall tab to join our discussions.');
- $('#mc-embedded-subscribe-form').each(function(){
- this.reset();
- });
- } else {
- var index = -1;
- var msg;
- try {
- var parts = resp.msg.split(' - ',2);
- if (parts[1]==undefined){
- msg = resp.msg;
- } else {
- i = parseInt(parts[0]);
- if (i.toString() == parts[0]){
- index = parts[0];
- msg = parts[1];
- } else {
- index = -1;
- msg = resp.msg;
- }
- }
- } catch(e){
- index = -1;
- msg = resp.msg;
- }
- try{
- if (index== -1){
- $('#mce-'+resp.result+'-response').show();
- $('#mce-'+resp.result+'-response').html(msg);
- } else {
- err_id = 'mce_tmp_error_msg';
- html = '<div id="'+err_id+'" style="'+err_style+'"> '+msg+'</div>';
- var input_id = '#mc_embed_signup';
- var f = $(input_id);
- if (ftypes[index]=='address'){
- input_id = '#mce-'+fnames[index]+'-addr1';
- f = $(input_id).parent().parent().get(0);
- } else if (ftypes[index]=='date'){
- input_id = '#mce-'+fnames[index]+'-month';
- f = $(input_id).parent().parent().get(0);
- } else {
- input_id = '#mce-'+fnames[index];
- f = $().parent(input_id).get(0);
- }
- if (f){
- $(f).append(html);
- $(input_id).focus();
- } else {
- $('#mce-'+resp.result+'-response').show();
- $('#mce-'+resp.result+'-response').html(msg);
- }
- }
- } catch(e){
- $('#mce-'+resp.result+'-response').show();
- $('#mce-'+resp.result+'-response').html(msg);
- }
- }
- }
- </script>
- <!--End mc_embed_signup-->
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment