i have a .aspx page, where i have some user controls, nested inside <table> tags, some of them are link this:
<td runat="server" id="LoadContext" class="tb_RightTD">
<cc1:RMWDropDownMenu ID="ddLoadContext" CssClass="ddLoadContext" CaptionCssClass="lbContext" CaptionExpandedCSSClass="lbContextExpanded" ImageCssClass="lbContextImage" ImageExpandedCSSClass="lbContextImageExpanded" runat="server" DropDownContentsBoxWidth="0px" DropDownMenuCellCssClass="DropDownMenuCell" DropDownMenuItemCssClass="DropDownMenuItemCssClass" DropDownMenuItemHoverCssClass="DropDownMenuItemHoverCssClass" DropDownMenuTableCssClass="DropDownMenuTable" meta:resourcekey="ddLoadContextResource1" TableCssClass="dropDownTable" Value="" DropDownContentsPanelId="" ExpandImagePath="" TableExpandedCssClass=""></cc1:RMWDropDownMenu>
</td>
i can't understand how this works, because, i'm just changing the "frontend", and... this code generates a table soup with some links inside. i want change the structure of this "dropdown" and in his place, use bootstrap structure, to make it look better, i need some help to override this thing, i know php, but asp is not my beach.
folder structure image
here the page i'm editing: http://pastebin.com/kgsMk2mH
Related
When you add a button on a Mailchimp template, only the text within the button is clickable. Not sure why they designed it this way...is there a good reason for this?
If not, is there an easy way to make the entire button clickable...I've thought about just creating a button image...and making it linked...but trying to avoid that if possible.
Give this article and technique a go.
https://www.emailonacid.com/blog/details/C13/bulletproof_buttons_for_office_365_and_everything_else
I use it every where and it has a fall back for Outlook.
Be sure to check the comments for any tips from users who have figured a few quirks out from the originally supplied snippet.
Like my comment about adding stroke="f" to the snippet to remove the default stroke on linked buttons.
The easiest way to get a button fully clickable is to build the button with an HTML table and wrap the table in an anchor, like so:
<a href="http://www.website.com">
<table border="0" width="">
<tr>
<td><span>Click Here</span></td>
</tr>
</table>
</a>
It is not valid in HTML4, but is valid in HTML5, but not much of what goes into an HTML email is valid, so I do not worry about it.
The problem with this approach is that it is still hard to edit in most, if not all, HTML Email platforms, such as Mail Chimp or Campaign Monitor. A non-coder who sends email will have to go into HTML view to edit the email - not ideal.
In MailChimp, their editor breaks the parent anchor, stripping it out altogether.
Test it in your email platform of choice, it is a simple solution.
I have recently started to make some User Interfaces for Websites. What i am currently using something called Bootstrap, which is easy to start with and looks good. But the idea behind does not seem too efficient, since we are making our jsp code (the content) dependent on the css elements like this:
<tr class="row col-m-7">
<td class="column"> ...
<a class="btn btn-xs btn-success"> .. </a>
</td>
<td class="column"> ... </td>
</tr>
Recently the Bootstrap has introduced a newer version (v3), and i had to change many class attributes until the jsp gets a stable look. I would like to keep the code in separate layers for content and presentation like this, so i can easily switch my UI framework without loosing any content:
Content (simple html or jstl):
<tr>
<td>...
<td>...
</tr>
Presentation:
.. somehow achieving giving a good look to the table above .. (how ???)
How can i separate content and presentation layers on JSPs?
UPDATE
A new standard is being developed, called Web Components, which will enable developers to create custom html elements which hide the implementation of styling and inner html markup. For example, a modal widget could be declared by the following syntax:
<bootstrap-modal>
<h1>Hello World!</h1>
</bootstrap-modal>
Behind the scenes, the developer has specified the actual html markup used to render the widget, that implementation is tied to the custom component.
Here are a few tutorials to get you started:
http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/#toc-separation
http://css-tricks.com/modular-future-web-components/
https://hacks.mozilla.org/2013/08/introducing-brick-minimal-markup-web-components-for-faster-app-development/
If all <a> elements were to look the same, then you could write one css class and all <a> elements would have the same styling:
a {
color:blue;
}
Some websites, for whatever reason, possibly even concerning the value of the href attribute; will want different colors and styling for different <a> elements. The only way to achieve that is with the class attribute which refers to a css class from a stylesheet:
a.red {
color:red;
}
<a class="red" href="red.html"/>
This means that if you want unique styling for same element names, you will always need to write code which links together the presentation element and the styling.
I'm working on aspx pages and i have asp.net Menu and CSS assigned to it.
But when I run the application the CSS class names get changed and its dynamically created as we see in controls inside "ContentPlaceHolder".
The code is
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu"
EnableViewState="False" IncludeStyleBlock="False" Orientation="Horizontal">
<DynamicItemTemplate>
<%# Eval("Text") %>
</DynamicItemTemplate>
<Items>
.
.
.
</Items>
</asp:Menu>
please check this Image what i get when i run this..
I checked my application to know whether the Menu control is placed inside content placeholder or anything. But its not.
Do anyone know how to solve this issue.
class="menu ct100..." means that this element has two classes 1:menu and 2:ct100...
and nothing is wrong with it!the ct100... is generated by asp.net and if it is different any time you run the page it's up to asp.net component and if you dont like that try not to use this built in component, that i think you should do it.
by the way the only thing is changing when using master pages is client side id, that you can avoid this from happening by code below
<asp:TextBox ID="myId" runat="server" ClientIDMode="Static"></asp:TextBox>
set ClientIDMode to Static
Is there a way to only allow a user to edit a link's destination, and not the link itself, using MailChimp's template language? There doesn't seem to be anything about this specific situation in their documentation.
For example:
<a href="link.html" target="_blank">
<img src="button.gif" alt="Button Name" />
</a>
So I want to allow the user to ONLY edit "link.html" to point somewhere else, as the link button never changes.
Unfortunately, to make matters more complicated, there's an unknown number of links in the template (thanks to the use of mc:repeatable), so the solution cannot be hard-coded to a specific link.
Is this possible?
I ran into exactly the same issue today. It seems the individual href attribute cannot currently be made dynamic using merge tags in Mailchimp.
The best workaround I've found is to create an editable field (span) within the repeatable section that contains the link and button image.
<tr mc:repeatable>
<td width="600px">
<span mc:edit="offer_link">
<a href="http://www.mywebsite.com" target="_blank">
<img src="http://www.mywebsite.com/images/button.png" width="100" height="30" alt="view offer button">
</a>
</span>
</td>
</tr>
When the sender creates the email from the template, they can click the '<>' icon in the editor to edit the html for the link. They'll need some very basic HTML knowledge but it'll do the trick.
In your MailChimp template, instead of using <a href="link.html" target="_blank">, use a Merge Tag instead. So for example:
<a href="*|CUSTOM_URL|*" target="_blank">
Follow these steps to complete the set up:
Go to Lists > Create Forms and add a new input field.
With the field selected, click on Field Settings.
Label the field Custom Url.
Set the Field Tag to CUSTOM_URL
Uncheck Required Field.
Set Field Visibility to Hidden.
Set the Default Merge Tag Value to http://www.example.com/new-link.html (in other words, this is where the SENDER would input the absolute URL that you want your link.html changed to before sending each Campaign.
When the Campaign is sent, it will automatically fill in this default link (new-link.html) for the href attribute on the link without the SENDER actually modifying the campaign.
Just be sure that no one actually enters a value into this field when adding subscribers or it will override the default value set by the SENDER.
I have come to the same conclusion as many here, there is no easy way to do this in MailChimp, or Campaign Monitor.
In MailChimp, the only current way is to use their boilerplate templates that have "Content Blocks," which make editing very simple - you just can't custom code your own template. What we need is the ability to code custom templates with 'Content Blocks,' which is not currently available in MailChimp.
Read about Content Blocks Here:
http://kb.mailchimp.com/campaigns/content-blocks/about-content-blocks
I have a form within a table which is within another form. My problem is that the embedded form tag is not appearing - the input and iframe appears, but the form tags do not appear. The table and outer form appear. What's wrong?
<form>
<table id=\"mytableid\">
<tr class=\"form_row\">
<td align=\"right\">
Upload Photo:
</td>
<td align=\"left\">
<form action=\"/myuploadpath\" method=\"post\" enctype=\"multipart/form-data\" target=\"upload_target\" id=\"photo_url_upload_form\" name=\"venue_photo_url_upload_form\">
<input type=\"file\" name=\"photo_url\" id=\"photo_url\" size=\"40\" />
<iframe id=\"upload_target\" name=\"upload_target\" src=\"#\" style=\"width:0;height:0;border:0px solid #fff;\"></iframe>
</form>
</td>
</tr>
</table>
</form>
Putting a form inside another form is not valid HTML. When this happens each browser will do different things with the markup. Some ignore parts, some break, etc. Either way you shouldn't do this.
Edit
If you are using tables for layout purposes, you technically shouldn't be. They are only meant for tabular data. You should use divs/spans and CSS to create the look you want on your site. A great place to learn about this stuff is W3C Schools.
I assume you're using something like Firebug or the Chrome DOM Inspector to look at your DOM tree and you can't see the inner <form>. These tools inspect the DOM itself, not the HTML source. That is, they show you what the browser has interpreted from your HTML. The problem in this case is that nesting a <form> within another <form> is invalid, and hence the browser has ignored it and continued parsing the rest of the document.
Obviously, the fix is to ditch that outer form since it's not doing anything. If you have it there for styling purposes, perhaps use a <div> with a class.