20
votes
Accepted
Including SVG in a Lightning Component
That is a bug, although there is a simple workaround. In your component markup put the SVG in a DIV, wrapped with a CDATA block:
<div aura:id="svg_content">
<![CDATA[
<svg width="...
14
votes
Accepted
The purpose of ARIA attributes in Lightning components
The Accessible Rich Internet Applications specification provides accessibility features for disabled individuals, as stated in the RFC:
Accessibility of web content requires semantic information ...
9
votes
Accepted
Dynamic Visualforce Components - Access Pass-Through Attributes
No it's not possible.
https://www.salesforce.com/us/developer/docs/pages/Content/pages_html_features_pass_through_attributes.htm
last sentence says:
Pass-through attributes aren’t supported in ...
8
votes
Accepted
Conditional Rendering inside Visualforce pages
Update (2017)
The trick below is good for 90% of cases, especially if you need a placeholder to which rerender might eventually have to inject something. But it can cause problems if you render VF as ...
8
votes
Accepted
How can I force Visualforce to include empty attributes which I have specified?
Here is another way to do it w/o javascript:
Set the value to a VisualForce function that evaluates to nothing:
<apex:page standardController="Contact" >
<apex:form>
<select ...
6
votes
Accepted
draggable="true" is not working in firefox for Lightning Component
As per this blog post "To make an element draggable set draggable attribute to "true". However this is not enough to make elements draggable in Firefox. You need to locate the dragstart event and set ...
5
votes
Visualforce + Google Polymer
The following are great sources for reference
http://www.oyecode.com/2014/10/building-bootstrap-table-using-google.html
https://developer.salesforce.com/blogs/developer-relations/2014/10/chart-...
5
votes
Accepted
Lightning component access to scrollTop
What component has aura:id="myComponent" on it? I would expect to see something like:
<tbody aura:id="myComponent" ...
in your Lightning markup.
Also, I just checked and scrollTop is not ...
5
votes
Accepted
Sorting List in descending order
If you invert the sign of your Comparable, you'll get descending order. Depending on your exact requirements, this is usually pretty easy. Consider the following code:
public class MyController {
...
4
votes
Accepted
Approach to Generate Responsive HTML in Salesforce
You are correct - avoid standard stylesheets and anything that introduces additional HTML markup (such as apex:pageblock) as this won't be responsive. Use tags to output text and access data, iterate ...
4
votes
How can we implement MVC while developing mobile application in Salesforce using HTML5?
If you're writing a Salesforce1 Application, you want to use a SinglePage application. It's much more efficient. What you want to do on the controller side though is use JS Remoting. For more on this, ...
4
votes
document.getElementById().value not working for <textarea> in lightning component
The value property of textarea has just been whitelisted and should be available next week.
4
votes
Accepted
Visualforce Page: Error for Input Type Number: Unable to validate type 'number': data type not provided
apex:input expects a property in value field, following code is working fine:
Controller:
public class Html5Input {
public Integer accountNumber { get; set; }
}
Page:
<apex:page docType="...
4
votes
Accepted
HTML5 DocType not getting set
Adding a "custom" contentType appears to suppress the DOCTYPE. Do not add this attribute if you need the DOCTYPE.
<apex:page applyBodyTag="false" applyHtmlTag="false"
showHeader="false"...
4
votes
Document.fullScreen API implementation in Lightning Web Components(LWC)
Locker is currently preventing access to the fullscreen API, not LWC. You can try out the following snippet of javascript in the Locker console.
document.body.requestFullscreen
// Locker OFF: ...
4
votes
Star Rating not rendering on custom HTML email in Marketing Cloud
It's usually not best practice to have form controls within a email. Your issue may be arising from how different ISPs treat form inputs in emails.
I've worked on similar functionality before. ...
4
votes
Accepted
HTML <select> required Attribute not working in Visualforce?
I had the same issue and I've got this working now:
Instead of:
<option value="">None</option>
Use the following:
<option label="Please Select" value=""></option>
I ...
4
votes
Accepted
How to concatenate a value inside of the href property on lwc
LWCs Templates are logicless and don`t support any Expressions anymore (see also here/here)
The engine doesn’t allow computed expressions
In your case you should either add a new computed ...
4
votes
Accepted
Is it possible to customize the look and feel of the Forward to a Friend Default Page
Other than through the usual BrandBuilder colours and logo, not really. Certain levels of Support have access to Manage to alter the Brand Tags that define much of the page design, but getting ...
3
votes
Accepted
Which browser engine does the Salesforce1 native app use to render visualforce page content?
From what I understand, Salesforce1 is using the Salesforce Mobile SDK which is built on top of Phonegap (see Andrew's informative answer here for more on the technologies behind the Salesforce1 app). ...
3
votes
Accepted
visualforce vs HTML/CSS/JS
Visualforce gives you more of the "salesforce look and feel", but remoting tends to be at least 10 times faster for any type of page, even if you use actionRegion elements, and actionFunction/...
3
votes
Salesforce 1 Visualforce Page offline storage?
At the moment, Salesforce1 is not capable of serving VF pages offline. This has been discussed here as well.
Quoting the Salesforce1 guide: - Salesforce Classic remains the best option if you need ...
3
votes
HTML5 input type number for decimals
<apex:page standardController="Object" doctype="html-5.0">
<apex:input type="Number" html-step="any" Value="yourValue"/>
</apex:page>
Be sure to specify doctype="html-5.0" and the ...
3
votes
Accepted
HTML5 Date pickers today stopped working in Salesforce1 on Android
SFDC Support(Case #10889926) told me:
Our R&D confirmed that this is already a known issue and is subjected
to be fixed in Winter 15 release (around October, subject to change).
I have ...
3
votes
HTML5 Date pickers today stopped working in Salesforce1 on Android
It's ridiculous because HTML5 date input works in regular Android browsers so they did something extraordinary to break it. I'm surprised you say "recently", I've encountered it in June-July and for ...
3
votes
Can't save pasted email code
After narrowing it down to that one table, I ended up rewriting the div with text in it by hand. I guess I may have copied that text block and something weird got copied over. Guess I learned my ...
3
votes
document.getElementById().value not working for <textarea> in lightning component
This is a Locker Service issue. Look at the source here:
https://github.com/forcedotcom/aura/blob/master/aura-impl/src/main/resources/aura/locker/SecureElement.js
The value property of textarea has ...
3
votes
how to compress the image size in visualforce page
The Salesforce server-side-language Apex does not include the byte-level access that would be needed to implement compression there (or include an API for image compression). That leaves you with ...
3
votes
Accepted
Formatting an outputText value field in HTML (VF Page)
I recommend using the ROUND(number, num_digits) function. From the Visualforce Developer Guide on Functions:
Function
ROUND
Description
Returns the nearest number to a number you specify, ...
3
votes
Accepted
Water ripple effect on background
This page produces the ripples when you move the cursor over the page header or footer:
<apex:page>
<apex:sectionHeader title="Test Page"/>
<p>Test Page Body</p>
<script ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
html5 × 161visualforce × 78
javascript × 34
apex × 22
lightning-web-components × 22
html × 17
salesforce1-app × 15
lightning-aura-components × 13
css × 12
lightning × 10
canvas × 8
css3 × 8
marketing-cloud × 7
email-template × 7
email × 6
aura × 6
mobile × 6
validation × 5
slds × 5
lightning-design-system × 4
jquery × 4
date × 4
video × 4
controller × 3
visualforce-component × 3