Creating a pop up without using javascript alert and URL - popup

I am trying to create a pop up on alink which have definition of the linked topic. I don't want to use javascript alert becoz of the warning icon. I used window.createpopup but it doesn't works in other browsers than IE. Is there any other function in javascript or jquery for creating pop up with information text only
this is what i have in my page
<script type="text/javascript" src="/javascript/jquery/jquery-ui- 1.8.17.custom.min.js"></script>
<script type="text/javascript" src="/javascript/jquery/jquery-ui-1.10.3.custom.min.js"></script>
<script type="text/javascript" src="/javascript/jquery/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="/javascript/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="/javascript/jquery/charCount.js"></script>
<link rel="stylesheet" type="text/css" href="/javascript/jquery/css/smootheness/jquery-ui-1.10.3.custom.css"/>
<link rel="stylesheet" type="text/css" href="/javascript/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css"/>
$(document).ready(function () {
$('#PopupExposure').dialog({ autoOpen: false });
$('#Exposurepopup').click(function () {
$('#PopupExposure').dialog('open');
});
$('#PopupStatus').dialog({ autoOpen: false });
$('#Statuspopup').click(function () {
$('#PopupStatus').dialog('open');
});
$('#PopupFunction').dialog({ autoOpen: false });
$('#Functionpopup').click(function () {
$('#PopupFunction').dialog('open');
});
$('#PopupEffect').dialog({ autoOpen: false });
$('#Effectpopup').click(function () {
$('#PopupEffect').dialog('open');
});
$('#PopupResearch').dialog({ autoOpen: false });
$('#Researchpopup').click(function () {
$('#PopupResearch').dialog('open');
});
$('#PopupProgram').dialog({ autoOpen: false });
$('#Programpopup').click(function () {
$('#PopupProgram').dialog('open');
});
$('#PopupPolicy').dialog({ autoOpen: false });
$('#Policypopup').click(function () {
$('#PopupPolicy').dialog('open');
});
});
</script>
<asp:ScriptManagerProxy ID="ScriptManagerproxy1" runat="server">
</asp:ScriptManagerProxy>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="studysub_animal" runat="server">
<asp:Label ID="lbl_studysubj" CssClass="questions" runat="server" AssociatedControlID="rdb_studysubj"
Text="1. Select the study subject."></asp:Label><span class="red">*</span>
<asp:RadioButtonList ID="rdb_studysubj" runat="server" OnSelectedIndexChanged="rdb_studysubj_SelectedIndexChanged"
AutoPostBack="True" ValidationGroup="UserProfile">
<asp:ListItem Value="Humans">Humans</asp:ListItem>
<asp:ListItem Value="Non-Human primates">Non-Human primates</asp:ListItem>
<asp:ListItem Value="Rodents">Rodents</asp:ListItem>
<asp:ListItem Value="Others">Others</asp:ListItem>
</asp:RadioButtonList>
</div>
<div id="bimarkerinterest" runat="server">
<asp:Label ID="Label1" CssClass="questions" runat="server" AssociatedControlID="rdb_biomarkerinterest"
Text="1.Select the Biomarker of interest."></asp:Label><span class="red">*</span>
<asp:RadioButtonList ID="rdb_biomarkerinterest" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="rdb_biomarkerinterest_SelectedIndexChanged">
<asp:ListItem Value="Exposure"><a id="Exposurepopup">Exposure</a></asp:ListItem>
<asp:ListItem Value="Status"><a id="Statuspopup">Status</a></asp:ListItem>
<asp:ListItem Value="Function"><a id="Functionpopup">Function</a></asp:ListItem>
<asp:ListItem Value="Effect"><a id="Effectpopup">Effect</a></asp:ListItem>
</asp:RadioButtonList>
</div>
<div id="PopupExposure" title="Exposure Definition" style="display:none;"><p>Distinguishing dietary insufficiencies from responses to chronic health conditions\nDetermining the level of intake for a specific nutrient for a group or community and the needs/risks associated with that level</p></div>
<div id="PopupStatus" title="Status Definition" style="display:none;"><p>Explaining how a person or group of people compare to accepted standards of nutrition.\n Guiding actions related to these standards, such as providing supplementation.</p></div>
<div id="PopupFunction" title="Function Definition" style="display:none;"><p>Identifying the role of specific nutrients in biological systems.\nIdentifying potential interactions amongst different nutrients in biological systems.\nIdentifying the role for nutrients at different stages of the life span and under different physiological states, e.g., pregnancy.</p></div>
<div id="PopupEffect" title="Effect Definition" style="display:none;"><p>Assessing the direct impact of nutrient status (i.e., adequacy, deficiency or excess of nutrient.\nEvaluating the impact of an intervention, to include the impact of \n1) a nutritional intervention or \n2) the impact of a non-nutritive intervention, e.g., a drug, on nutrient status or function.</p></div>
<div id="PopupPolicy" title="Policy Definition" style="display:none;"><p>Refers to the evaluation and use of the extant evidence to support:\n 1) the development of new guidance or policy about diet and health,\n 2) funding agencies making decisions about either the quality of funding applications or the identification of research priorities in food and nutrition,\n 3) donor agencies making decisions about priority areas of need.\nPolicy makers, as data consumers, need a level of confidence in those data to support the generation of evidence-based policy.\n The QBS will better allow them to interpret the literature and help support efforts to determine priority areas of need.</p></div>
<div id="PopupProgram" title="Program Definition" style="display:none;"><p>Refers to public health activities, i.e., at community, national, regional or global level, intended to address population based needs through evidence-based interventions.\nThe support for the development, monitoring and evaluation of such activities includes data from surveillance to identify populations at risk.\nThe QBS is intended to support those who are involved in any activity designed to support the development, implementation, monitoring or evaluation of public health interventions</p></div>
<div id="PopupClinical" title="Clinical Definition" style="display:none;"><p>The context within which nutritional status is assessed to support health promotion, disease prevention or treatment of specific conditions.\n The QBS is intended to improve clinicians’ ability to diagnose, monitor and improve patient status and response to treatment</p></div>
<div id="PopupResearch" title="Research Definition" style="display:none;"><p>BOND uses an inclusive definition of research that encompasses a continuum of activity from basic/bench research involving studies at a cellular/molecular level utilizing cell cultures or non-human animal models to clinical studies in humans and population-based (surveillance/epidemiology) research.\nThe QBS provides the state of the science with regard to the range of biomarkers available for a given use and is designed to be accessible to users irrespective of their level of nutritional expertise.</p></div>

