Formating form error in HTML5? [closed] - css

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Hey, I have a form like this:
http://jsfiddle.net/Myxqk/
Try to type something what is not an vaild e-mail address such as "4asd".
See what happens.
Is there a way to format/change this error look?
For example I don't want it all, just want the input border to pulse. Or become red.
Thanks a lot.

Have you seen this example for email field:
http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_form_email
The email validation here is not being handled by html5 but by the server.
Are you using PHP or some other framework?

The best solution in my case was:
Adding "novalidate" to my form tag (so I can still stick to "email" input).
Using jQuery to validate (animate()).
Thanks a lot guys! As I thought in the beginning there is no way of really getting into HTML5 core functions like this one. Sad, but hope they'll fix it. If not it's going to be useless where design counts!

#input {border-color: red;}
?

HTML5 is not widely adopted, so you should not rely on browser behaviour for a spec that isn't even finalized.
Therefore, just have custom JS/CSS which does what you want.

Related

Tridion OData/CDS Examples

Can someone point me to some sample code for working with Tridion's OData Content Delivery web service? I found a couple articles on sdltridionworld.com, but they were pretty basic.
Try this:
http://blog.building-blocks.com/using-the-sdl-tridion-2011-odata-content-delivery-service-to-display-dynamic-content
If that doesn't help, as others have suggested, please be more specific in your question.
Could you please be more specific on your question? As "Puf" mentioned if you could provide some context and what you're looking to accomplish, you might get more precised answers.
Having said that, here is link with an example code (.net) you can look at.

