Unexpected result on Gmail using AMP - email

I just learnt about this new extension of HTML and wanted to learn something about it.
I have sent to my Gmail account a test from their Playground to my Gmail account and it worked fine.
Now, I do the same using my valid mail system with SPF, DKIM and DMARC (following the requirements from their documentation) and when it arrives, it looks broken. The amp-html is not even close to the one I've built using the playground.
What I am missing?
I have whitelisted the mail
I allow to receive dynamic mail from a sender (my ESP)
Here is the template I used for the test
<!--
## Introduction
The [amp-carousel](/content/amp-dev/documentation/components/reference/amp-carousel-v0.2.md) component allows displaying multiple similar pieces of content along a horizontal axis.
--><!-- -->
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>amp-carousel</title>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<!-- ## Setup -->
<!-- Import the carousel component in the header. -->
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
<link rel="canonical" href="https://amp.dev/documentation/examples/components/amp-carousel/index.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}#-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}#keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<style amp-custom>
.blue-box, .red-box, .green-box {
width: 100%;
height: 280px;
}
.blue-box {
background: blue;
}
.green-box {
background: green;
}
.red-box {
background: red;
}
#custom-button .amp-carousel-button-prev {
left: 5%;
background-image: url('https://amp.dev/static/samples/img/carousel-arrow-left.png');
}
#custom-button .amp-carousel-button-next {
right: 5%;
background-image: url('https://amp.dev/static/samples/img/carousel-arrow-right.png');
}
</style>
</head>
<body>
<!-- ## Basic Usage -->
<!-- Use `type="carousel"` to display a list of images as a continuous strip. -->
<amp-carousel height="300" layout="fixed-height" type="carousel">
<amp-img src="https://preview.amp.dev/static/samples/img/image1.jpg" width="400" height="300" alt="a sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image2.jpg" width="400" height="300" alt="another sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image3.jpg" width="400" height="300" alt="and another sample image"></amp-img>
</amp-carousel>
<!-- ## Slides -->
<!-- Use `type="slides"` to display a list of images as slides. -->
<amp-carousel width="400" height="300" layout="responsive" type="slides">
<amp-img src="https://preview.amp.dev/static/samples/img/image1.jpg" width="400" height="300" layout="responsive" alt="a sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image2.jpg" width="400" height="300" layout="responsive" alt="another sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image3.jpg" width="400" height="300" layout="responsive" alt="and another sample image"></amp-img>
</amp-carousel>
<!-- ## Autoplay -->
<!-- The `autoplay` attribute (type=slides only) advances the slide to the next slide without user interaction, by default it will advance a slide in 5000 millisecond intervals (5 seconds) and can be overridden by the `delay` attribute. -->
<amp-carousel width="400" height="300" layout="responsive" type="slides" autoplay delay="2000">
<amp-img src="https://preview.amp.dev/static/samples/img/image1.jpg" width="400" height="300" layout="responsive" alt="a sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image2.jpg" width="400" height="300" layout="responsive" alt="another sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image3.jpg" width="400" height="300" layout="responsive" alt="and another sample image"></amp-img>
</amp-carousel>
<!-- ## Buttons -->
<!-- By default, carousel buttons use inlined SVGs as background-images.
You may override these with your own SVGs or images by using `.amp-carousel-button-prev` and `.amp-carousel-button-next` classes. -->
<amp-carousel id="custom-button" width="400" height="300" layout="responsive" type="slides" autoplay delay="2000">
<amp-img src="https://preview.amp.dev/static/samples/img/image1.jpg" width="400" height="300" layout="responsive" alt="a sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image2.jpg" width="400" height="300" layout="responsive" alt="another sample image"></amp-img>
<amp-img src="https://preview.amp.dev/static/samples/img/image3.jpg" width="400" height="300" layout="responsive" alt="and another sample image"></amp-img>
</amp-carousel>
<!-- ## Supported Contents -->
<!-- Each of these nodes may also have arbitrary HTML children. -->
<amp-carousel height="300" layout="fixed-height" type="slides">
<div>
<div class="blue-box">
This is a blue box.
</div>
</div>
<div>
<div class="red-box">
This is a red box.
</div>
</div>
<div>
<div class="green-box">
This is a green box.
</div>
</div>
</amp-carousel>
<!-- A good use case for `amp-carousel` are image galleries, [here](/documentation/examples/multimedia-animations/image_galleries_with_amp-carousel/) are some examples. -->
</body></html>
I've read other solutions but those are using .NET, C#, Python and other solutions regarding custom made software to send these kind of mails, but what about big bulk emailing services such as XCampaign, SalesForce, Selligent, etc?
Do they need an upgrade to allow AMP emailing?