jQuery's Dialog might be what you're looking for:
http://jqueryui.com/dialog/
EDIT: Here is a demo showing a working example: jsFiddle
HTML:
Show Dialog
<div id="dialog" style="display:none;">Some text</div>
jQuery:
$(function() {
// Create the dialog and make it hidden initially
$('#dialog').dialog({ autoOpen: false });
// When the link is clicked, open the dialog
$('#triggerDialog').click(function() {
$('#dialog').dialog('open');
return false;
});
});
EDIT: Make sure that you include jQuery, jQuery UI, and one of the jQuery UI stylesheets. You can find links to all of these files on jQuery's CDN site:
http://codeorigin.jquery.com/

Related

How to use AMP for email to track open click?

I was looking to get open/click tacking using AMP for Emails
but yet to find any conclusive document to get any idea that how I can get tracking using AMP for emails.
Below is the sample code give by AMP but there is no tracking link of something given.
<!--
## Introduction
This sample demonstrates how to display a feed of data, allowing the user to go through
a large number of items in an email without having to scroll.
The sample uses a combination of [`amp-list`](/documentation/components/amp-list),
to fetch the initial items from the server and [`amp-form`](/documentation/components/amp-form),
to "refresh" a single item, by making a new server request.
-->
<!-- -->
<!doctype html>
<html ⚡4email lang="en" data-css-strict>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script>
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>
<style amp4email-boilerplate>body{visibility:hidden}</style>
<!--
## Styles
We use CSS to hide the initially fetched item after the form is first submitted.
We also define a layout that allows us to have fixed card sizes, to ensure form submissions don't result in content jumps.
-->
<style amp-custom>
.amp-form-submit-success .initial-content,
.amp-form-submitting .initial-content,
.amp-form-submit-error .initial-content {
display: none;
}
.card {
width: 160px;
height: 120px;
margin: 10px;
float: left;
position: relative;
}
.card .next-button {
position: absolute;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<!--
## Single item template
Define a template for a single item inside a card and give it an `id`. This template is used by `amp-form` for displaying new items.
In this case, we use a single `amp-img`.
-->
<template id="item-template" type="amp-mustache">
<amp-img src="{{items.imageUrl}}" layout="fixed" width="160" height="90"></amp-img>
</template>
<!--
## Initial list of items
We define a template for the initial items and their layout and give it an `id`, allowing us to use it subsequently in an amp-list. This template is used by `amp-list` for fetching the initial up-to-date contents from the server.
It contains in itself an `amp-form` for each item which references the template defined above referred by its `id`. By using a different template for the `amp-form`, we're able to "refresh" a part of the content, namely the image in this case.
Note: This template contains the same markup (in this case, a single `amp-img`) as used in the template above to render the initial items. This is wrapped inside `<div class="initial-content">` which becomes hidden the first time the user submits the form.
-->
<template id="list-template" type="amp-mustache">
<form class="card" method="post" action-xhr="https://amp.dev/documentation/examples/api/photo-stream?single&width=160&height=90">
<div class="initial-content">
<amp-img src="{{imageUrl}}" layout="fixed" width="160" height="90"></amp-img>
</div>
<div submit-success template="item-template"></div>
<input class="next-button" type="submit" value="Next">
</form>
</template>
<!--
We use `amp-list` to render the initial items from the server using the template defined above referred by its `id`.
The height matches the combined height of our cards and their margins. The initial server response defines the number of cards to be displayed (in this case four).
-->
<amp-list template="list-template" src="https://amp.dev/documentation/examples/api/photo-stream?width=160&height=90&items=4" layout="fixed" width="360" height="280">
</amp-list>
</body>
</html>
Can anyone give a idea to implement tracking on this?
Thanks
The documentation says "AMPHTML allows tracking email opens with pixel tracking techniques, same as regular HTML emails."
There is therefore no specific AMP way of doing it--it's just normal.
So, normally the ESP handles open tracking, and perhaps click tracking too, by rewriting the URLs. Alternatively, you can add for example UTM links if you use Google Analytics on the site the links are going to.

Override CSS for specific Bootstrapvue Components

first Question here so please educate me if i'm doing this wrong.
So im working on an SPA that uses BootsrapVue and i created a view that uses a
<b-form-checkbox-group
v-model="anything"
:options="options"
:disabled="ifDisabled"
button-variant="outline-secondary"
buttons
>
when this gets rendered i get this html:
<fieldset data-v-3bacc3f3 class="form-group" id="__BVID__38">
<legend tabindex=-1" class="bv-no-focus-ring col-form-label pt-0" id="__BVID__38__label_">Selector</legend>
<div>
<div> data-v-3baac3f3 role="group" tabindex="-1" class="btn-group-toggle btn-group bv-no-focus-ring" id="__BVID__39">
<label class="btn btn-outline-secondary disabled atcive">
<input type="checkbox" name="buttons-1" disabled="disabled" class value="100" id="__BVID__39_BV_option_0">
<span>100</span>
...
now i've tried alot of stuff but cant figure out how i am able to override the scss styles for the options. Preferably only in this scope, but i cant even manage to do it globaly.
I'm even having trouble figuring out the right place where i should be looking to change css for :hover and :focus.
please help!
This works:
<style lang="scss">
.btn-group-toggle:not(#_) label {
/* general styles */
&.disabled {
}
&.focus {
}
&.active {
}
&:hover {
}
}
</style>
When adding scoped attribute to the <style> tag, you're largely at the hand of your installed pre-processor which might or might not be able to parse >>>, /deep/, ::v-deep or :deep(), depending on version.
To stay away from such issues, I use the suggestion made in Vue Loader's docs: I create a separate <style> tag for bootstrap-vue internals, without the scoped attribute and keep the rest of component style rules in a <style scoped>.
Working demo.

vuetify- How do I change arrow color and the size of the icon in vuetify within text-area?

I'm trying to make a text input area like this.
I tried this way
<v-text-field
label="Outlined"
placeholder="Placeholder"
background-color="white"
append-icon="mdi-arrow-right x-large primary"
outlined
></v-text-field>
And it give me this result.
Issues are
Icon doesn't get large enough to fill the entire text-area
Can't change the color of arrow stroke
What should I do to make this text area also receives file drag and drop?(user might want to type or sometimes drop a file to the text area
Thank you so much.
Hope someone who are well knowledgeable about vuetify could help me.
for part of your question about input design and look you should use provided slot from the v-text-field component, this way you can achieve more and here is the vuetify documentation about this: text field icon slots
and to check what other slots is available for this component check this list: all text field slots
even though using slot would achieve a lot more than prop, to fully achieve the desired result you might need to overwrite some css styles that you can find by inspecting the element in the browser dev tool to find them out.
I made the look you wanted with the approach described above in the code below:
new Vue({
el: '#app',
vuetify: new Vuetify(),
})
.v-text-field.v-text-field--enclosed .v-text-field__details,
.v-text-field.v-text-field--enclosed:not(.v-text-field--rounded)>.v-input__control>.v-input__slot {
padding-right: 0 !important;
}
.v-text-field--enclosed .v-input__append-inner,
.v-text-field--enclosed .v-input__append-outer,
.v-text-field--enclosed .v-input__prepend-inner,
.v-text-field--enclosed .v-input__prepend-outer,
.v-text-field--full-width .v-input__append-inner,
.v-text-field--full-width .v-input__append-outer,
.v-text-field--full-width .v-input__prepend-inner,
.v-text-field--full-width .v-input__prepend-outer {
margin-top: 0 !important;
}
.pointer {
cursor: pointer;
}
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/#mdi/font#4.x/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/vuetify#2.x/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue#2.x/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify#2.x/dist/vuetify.js"></script>
<div id="app">
<v-app>
<v-main>
<v-container>
<v-text-field label="Outlined" placeholder="Placeholder" outlined>
<template v-slot:append>
<v-sheet color="red" class="d-flex justify-center align-center rounded-r pointer" width="50" height="56">
<v-icon dark>
mdi-arrow-right
</v-icon>
</v-sheet>
</template>
</v-text-field>
</v-container>
</v-main>
</v-app>
</div>
about the drag and drop issue vuetify's v-file-input component does not natively support this behavior (for now at least) but you can read the article below to find out how to write this feature in vuetify:
Step by Step: Custom drag & drop upload component in Vuetify (Vue 2)

Schema.org Microdata markup to distinguish between photos and art

Like many sites, we deliver a lot of imagery on our web site.
Use case: set up labels/refinements in Google Custom Search that aggregate and filter two different classes of image objects. Using Schema.org Microdata markup is very easy and works great, but we want the user to select either
1) PHOTOS: a "photo" is taken by with an instrument -- some kind of camera/lens "machine" that comprises something from "real life"
OR
2) ART: all other images that are creative works by an illustrator/artist: vector art, scans of drawings, scans of paintings, water colors etc.
I can easily determine which is which as our web CMS gets metadata from the database, and drives the content through the pipe and fork dynamic insertion of metadata. Something like
<section class="page-content" role="main" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="image" content="Red Roses" /> #art
and toggle to this if it were a photo
"itemprop="photo" content="Daffodils" # photo
But this is really not doing the job. I would expect to have some property like "imageType" that I could then apply like this
itemprop="imageType" content="photo"
itemprop="imageType" content="art"
But I don't see anything that meets this requirement in Schema.org (my eyes are bleeding from reviewing the hierarchy and still can't find what I need). There is nothing to designate "art" as such.
Any ideas?
I don’t know which features Google Custom Search supports,
but you have the following options with Schema.org and Microdata.
Unless you have to implement it right now, I recommend option b).
a) Propose new Schema.org types/properties
See my answer to another question for links.
b) Wait for an appropriate Schema.org type/property
The next Schema.org release will contain the type VisualArtwork (draft):
A work of art that is primarily visual in character.
It has an artform property (draft) that takes text or an URL as value:
e.g. Painting, Drawing, Sculpture, Print, Photograph, Assemblage, Collage, etc.
Caution notice: these are drafts, subject to change!
Update: VisualArtwork and artform got released.
<div itemscope itemtype="http://schema.org/VisualArtwork">
<meta itemprop="artform" content="Painting">
</div>
<div itemscope itemtype="http://schema.org/VisualArtwork">
<meta itemprop="artform" content="Photo">
</div>
c) Use Schema.org’s extension mechanism
The "slash-based" extension mechanism is "outdated", but valid.
<div itemscope itemtype="http://schema.org/ImageObject/Photo"></div>
<div itemscope itemtype="http://schema.org/ImageObject/Art"></div>
I would only use this as a last resort.
d) Use an additional Schema.org type
This does not work for most cases, but it’s possible in your case: Both of your images are ImageObject, and only the photos are Photograph in addition.
The itemtype attribute can have several values as long as they are from the same vocabulary. But note that you could only use properties that are defined for all of the used types.
<div itemscope itemtype="http://schema.org/ImageObject">
<!-- art -->
</div>
<div itemscope itemtype="http://schema.org/ImageObject http://schema.org/Photograph">
<!-- photo -->
</div>
e) Use a type/property from a different vocabulary
If you know/find a vocabulary about your subject/model, you can use the corresponding types as value for Schema.org’s additionalType property:
<section itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="additionalType" href="http://example.com/vocabulary/photo">
</section>
<section itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="additionalType" href="http://example.com/vocabulary/art">
</section>
If you find a suitable property, you may use its URL as value for itemprop:
<section itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="http://example.com/vocabulary/imageType" content="photo">
</section>
<section itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="http://example.com/vocabulary/imageType" content="art">
</section>
f) Use your own proprietary property
If you don’t find a suitable vocabulary, you can use your own URL as property:
[…] a proprietary item property name (i.e. one used by the author for private purposes, not defined in a public specification)
(Example like the second one in b).)
#unor
My developer told me (talking to him after I posted this) we can use (to avoid adding another meta line to the document):
<section itemscope itemtype="http://schema.org/ImageObject"> # for art
<section itemscope itemtype="http://schema.org/Photo"> # for photography
From tests I see that Google will actually parse this: its structured data previewer show it is being extracted. (though it's structured data preview may throw an error). As such I could use it in a custom search refinement/label.
But, it seems wrong to me from the schema.org standard -- since both classes of
images:(photos),(paintings,drawings,vector)
are all "ImageObjects"

Microdata (schema.org) - Event - empty startDate

Could anyone tell me what if the EducationEvent has not got startDate and endDate, because it is not known yet? If I set an empty value for it ($startIso is an empty string):
<meta itemprop="startDate" content="{{ $startIso }}" />
I get:
Error: Missing required field "dtstart".` error message in validator.
Here’s the code:
<div itemscope itemtype="http://schema.org/EducationEvent">
<h1 class="columns">
<span itemprop="name">{{ $courseTypesDescription->course_type_name }}</span>
</h1>
<div class="dates columns">
<div class="row">
<div class="large-5 medium-6 columns">
#if ($start != "")
<meta itemprop="startDate" content="{{ $startIso }}" />
#endif
<i class="fa fa-calendar"></i>
<span class="text">Start: </span>
<span class="data"> #if ($start != "") {{ $start }} #else N/A #endif</span>
</div>
<div class="large-5 medium-6 columns end">
#if ($exam != "")
<meta itemprop="endDate" content="{{ $examIso }}" />
#endif
<i class="fa fa-pencil-square-o"></i>
<span class="text">Exam: </span>
<span class="data"> #if ($exam != "") {{ $exam }} #else N/A #endif </span>
</div>
</div>
</div>
<article class="description columns" itemprop="description">
{{ $courseTypesDescription->course_type_desc }}
</article>
</div>
I agree with unor's answer but I would recommend you to use http://schema.org/Event rather than using http://schema.org/EducationEvent because Google is currently showing rich snippets on organic search for only those categories which are their in the Help Center document-
https://support.google.com/webmasters/answer/99170?hl=en
What you are implementing is a sub category of Event schema. You are correct in your way as you must be trying to specify the kind of events you have on your website. But as per my experience Google is not showing snippets for all available sub categories present on schema.org like schema.org/EducationEvent
Schema.org is format(syntax) of rich snippet markup implementation and apart from that schema.org has long list of Structured Data categories and Sub Categories. For all of those categories(http://schema.org/docs/full.html) Google doesn't show snippets. Only those appear with rich snippets on Google which are present in their official help center document as mentioned above.
This will increase the possibility to earn rich snippets for your website.
Your usage of Microdata with the Schema.org vocabulary is correct (if you make sure to remove the properties with empty values). Schema.org doesn’t define any required properties.
It’s just that Google Search, according to their documentation, seems to require the startDate property for displaying the Events Rich Snippet (and also location if it’s a single event, and url if your page lists several events).
If you don’t provide it, and if Google’s docs are correct, you won’t get (the chance for displaying) a Rich Snippet for your event. They probably require a future start date because they don’t like to display Rich Snippets for past events.
That doesn’t mean that you should omit the markup. It can be useful for other consumers (even possibly from Google, unrelated to their Rich Snippets), and Google’s Rich Snippets guidelines might change in the future, allowing for other types of Event snippets.