How to automate testing of a browser-based app? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
If it were a windows program, I would use Auto it to automate testing. Is there something similar for browser-based apps?
Nothing too complex, it should just allow scripting (preferable for me to macro-recording) to simulate human interaction with the browser, which means being able to identify fields of a form by name, inject text into some, simulate mouse-click on others, etc and then, after submitting a form, should be able to read text certain named controls, check the status of others (checked, radio group index, read-only, etc).
While I do appreciate a full featured product, I don't appreciate a steep learning curve. so something as simple as the scripting of Auto It woudl be fine.
I don't know if it makes a difference which browser is used, but I could live with MSIE 6 or higher (maybe 7 or higher at a push).
Edit: Three posters so far (out of three) recommend Selenium. One says it is FireFox only and I need to test MSIE, however some quick googling shows that this should be possible (although you might have to set everything up in FF first, then switch over to MSIE).
See http://www.emadibrahim.com/2009/01/19/testing-web-app-with-selenium-explorer-and-net/ and http://wiki.openqa.org/display/SEL/Selenium+Core+FAQ Hope this helps someone.
You have several options to choose from:
Selenium
Watin/Watir
HtmlUnit
Sahi is another option. (We user sahi and selenuim)
Selenium would an the ideal tool for this.
I'd recommend Selenium, though it's for Firefox.
Try out Celerity. It renders javascript and works without a browser
Selenium is widely used, mostly because of their recorder (which is supported only in FF, but you can then replay the tests hitting IE). Its language is commonly referred as "Selenesse".
It's also a great choice if you expect to do some performance testing in a grid... but it seems this is not your case.
However, I would recommend not to use Salenium/Selenesse; instead, look for Selenium + Webdriver (Selenium 2), which is still in beta. The language construct are much better (but you don't have a recorder).
Other good option is Sahi. I found its API to be easier, in the sense that Sahi's code tries to deal itself with the problem of finding the button/link/etc you want him to click. For example, instead of relying in complex XPath expressions, you can say something like "click the link tag nearest to the div with attribute id="menu" (you can do this with one line of code). It has also a recorder.
I want to recommend something I found last week and definitely think that this is interesting.
QA Agent (http://qaagent.com)
It allows you to create web automated test in your browser. I really liked that it is free and you don't need to install anything. It looks like this is a new initiative so there are a lot of improvements which can be done.

What options are there to find out if my ASP.NET MVC view is not XHTML compliant [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Clarification: Thanks for the suggestions of tools for validating XHTML. I'm primarily looking for a solution that will run server side (or on the client with jQuery) so i can set it and forget it during development - and get told when I have issues without having to run a tool all the time.
All this tag soup stuff scares me with ASP.NET MVC !!
I'd be less scared if I could validate each and every view coming out of my view generator for XHTML compliance. This is especially important with the amount of jQuery I am planning on writing. i dont want to spend hours debugging something just to find out I had an unclosed tag somewhere that prevented a selector from working.
What options are there for this. Off the top of my head I'm looking for solutions like the following, but not sure which of these are practical:
JQuery XHTML checker
IIS filter
Browser plugin (I assume theres something for Firebug plugin to do this)
Doing something clever with the MVC View classes (I'm not sure if this is possible or worthwhile persuing).
Modifying the HTML writer to check on 'flush()' and throw an exception if the output is not XHTML.
ASP.NET configuration option I'm not aware of to validate the page.
All options welcome answers !
I'd prefer a server side technology so during debugging I can throw a hard exception, and in production I can log any errors. It must validate the full page after the master page has been applied. Looking for warnings in the IDE is not a good enough solution!
As a plugin there's HTML Validator for Firefox.
w3c html validator is avalable as source so you can download it and do prety much anything you want with it. You could set it up with a list of URLs to constantly crawl your test server and log any errors.
As Jeremy said, the W3C validator is out there, but on a side note to check for the accessibility of your views/ site you can you TAW.
I realise this is slightly off topic, but it's still in an important part of web-site development.

Could I get in legal trouble for copying a website's stylesheet? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I like the simplistic look and design of some of the Microsoft blogs. Alas, I can't join the Microsoft dev party and create my own development blog on the blogs.msdn.com page because I don't work at Microsoft, and I already have my own wordpress blog.
I was looking to have my blog styled to one of the default looking themes shown here: http://blogs.msdn.com/jmeier/default.aspx
Could Microsoft take legal action against me if I used a stylesheet from their page? If I made my page 'based' off their stylesheet, e.g. written from the ground up, would that be copyright infringement?
Could Microsoft take legal action against me if I used a stylesheet from their page?
Absolutely, since you infringed their copyright. On the other hand, it's debatable whether the stylesheet alone constitues a sufficient threshold of originality to justify legal actions1. At the least, taking without asking is often considered rude. ;-)
1) No. It certainly doesn't. A sophisticated design however will.
Yes, you can get in legal trouble for copying a site's stylesheet since it's typically a copyright violation. Worse, you could get publicly bashed on blogs like youthoughtwewouldntnotice.com, making such blog posts about you high-ranked Google results for your name, thus tarnishing your reputation irreversibly.
Don't do it, it's not worth the risks.
You could. You probably wont.
Most importantly: Why bother? CSS is pretty simple, it's essentially positioning a bunch of boxes around, and colouring them..
Just look at their CSS files and layout, and reimplement it yourself.. It'll probably end up easier than reworking their CSS to work with your site (unless you completely copy their site, including the CSS, HTML and layout images), plus you'll learn a lot about CSS while you do it.
AFAIK, and IANAL, and all those other useful acronyms....
Under UK law, I believe you can get away with this kind of thing as long as there are at least 6 demonstrable and obvious differences between the copied article and the copy. Since I'm not a lawyer, I'm not going to go into what constitutes a demonstrable and obvious difference, but I would imagine a colour change would count as one...
You would obviously have to check the laws of your region before taking this advice.
Of course you will, Microsoft China was in a similar situation back when their Juku Blogging Service was found out to be a rip-off of Plurk, and yes, line by line code copying.
Microsoft responded with: “Microsoft takes intellectual property seriously, and we are currently investigating these allegations. It may take some time due to the time zone differences with Beijing.” when they were asked about it.
Here's a link to that article I was referring to.
I think Microsoft uses one of the templates that come out of the box with community server. But even if they didn't, I haven't heard of a case of someone having a cease and desist based on leveraging someone else's css.
Technically, they could. It is a violation of their copyright. If they exercised this right, however, it would likely be a PR disaster.
I think you're probably safe if you use it.
This would be a horrible idea, but you couldn't get into any trouble if you simply linked to their css.
You could also link to a copy of their css that was located somewhere else that is not associated with your website ;o)
Just some thoughts ...

Are there any utilites that will help me refactor CSS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am working with some CSS that is poorly written to say the least. I am not a design/CSS expert, but I at least understand the C in CSS. While the builtin CSS support inside of VS-2008 is far improved over previous versions, it still doesn't quite do what I am looking for.
I was wondering if anyone know of a good program or utility that will help me to refactor and clean up my CSS like what ReSharper allows to do with C#.
Some features that would be nice to have:
Examine CSS files and determine ways to extract common styles like font-style, color, etc...
Plugin to VS-2008 would be awesome!
Examine markup files and make some suggestions on improving the current use of classes and styles.
The Dust-Me Selectors Firefox extension can scan a website and tell you what CSS is used and what is not. Removing unused CSS is one good first step in refactoring.
I have often found that when some section is removed from a website, the HTML is removed but the CSS is not.
TopStyle is popular and always the one I hear recommended. It has recommendations on styles etc.
I use Aptana but this doesn't do an refactoring just flags up errors and allows you to target certain browsers. Using this a a decent CSS book may help.
Firebug is a very good Firefox extension that allows you to examine which CSS declarations are active for which DOM element in your document tree.
Although it does not make any suggestions for improvements, it's a great help when debugging/simplifying CSS code by hand.
The Web Developer extension is also a great help.
If you're using ASP.NET 2.0, there's ReFactor! for ASP.NET
I've had good luck using Stylizer in the past. It's nicer and only costs 1/6 of TopStyle.
There's a Ruby gem called HAML that ships with an executable called css2sass. That executable translates CSS into SASS, which is a metalanguage on top of CSS that makes it much easier to refactor (by better illustrating the relationships among your selectors). Might be worth taking a look.
I used to use WestCiv's StyleMaster, which is a pretty good CSS editor / inspector / debugger app. Combine that with the afforementioned Firebug, and you can't help but stay on top of your CSS.
My attempt at playing around with Less for .NET.
I might be a little late but the ReSharper 6 early access preview (EAP) does this for you!
In a CSS file, entering "#" will auto-complete every ID from your project. Same with a period "." to list all your classes.
Best part: when you rename the selector it will rename it project-wide. It makes refactoring CSS much faster, if not pleasurable.
I like Expression Web's CSS facilities. But it doesn't do much for minimizing or unifying your CSS. You have to understand how CSS works to use it properly.
EditCSS for firefox is amazing.
This site at least helps to sort and minimize your rules: http://www.cleancss.com/
It doesn't get you to where you want to be, but it's a good first step.
Maybe CssTidy or CssOptimiser can help to clean-up and make smaller

Resources