Related

Title tag not showing in nextjs

I have created single page in nextjs, And I taken build file <title> and <meta> working fine. see the title tag in this image
but I uploaded build file this server https://blog.simple.in/ title tag not showing. what I am missing. Could you please let me know server issue or code issue please let me know. Thanks
loyaltycards.js
import React, { Component } from "react";
import { Grid } from "semantic-ui-react";
import $ from "jquery";
import Layout from "../components/layout";
import 'semantic-ui-css/semantic.min.css';
import Head from 'next/head';
class Loyaltycard extends Component {
componentDidMount() {
$(".v2, .v3, .v4").hide();
$(".m1").click(function () {
$(".v1").show();
$(".v2,.v3,.v4").hide();
$(".li-1").addClass("btn-active-1");
$(".btn-active-2").removeClass("btn-active-2");
$(".btn-active-3").removeClass("btn-active-3");
$(".btn-active-4").removeClass("btn-active-4");
});
$(".m2").click(function () {
$(".v2").show();
$(".v1,.v3,.v4").hide();
$(".li-2").addClass("btn-active-2");
$(".btn-active-1").removeClass("btn-active-1");
$(".btn-active-3").removeClass("btn-active-3");
$(".btn-active-4").removeClass("btn-active-4");
});
$(".m3").click(function () {
$(".v3").show();
$(".v1,.v2,.v4").hide();
$(".li-3").addClass("btn-active-3");
$(".btn-active-2").removeClass("btn-active-2");
$(".btn-active-1").removeClass("btn-active-1");
$(".btn-active-4").removeClass("btn-active-4");
});
$(".m4").click(function () {
$(".v4").show();
$(".v1,.v2,.v3").hide();
$(".li-4").addClass("btn-active-4");
$(".btn-active-2").removeClass("btn-active-2");
$(".btn-active-1").removeClass("btn-active-1");
$(".btn-active-3").removeClass("btn-active-3");
});
}
render() {
return (
<Layout>
<Head>
<meta charSet="utf-8" />
<title>Store all your rewards cards on your phone</title>
<meta name="description" content="The smart, easy way to carry all Loyalty, Reward and Club cards on your mobile- link them all in the simple app, checkout as usual and earn points at stores." />
<meta name="google-site-verification" content="rtIRrUNRpgZ_lFtlfS8LJ0-8j_d569BXS9NOGa_nM6Y" />
<link rel="canonical" href="https://simple .cash/loyaltycards"/>
</Head>
<Grid className="static-sections">
<Grid.Column width={1}></Grid.Column>
<Grid.Column width={14} className="promotions">
<h1>Loyalty Cards</h1>
<p>
Got a wallet full of store loyalty cards? Link them all in the
simple app and start earning points at stores you visit all the
time. simple app allows you to store all of your rewards cards on
your phone. Shop and use your loyalty account at checkout as usual
to collect points. Turn your phone into your wallet and redefine
your everyday shopping experience! It is the smart and easy way to
carry all Loyalty cards, Reward cards and Club cards on your
smartphone with simple .
</p>
</Grid.Column>
<Grid.Column width={1}></Grid.Column>
</Grid>
<Grid>
<Grid.Column width={1}></Grid.Column>
<Grid.Column width={14} className="loyalty">
<Grid>
<Grid.Column width={8} className="left-eight">
<div className="m1" onClick={this.m1}>
<div class="media-left">
<p class="li-circle-second-1 li-1">1</p>
</div>
<div class="media-body">
<h4 class="media-heading">Select Card</h4>
<p>
Select a card from the available list. If not available,
add your card by selecting Add New
</p>
</div>
</div>
<div className="m2" onClick={this.m2}>
<div class="media-left">
<p class="li-circle-second-2 li-2">2</p>
</div>
<div class="media-body">
<h4 class="media-heading">Scan barcode</h4>
<p>Scan the barcode from the actual card you carry</p>
</div>
</div>
<div className="m3" onClick={this.m3}>
<div class="media-left">
<p class="li-circle-second-3 li-3">3</p>
</div>
<div class="media-body">
<h4 class="media-heading">Card Photo</h4>
<p>
Click a photo of the front & back of the card. (Optional)
</p>
</div>
</div>
<div className="m4" onClick={this.m4}>
<div class="media-left">
<p class="li-circle-second-4 li-4">4</p>
</div>
<div class="media-body">
<h4 class="media-heading">Use the Card</h4>
<p>
During checkout at the store, select the appropriate card
from the app & show at the counter for scanning
</p>
</div>
</div>
</Grid.Column>
<Grid.Column width={8}>
<div className="v1">
<video
playsinline={"playsinline"}
autoplay={"autoplay"}
muted={"muted"}
loop={"loop"}
>
<source
class="embed-responsive-item"
src="/mp4/loyalty-card/1-loyalty-card.mp4"
type="video/mp4"
></source>
</video>
</div>
<div className="v2">
<video
playsinline={"playsinline"}
autoplay={"autoplay"}
muted={"muted"}
loop={"loop"}
>
<source
class="embed-responsive-item"
src="/mp4/loyalty-card/2-scan-barcode.mp4"
type="video/mp4"
></source>
</video>
</div>
<div className="v3">
<video
playsinline={"playsinline"}
autoplay={"autoplay"}
muted={"muted"}
loop={"loop"}
>
<source
class="embed-responsive-item"
src="/mp4/loyalty-card/3-card-photo.mp4"
type="video/mp4"
></source>
</video>
</div>
<div className="v4">
<video
playsinline={"playsinline"}
autoplay={"autoplay"}
muted={"muted"}
loop={"loop"}
>
<source
class="embed-responsive-item"
src="/mp4/loyalty-card/4-cashback-added.mp4"
type="video/mp4"
></source>
</video>
</div>
</Grid.Column>
</Grid>
</Grid.Column>
<Grid.Column width={1}></Grid.Column>
</Grid>
</Layout>
);
}
}
export default Loyaltycard;

