How to insert a HTML form to a website designed using Adobe Edge Animate CC. Is there any simple way to implement ?
Please Help!
You can add your code on the stage when clicking on the {} brackets.
Inserting code like so:
sym.$('input_box_username').html("<input type='text' id='input_box_username' placeholder='Username'" + " maxlength='60' " + " style='background-color:white; border:1px solid #0B76d1; padding-left: 5px; width:550px; height:26px; font-size:14px;'>")
sym.$('input_box_password').html("<input type='password' id='input_box_password' placeholder='Password'" + " maxlength='40' " + " style='background-color:white; border:1px solid #0B76d1; padding-left: 5px; width:550px; height:26px; font-size:14px;'>")
This example will generate two input field one for a username and one for a password.
The rest of your html code can inserted like so.
In animate in your javascript action-windows, you can refer to a form and the input fields in it - and later (after you have published your animation) you can add this form to your html - next to your canvas, or overlapping it.
Related
I'm working on creating a daily report that collects info from a database and sends it out in an email. The report is formatted fine when I output it into a file.html, however in an email it doesn't show the styling. In outlook it's missing the colors, in gmail it misses all the CSS.
The convert to html portion is:
$mailTable = $callData | ConvertTo-Html -Property "Support Rep",Time,System,Area,"Column X",Description,Resolution -head $css
$twTable = $qualityNums | ConvertTo-Html -Property "Support Rep","Date/Time","Quality Reference" -head $css
my $css variable is:
$css = "
<style>
table {
border: 2px solid #1C6EA4;
background-color: #EEEEEE;
width: 100%;
text-align: left;
border-collapse: collapse;
}
%trimmed out CSS %
</style>
"
And the email body itself is:
If($containsQualityInfo -eq $True){
$emailBody = "Recent Support calls below: <br><br><p>$mailTable</p><br><br><br>The following quality records have been opened:<br><br><p>$twTable</table></p>"
}
Here are pictures of what it looks like in the file, and what it looks like in outlook:
In a file:
And in Outlook:
Why do the colors not show up in Outlook when they appear to be working in the html file?
Update: Apparantly it's because Outlook doesn't render all the CSS I ommited from the question correctly. In there was nth-chil (even); for the row colorization. Problem is also described here.
HTML row style incorrect in email, but not Out-File
Guess I get to have fun refactoring!
We are with extensive struts2 in our application. Now challenging task is to remove all struts2 default validation and introduce HTML5 with Css validation.
Example for struts2 form
<s:form id="userForm" action="userAction" method="post" validate="true">
<s:password key="Pwd" required="true" maxlength="128" />
</s:form>
in this i want to use HTML5 attribute "type=password" and "required" and pattern="(?=.\d)(?=.[a-zA-Z])\w{7,}" and want to make CSS validation for all these. How can i do this. Explanation with example or any related tutorial more appreciated.
I want this to explain the problem I am facing with css validation
Bellow is my struts form
<s:form id="userForm" action="userAction" method="post" validate="true">
<s:password key="Pwd" type="email" required="true" maxlength="128" id="password" pattern="(?=.*\d)(?=.*[a-zA-Z])\w{7,}"/>
<span class="form_hint">Password should contain,</br>
1.minimum of 7 characters. </br>
2. Must consist of only letters and digits.</br>
3.At least one letter and at least one digit</span>
</s:submit type="button">
</s:form>
I want to validate this password field for
1.required means user entered or not before submit,
2.password meets the given pattern criteria if yes i want to turn text to green color.
and my css is as bellow,
.form_hint {
background: #d45252;
border-radius: 3px 3px 3px 3px;
color: white;
margin-left:8px;
padding: 1px 6px;
z-index: 999;
position: absolute;
display: none;
}
.form_hint::before {
content: "\25C0";
color:#d45252;
position: absolute;
top:1px;
left:-6px;
}
#emailId input:focus + .form_hint {
display: inline;
}
#emailId input:required:valid + .form_hint {
background: #28921f;
}
#emailId input:required:valid + .form_hint::before {
color:#28921f;
}
But on screen when i click submit button with invalid password, just HTML5 pattern tag attribute is working with a message like "Please enter required format". how to make my css effective. what syntax I have to use in my CSS file. I mean "#emailId input:focus + .form_hint", "#emailId input:required:valid + .form_hint", "#emailId input:required:valid + .form_hint::before" are not taking effect in my form.
I have used jquery validation-engine with struts tag to apply css validations and have successfully implemented it.
This is the link of the tutorial I followed for jquery-validation engine:
http://www.skill-guru.com/blog/2010/04/18/jquery-validation-tutorial/
and this is how my struts tags look like :)
<s:textfield name="tenant.shortName" label="Short Name" labelSeparator=" " id="shortName" maxlength="3"
cssClass="validate[required,custom[noSpecialCaracters]] text-input"></s:textfield>
EDIT
OK so if you insist on using html5 this is your solution :
How do I specify HTML5 attributes with Struts 2.x? ...
and for using css you can use cssClass="" in struts tags for your css classes.
Note the span won't work inside <s:form> as <s:form> will flourish as tables when it is expanded by taglib. It is never adjacent to password in expanded html code..
One suggestion: You can use the title attribute to show things you want to on mouse hover.. or tooltip attribute in <s> tags
You are probably using the default XHTML Theme, that will generate additional HTML for you (the <fieldset> for example).
Then
switch to the Simple Theme, to gain full control over the generated HTML,
or, since your two fields are no more adjacent, use the ~ (General Sibling Combinator) instead of the + (Adjacent Sibling Combinator).
I have a page where I don't have access to html who content this:
<span id="page_title_text">Welcome - Overview</span>
and I would like get this:
<span id="page_title_text">Overview</span>
Due to the fact I cannot simply modify the text in the code itself, I wondering if is possible to hide the text "Welcome -" with css only (I have access to css related file).
Any suggestion ?
thank
You can just update the text or do an actual replace:
Update Text
document.getElementById('page_title_text').innerHTML = 'Overview' ;
Replace
document.getElementById('page_title_text').innerHTML =
document.getElementById('page_title_text').innerHTML.replace(/Welcome -/,'');
jsFiddle
#page_title_text:before {
content: "Welcome - ";
}
People don't seem to be understanding your question...
I'm not sure if this can be accomplished elegantly.
You can try something "hacky" like this though:
#page_title_text {
position:absolute;
top: -15px;
width: 70px;
}
#page_title_text:first-line {
color:white;
}
JSFiddle
Of course this answer assumes existing styling etc. And it doesn't get rid of the textual content as well. There are just ways to hide it (with coloration or positioning etc.)
Am using bootstrap LIKE dropdown menu with custom HTML5 attribute with data- as a prefix with a value starting from #, now for some reason I can't change this.
Here's the script link (It's like this dropdown)
Now the issue is am using dynamic approach using PHP so child of an element changes often so I am not using nth-child so thought of using attribute-value selector but CSS doesn't accept if value contains #. Any workarounds for this?
<div data-demo="works">This works</div>
<br />
<div data-demo="#doesnt_works">This fails</div>
CSS
div[data-demo=works] {
color: red;
}
div[data-demo=#doesnt_works] {
color: green;
}
Demo
Use quotes:
div[data-demo='#does_work'] {
color: green;
}
DEMO
Why it has to be quoted? Because # has special meaning in CSS. Quoting it hides that special meaning. The same effect could be approached using ": [data-demo="#does_work"] or by escaping # with \: [data-demo=\#does_work]
Wrap the value in quotes "
div[data-demo="#doesnt_works"] {
color: green;
}
http://jsfiddle.net/jeq5W/1/
IS the AjaxControlToolkit.CalendarExtender control bindable?
In my eWorld.CalendarPopup you use the database to set holidays, and there are numerous graphical properties. It seems to me that:
the CalendarToolkit has no method to link itself to some database full of holidays
the only way to format the look at feel of the calendar is via CSS.
(1) Are these assumptions correct? Is the CalendarExtender thus considered a limited control?
(2) I take care of styling in the Render event handler, as in:
writer.Write(#"<Style type='text/css'>
.ajax__calendar_container
{
padding: 0px 0px 0px 0px;
}
.ajax__calendar_header, .ajax__calendar_footer
{
font-size: " + (CalendarFontSize.IsEmpty ? "8pt" : CalendarFontSize.ToString()) + #";
font-family: " + (string.IsNullOrEmpty(CalendarFontName) ? "Verdana" : CalendarFontName) + #";
font-weight: bold;
background-color: #dcdcdc;
border-width: 0px;
}
//...
//...
</Style>"
);
base.Render(writer);
To answer your first question... the AjaxControlToolkit.CalendarExtender is not bindable, however, the control that it is extending can be. For example, if you add the AjaxControlToolkit.CalendarExtender to a TextBox control, you can bind the text box to a value in some database.
The AjaxControlToolkit.CalendarExtender only does what it was designed to do... extend existing controls by showing a calendar control where users can pick a date. However, it is not a calendar control...