In general, how do you display client-side validation messages on a web page to make it easy to read out? Alerts are read out nice but are forbidden in the current design.
I'd suggest using a paragraph or similar (optionally invisible) with a role of alert.
<p id="error-msg" role="alert"></p>
When something goes wrong, put the text in the error-msg element, with Javascript of some description.
document.getElementById("error-msg").innerHTML="What are you doing you fool!";
Or something to that effect.
I believe this is what YouTube uses to let a user know when a new video in a playlist is loading.
Hope this helps.
Related
I'm writing an app which involves letting users to share comments on a website, which has a comment form with Google's reCAPTCHA embeded. I would like to load this page via HTTP and display CAPTCHA within my app, so that user can post comments from my app. Is it easy to implement or should I rather try other solution?
EDIT:
I've red reCAPTCHA developer guide. If I would like to embed captcha inside my form, I'd need to insert div element with a proper class, and make a ajax request in order to render captcha. This call would insert an iframe into a given div. What I need is to know how to access that iframe's content without using AJAX.
Turns out we are not supposed to do that kind of tricks with reCAPTCHA.
There is no support for that in API. It seems that it was part of Google's design to prevent that kind of usage.
The only walkaround I could come up with is to implement a WebView widget with JavaScript support, get website via http, and load it into this webview, centering this view around the form we want to post.
It seems like a lot of work though, thus I'm going to simply skip this, if someone successfuly manages to figure it out I'd appreciate a hint :)
In a project I'm working on (ASP .Net 3.5 web forms), there is a requirement to restrict the user to work in only 1 window/tab at time. I found this post detailing a solution: http://www.codeproject.com/KB/aspnet/MultipleTabWindows.aspx
However, in one of the pages of my project there is a requirement to open a private (related to the logged in user) pdf document in a new window. The way I'm doing it is by building a request to a page inside of my project and, from that page, stream the pdf document. So, the url of my document looks something like: http://localhost:4087/PdfPage.aspx?type=1&id=2
Q: is there a way to bypass the "single window" rule for only the pdf page or should I say "No, the only way is by opening the pdf in the same window"?
Thanks in advance
When I used the example I put the code on the master page that most of the pages use. Some of the exceptions are links to pdf documents and the login page and assorted error pages.
If that doesn't work you could add logic to the javascript block to look at window.location to allow certain pages through.
Someone needs to say it, implementing any kind of security through javascript is inherently weak. All this really gets you is a short cut to state-management.
Under ideal conditions you should work with your client to make them receptive to the advice their IT department has to offer, instead of them mandating implementation whatever feature they see someone else use. Easier said than done, I know.
Best of luck!!
I'm sending auto mail for my new subscribers via MailChimp, the mail is sent and every thing is fine but with a footer which gives user option to unsubscribe from the list...anyway I'm trying to disable that footer but all comes in vain, I tried to set the auto footer to false but nothing happens and here is sample of my code
var campaignCreateOpt = new campaignCreateOptions
{
list_id = listID,
subject = Subject,
from_email = from_Email,
from_name = from_Name,
template_id = 0,
auto_footer = false
};
I think you'll have a better chance of your email getting out to most of your list if you allow the unsubscribe.
It's generally not smart to not give people an option to unsubscribe. If they do not see an unsubscribe option, they can mark you as spam. If you get too many "spam" complaints, your email may not reach the inboxes of even the people who would like to stay subscribed.
I doubt mailchimp will allow removal of the unsubscribe.
Reasons:
Mailchimp's Terms of Service does not allow you to send an e-mail
without the unsubscribe link. If you don't provide the unsubscribe
link, they will insert it using the gray footer bar.
Also, if your account is free, and you don't use the REWARDS tag,
they will also insert it through the gray bar.
The third probable reason is that if your code is complicated or
broken, they might see it as an attempt to hide their UNSUBSCRIBE or
REWARDS tag, so they will automatically add the gray bar to your
e-mail.
Hope I helped you.
Source: http://kb.mailchimp.com/article/why-am-i-getting-a-gray-bar-or-a-2nd-footer-that-i-cant-edit
I took the time to invest some further and maybe have to apologize to Mahmoud Ghoz and I will if you can test the following for me.
Probably the following is happening: your not including a *|UNSUB|* tag or you use a free account and not including a *|REWARDS|* tag? If this is the case, the footer will always be added no matter which value you use for the auto_footer property.
So try to include a *|REWARDS|* and *|UNSUB|* tag in your mail and do a recheck. Please let's us know if it works. But like I said earlier you account can be temporary locked if you get to many spam warnings which could be the case if you not supply a unsub link.
I guess this is not allowed for free user to do so
I had a similar problem, it turns out that my issue was a background image (in inline styles) in the footer. MC clearly thought I was trying to hide the unsubscribe link! I have removed and all is now good.
I would like to know at which stage is it okay to start manipulating HTML elements/content using Javascript so as not to impair SEO?
I have read somewhere that HTML content that is hidden using the CSS property display:none is often penalized by Google crawlers, with good reason from what I'm led to believe...I ask this as I intend to have some div panels that are initially hidden, but shown once the user clicks on an appropriate link. My intention is therefore not to hide content from users entirely - just intially to give them a better user experience - I'm afraid Google may not see it that way!
My reason for doing this is to prevent the split second (or in some cases, a full 2 seconds) of ghastly unstyled html elements (positioning), before my Javascript comes in to position, hide and neaten everything up. So adding the display:none at the forefront, and then using Javascript to toggle visibility would have been ideal, but is apparently a no-no with Google Search Engine bot.
Do you experts have any advice? Thank you!
google can now crawl AJAX sites using a simple URL substitution trick; you might be able to take advantage of this to let googlebot see a plain html version of the page for indexing instead of your load-optimized page; see http://code.google.com/web/ajaxcrawling/docs/getting-started.html
If the content in question exists on the page in the html, and is accessible to the user by the time the page finishes loading initially, then you are okay. You want to make sure google can lead a user to your page and see the content in question without requiring further interaction. Adding new content to the html after the initial load (i.e. content from the server), can be problematic for SEO. However if all content is in the html by the end of the page load, then you shouldn't get docked. Keep in mind, good SEO strategy dictates using standard methods of usability so the web crawler can access your content.
Also, each page should follow a content theme. Example: Don't abuse users by hiding five different unrelated blocks of content "medical devices, kazoos, best diners, motorcycles, toxic waste" on one page. Theoretically you could take all of your site's content and lay it out on one page using javascript and 'display:none' waiting for an 'onClick', but that smells like spam.
EDIT, additional info as pertaining to the original question:
The search engine friendly way to display content dynamically is to load it, then hide it from the user.
I am working on a Flex AS3 application and wanted to add the Facebook Like button inside the app. I am unable to find any API or anything apart from the http://developers.facebook.com/docs/reference/plugins/like code generator.
Any ideas on how this might be accomplished? I am quite new to the recent changes in the Facebook Platform, so any info would be appreciated.
A direct "like" button should not be possible, since Facebook needs to sandbox the whole thing. Both like button formats (iframe and xfbml) use a sandboxed iframe, so nobody but facebook can set "likes" or know anything about the user.
For that to work with Flash, I think facebook would have to provide the button itself as a SWF file so you can load it in Flash. Then it can create a sandbox within itself and thus load the user information safely. Very much like the Chromeless Youtube Player, where it's almost impossible for Flash to access the actual FLV URL (even through introspection).
But even so, I don't think this would provide enough security... realize that you are dealing with very private user information and credentials here.
The only way I know you can "like" stuff through Flash is first doing the whole Facebook Connect thing (several popup windows asking the user for permissions) and then using the API of your choice to do the actual "liking", for instance, with the Graph API:
http://developers.facebook.com/docs/api#publishing
The closest information I could find are these 2 items so far. Hope it helps you in your journey.
Facebook Developer Site: Source
Facebook like button in flash
I hate answering "no" to a question because what I really mean is "I don't know and I can't find a way". I'm sure your Google-fu is as good as mine. All I can see are Facebook forum posts like this where people are asking the same question and no one is answering.
The examples they give of the like button are either embedded in iFrames or using XFBML <fb:like ../> tag. There are no examples of how to like something using their new graph api or either of their old APIs (FQL and REST API).
I had to get a Facebook like button in a html page (looked like a header on the top) and get the swf embedded below. As its a complete flex app in my case, this work around was possible and plausible