Unable to click on tile using Protractor

I am new user of Protractor. Need help as i am unable to click on Some Name, having below HTML
<div class="department-click"
<div class="department-click" onclick="GLOBAL_SERVICE_ID=405;changeLocation('#/aaaa');_routeFrom='home'">
<!-- <div class="department-click" onclick="changeLocation('#/aaaa')"> -->
<div class="department-icon custom-svgbg1 layout-column layout-align-center-center">
<!-- <svg style="height:80px; width:80px;" viewBox="0 0 24 24"> -->
<!-- <path fill="#fff" d="M12,3L1,9L12,15L21,10.09V17H23V9M5,13.18V17.18L12,21L19,17.18V13.18L12,17L5,13.18Z" /> -->
<!-- </svg> -->
<svg height="80px" viewBox="0 0 92.168 92.168" width="80px">
<rect clip-rule="evenodd" fill="none" fill-rule="evenodd" height="92.168" width="92.168" x="0"></rect>
<path d="M4.994,53.166V37.65l-3.248-1.418c-1.185-0.511-1.077-2.165,0.2-2.565l44.208-13.824 c0.255-0.091,0.566-0.091,0.821,0l44.244,13.915c1.26,0.4,1.26,2.182,0.019,2.6L47.123,55.385c-0.366,0.145-0.73,0.145-1.096-0.019 L7.731,38.832v14.352c1.022,0.219,1.86,0.673,2.554,1.309c2.499,2.257,2.573,6.312,1.807,9.351 c-0.766,2.947-2.482,5.802-5.018,7.403c-0.475,0.309-1.022,0.273-1.477-0.019c-2.592-1.618-4.361-4.456-5.146-7.366 c-0.802-3.036-0.711-7.021,1.752-9.293C2.968,53.875,3.899,53.384,4.994,53.166L4.994,53.166z M6.782,35.468 c0.091,0.017,0.183,0.053,0.255,0.091l39.556,17.096l40.322-17.388L46.557,22.57L6.18,35.195L6.782,35.468z M69.508,51.201 c0-0.745,0.602-1.365,1.368-1.365c0.749,0,1.368,0.619,1.368,1.365v10.532c0,5.22-6.951,8.531-15.781,9.894 c-6.495,1.001-13.74,1.037-20.233,0.019c-8.558-1.328-15.181-4.567-15.181-9.896V51.457c0-0.764,0.619-1.365,1.368-1.365 c0.747,0,1.368,0.6,1.368,1.365v10.294c0,3.675,5.619,6.076,12.863,7.204c6.221,0.982,13.172,0.945,19.395-0.019 c7.534-1.165,13.464-3.619,13.464-7.203V51.201z M3.096,63.17c0.547,2.018,1.643,3.983,3.248,5.257 c1.515-1.273,2.573-3.219,3.103-5.257c0.511-1.965,0.675-5.167-0.985-6.676c-1.151-1.018-3.286-0.945-4.397,0.072 C2.402,58.095,2.568,61.186,3.096,63.17L3.096,63.17z" fill="#3A3E49 "></path>
</svg>
</div>
<h3 class="clamp2">
<span>
Some Name
</span>
</h3>
</div>
Try locating the element by css:
element(by.css('.department-click .clamp2 span'));
Depends on which element you want to click, next line is locating the element by css and then clicking it:
element(by.css('h3.clamp2 span')).click();

Schema.org for category page that lists articles

I'm tagging my website with Microdata and questionning myself about tagging article's listing.
On category page I got a a big article which is tagged but I don't know if I should also tagged the listing.
<article itemscope itemtype="http://schema.org/NewsArticle" itemref="author publisher">
<header class="entry-header">
<h3 class="entry-title" itemprop="headline"><a href="/article1" rel="bookmark">article 1/a></h3>
<link itemprop="sameAs mainEntityOfPage" href=/article1">
</header>
<div>
<img width="150" height="150" itemprop="image" src="image1.jpg" />
<div class="resume-article-list">bépo bépo bépo … (Lire la suite…)</div> </div>
<footer class="entry-meta">
<time itemprop="datePublished" datetime="2018-03-15T04:48:53+00:00">
<time itemprop="dateModified" class="updated" datetime="2018-11-14T13:52:00+00:00"></time>
</footer>
</article>
<article itemscope itemtype="http://schema.org/NewsArticle" itemref="author publisher">
<header class="entry-header">
<h3 class="entry-title" itemprop="headline"><a href="/article2" rel="bookmark">article 2/a></h3>
<link itemprop="sameAs mainEntityOfPage" href=/article2">
</header>
<div>
<img width="150" height="150" itemprop="image" src="image1.jpg" />
<div class="resume-article-list">bépo bépo bépo … (Lire la suite…)</div> </div>
<footer class="entry-meta">
<time itemprop="datePublished" datetime="2018-03-15T04:48:53+00:00">
<time itemprop="dateModified" class="updated" datetime="2018-11-14T13:52:00+00:00"></time>
</footer>
</article>
Is it correct?
I got a big doubt if NewsArticle could be used on resume,
and also if isn't any trouble to used mainEntityOfPage as is not the full article?
If you are marking up a list of things that exist on other pages, then Google recommends using ItemList containing just urls. The destination pages should contain the full markup about the entity:
https://developers.google.com/search/docs/guides/mark-up-listings

button won't work in IE 11

I'm having trouble with the button on my form not working in IE 11.
You can view the page at brandinfluencegroup.com/test
I have created the form based on this script http://www.html-form-guide.com/contact-form/contact-form-attachment.html
It also uses styling for the file field which I used one of the suggestions I found here Twitter Bootstrap Form File Element upload button
My code below:
<?PHP
require_once("./include/fgcontactform.php");
$formproc = new FGContactForm();
$formproc->AddRecipient('email#email.com.au'); //<<---Put your email address here
$formproc->SetFormRandomKey('HG9hPBpn9Bn26yg');
$formproc->AddFileUploadField('file','pdf,doc,pages,jpg,jpeg,gif,png,bmp',6024);
if(isset($_POST['submitted']))
{
if($formproc->ProcessForm())
{
$formproc->RedirectToURL("thank-you.php");
}
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<!-- ========== PAGE TITLE ========== -->
<title>BIG | Brand Influence Group</title>
<!-- ========== META TAGS ========== -->
<meta name="description" content="Brand Influence Group - BIG on you">
<meta name="keywords" content="BIG, brand, influence, group">
<meta charset="utf-8">
<meta name="author" content="ThemesEase">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- ========== VIEWPORT META ========== -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<!-- ========== FAVICON & APPLE ICONS ========== -->
<link rel="shortcut icon" href="images/favicon.png">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<!-- ========== GOOGLE FONTS ========== -->
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,100" rel='stylesheet' type='text/css'>
<link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css' type='text/css'>
<!-- ========== MINIFIED VENDOR CSS ========== -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="dist/css/bootstrap-select.css">
<link rel="stylesheet" href="styles/vendor.css">
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/custom.css">
<!-- ========== MODERNIZR ========== -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="dist/js/bootstrap-select.js"></script>
<script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
<script type='text/javascript' src='scripts/fg_captcha_validator.js'></script>
</head>
<body class="dark-header animation">
<form class="notify-div" id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' enctype="multipart/form-data" accept-charset='UTF-8'>
<input type='hidden' name='submitted' id='submitted' value='1'/>
<input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
<input type='text' class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />
<div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span><span id='contactus_name_errorloc' class='error'></span><span id='contactus_email_errorloc' class='error'></span></div>
<input type="text" name="name" placeholder="Name"/>
<input type="email" name="email" placeholder="Enter your email"/>
<select name="message" class="selectpicker" data-hide-disabled="true" data-size="10">
<option selected value="I want to...">I want to...</option>
<option value="Apply for a position in Brand Activation">Apply for a position in Brand Activation</option>
<option value="Apply for a position as Influencer">Apply for a position as Influencer</option>
<option value="Apply for a position as Account Executive">Apply for a position as Account Executive</option>
<option value="Apply for a position as Account Manager">Apply for a position as Account Manager</option>
<option value="Apply for a position as Accountant">Apply for a position as Accountant</option>
<option value="Apply for a position as Weekend warrior">Apply for a position as Weekend warrior</option>
<option value="Apply for a position as Cricket Coach">Apply for a position as Cricket Coach</option>
<option value="Apply for a position as Intern">Apply for a position as Intern</option>
<option value="Other...">Other...</option>
</select>
</span><span><input class="btn btn-primary" type="button" value="Upload your cv..." onclick="$(this).parent().find('input[type=file]').click();"/>
<input type="file" name="file" id="file" style="visibility:hidden; width: 1px;" onchange="$(this).parent().find('span').html($(this).val().replace('C:\\fakepath\\', ''))" />
<span class="badge badge-important" ></span></span>
<button type="image" class="sr-btn white-btn" id="submit" name="submit" value="Send"><span class="bold">Say</span> <span class="italic">hello</span></button>
</form>
<script type='text/javascript'>
// <![CDATA[
var frmvalidator = new Validator("contactus");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("name","req","Please provide your name");
frmvalidator.addValidation("email","req","Please provide your email address");
frmvalidator.addValidation("email","email","Please provide a valid email address");
frmvalidator.addValidation("message","maxlen=6048","The message is too long!(more than 2KB!)");
frmvalidator.addValidation("file","file_extn=jpg;jpeg;gif;png;bmp","Upload images only. Supported file types are: jpg,gif,png,bmp");
// ]]>
</script> <br/>
<br/>
</div>
</div>
</div>
<!-- end row -->
</div>
<!-- end container -->
</section>
<!-- end section -->
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
// (function(b, o, i, l, e, r) {
// b.GoogleAnalyticsObject = l;
// b[l] || (b[l] =
// function() {
// (b[l].q = b[l].q || []).push(arguments)
// });
// b[l].l = +new Date;
// e = o.createElement(i);
// r = o.getElementsByTagName(i)[0];
// e.src = 'https://www.google-analytics.com/analytics.js';
// r.parentNode.insertBefore(e, r)
// }(window, document, 'script', 'ga'));
// ga('create', 'UA-XXXXX-X');
// ga('send', 'pageview');
</script>
<script src="scripts/vendor.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>
This is likely to happen because of Internet Explorer blocking ActiveX Controls, as soon as I just open Internet Explorer, it shows a bar saying this:
If I don't press anything, then the button wont work, and that bar message also disappears after 1 or 2 minutes, so after a while you might not notice that the message was there at the beginning.
Also I think this happens because of you working locally, this shouldn't happen if the site is at a trusted domain.
Hope this helps,
Leo.

sap.m.MessageBox.confirm working sap.m.MessageBox.error or sap.m.MessageBox.warning not working

In my sapui5 project i am using sap.m.MessageBox.confirm its working fine but when i use sap.m.MessageBox.error or sap.m.MessageBox.warning it shows error
Uncaught TypeError: undefined is not a function
I have added jQuery.sap.require("sap.m.MessageBox"); still the issue is not solved. please give solution for this problem
Thanks
Sorry for not posting the code earlier
Edited 1
View
<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
controllerName="trial.S1" xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="Title">
<content>
</content>
<footer>
<OverflowToolbar>
<ToolbarSpacer />
<Button id="errorId" text="Error" type="Accept"
press="fnOnerror" />
<Button id="confirmId" text="Confirm" type="Accept"
press="fnOnconfirm" />
</OverflowToolbar>
</footer>
</Page>
</core:View>
Conroller
jQuery.sap.require("sap.m.MessageBox");
sap.ui.controller("trial.S1", {
fnOnerror : function(oEvent){
sap.m.MessageBox.error("My error message");
},
fnOnconfirm : function(oEvent){
sap.m.MessageBox.confirm("My Confirm message")
}
});
index.html
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->
<script>
sap.ui.localResources("trial");
var app = new sap.m.App({initialPage:"idS11"});
var page = sap.ui.view({id:"idS11", viewName:"trial.S1", type:sap.ui.core.mvc.ViewType.XML});
app.addPage(page);
app.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
How should we give you a solution for your issue if your information is not enough? From what you describe it is hard to tell what you are doing wrong. Make sure to always add more information including code.
After getting the information from you we know now that you are using version 1.28.9 of UI5. If you would have checked the API docs at https://openui5.hana.ondemand.com/#docs/api/symbols/sap.m.MessageBox.html#.error then you would have known that the APIs you are using were introduced in 1.30!!!