Button being used as a link - input

Im maintaining a site I didnt build thats for car insurance. In the banner of every page is an input that takes you to a page with a form to fill out. I cant understand why an input is used instead of a link, is there ever a valid and semantic reason for doing this?

Occasionally, people have done this because they want a link that "looks like a button". However, it is bad design.
It was never a good idea, but in the old days there was at least some justification for it: it gave a button feel and functionality to the link. However, with modern web design there is no need to do this: the same functionality can be created simply by styling a normal link appropriately.
On the other hand, this is probably more of a style issue than a real problem. It may not be worth changing it if you are maintaining an existing site.

using button or input type="button" is the original way to set up an Ajax request. that said, since it's taking the user to another page, sounds like they do not know what they are doing and/or wanted the styles that #dan1111 mentioned

Related

Linking to Google PlusOne, without embedding the button (for privacy reasons)

It seems that Google only offers code to embed the +1 button.
However, there are heavy privacy concerns (plus quite some load time) associated with it.
For some pointers about the privacy and legal issues associated with Facebook like and Google +1, see: Like button and privacy concern
A common workaround seems to be a two-click solutionGerman (also discussed on slashdotEnglish), where the first click enables the button (loading the javascript from Google), the second then is on the regular +1 button.
However, I do not want to implement this two-click solution either. Largely because the Google +1 button is ugly as hell, and doesn't fit to the page layout.
What I'm really looking for is a separate web page, where the user can essentially confirm that he likes the page. This page can live on google.com, and essentially this would be the second click. I'm not trying to trick people into +1'ing the page. The second click is all fine with me. I just don't want to force them to load the plusone button (and I don't like its looks).
There seems to be the option of
https://plus.google.com/share?url=<URL>
which however is a share on Google+, not a +1.
I've seen this URL, too:
https://plusone.google.com/_/+1/confirm?hl=en&url=<URL>
(see e.g. here: Adding a Google Plus (one or share) link to an email newsletter) but I cannot submit this form (i.e. doesn't seem to work).
The best working solutions seems to be the two-click approach. :-(
Update: the url, https://plusone.google.com/_/+1/confirm?hl=en&url=<URL> actually does seem to work. It was just my privacy proxy breaking it. Then it seems to be more of a "Google+ share" dialog. I'm not yet happy with this result (in particular, since this doesn't seem to be an advocated approach for Google, and they can at any point consider to ban the site, I guess)
The only officially supported method of +1'ing a URL is with the +1 button. Either always loading or loading it on a second click.
The approach that I'm now looking into is fairly trivial:
I've set up a Google Plus page for the web site, and the "plus" button sends user there. In fact just like the Facebook icon I'm using. Then the users get the full choice of interaction options, including +1, but also circling and sharing.
First of all, this obviously should not violate any g+ policies. Secondly, it is a fairly transparent behaviour for the users. The "plus" button takes them to Google plus, where they see the usual plus UI.
Secondly, it's still just two clicks to "+1". So it is not worse than any other data privacy compliant solution.
I found the solution here.
The problem is, social sites accepts your own "share" forms, but only if the link is URL encoded.
In Wordpress, a custom Google+ button that I'm using without the official API, and it's currently working, is this following code:
google+
Hope it helps, go to the link above for a list of the rest of the social sites links. :)

Titanium HTML Scrape

I could not be any more brand-spanking new to Titanium, so even finding the right search terms is a chore, but I need to prototype a means of loading external content into a mobile app. Lots of random poking around has yielded the url configuration property of the createWebView() method, but there's a twist (didn't you know there would be?). Now I need to extract only a particular DOM node (the div with an id value of content) and display only that content.
As best I can tell, it looks like the Kitchen Sink app's "XHR to Filesystem" demo looks like the right way to go, but I don't want to spin my wheels. Can anyone confirm whether I'm on the right track?
As a side question that I (admittedly) haven't researched much yet is whether I can load jQuery into my Titanium app and use it to extract the #content DOM from everything else.
I'd appreciate any thoughts.
you are on the right track with using the httpClient, you can also load up jQuery, but i think that it might be overkill if you are just trying to pull some content from XML
http://wiki.appcelerator.org/display/guides/Working+with+Remote+Data

Where can I read how to make web notifiers such as the StackExchange at the top left side of StackOverflow screen?

I'm not even sure what the name of that is to be able to make a search... but I would like to make those kind of things. Facebook has that too with the messages, notifications and friends requests. Thanks
I'm not sure if you expect anyone to give you a complete tutorial with source code included? :) You should probably do some digging around yourself, since a concrete answer on this could mean to write a few pages :)
How can you dig around?
Thé tool for a job like that is Firebug (IMO).
With bigger tasks like these it makes sense to try to split it up in smaller pieces.
Let's say you go for a widget like the user profile popup on SO.
you need some HTML to display in a popup: right click on any html element on the popup and click the 'inspect element' menu item. This brings you to the HTML tab in firebug. This allows you to figure out how the HTML is structured
you need some CSS to style that popup: when you're browsing the html structure, you might already have noticed that on the right side of it is the CSS that is applied to the active element
you might want to use some animation effects: for that you could use jquery. Have a look here to find out more on which effects are available and how they can be triggered. Fading is used in the profile popup on SO.
then you might ask yourself the question where SO get's that html structure from, right? To find out more about which server calls are made you can use the 'NET' tab in Firebug. (When you hover over your user name (only the first time?), then you should notice there's a call made to something like: http://stackoverflow.com/users/profile-link-stats?_=someLongNumberHere
In firebug you can then inspect the request and response. You should notice that the response is some HTML structure. This HTML structure is then inserted into the DOM.
Sooooo you can kinda glue it all together now:
the user hovers over his user name
the hovering triggers a server call (see step 4): use jquery hover to attach a handler to the user link. (subsequent hovers don't trigger that server call, so there needs to be a check to see if that profile popup was already loaded or not)
when the server call successfully returns (see jquery get), the returned html is inserted into the DOM and a fadeIn effect is triggered.
it seems a mouseout is used to fadeOut the popup
I HOPE this is the answer you were looking for. It took me a while ;)
You probably need to check out stackapps

Checkbox as alternative to captcha?

Does a checbox provide an alternative to using captcha on website? I am thinking i i need to use captcha for user signup. Instead if i put a checkbox for the terms like "By clicking here I agree...." can that solve the bots issues or is captcha required in addition to the checkbox?
One thing you can do with a checkbox is to make a honeypot. To do so, you would make a checkbox and hide it with CSS (because bots, as a rule, don't care about CSS). If the box is checked, then it's probably a bot.
If you are trying to keep bots from signing up, they will be able to check the checkbox pretty easy. the point of the captcha is that it takes human intelligence.
No, bots can check boxes, use a service such as http://www.google.com/recaptcha to easily make a bot-proof form.
Not at all, a checkbox is just like any other input, which bots manipulate.
As recommended above recaptcha is good. I also like Akismet, which handles this completely different.
Checkbox Captcha generated with client-side Javascript can be an interesting option.
Check out that article published by UX Movement: "Captchas vs. Spambots: Why the Checkbox Captcha Wins" http://uxmovement.com/forms/captchas-vs-spambots-why-the-checkbox-captcha-wins).
This technique can work, but it is not too difficult to beat, given time and an interest in your specific site.
Using CSS and Javascript (which isn't completely accessible) to create the checkbox will defeat the more simplistic spambots.
Also using a randomized name (which is verified server-side) for the checkbox POST/GET variable, and perhaps an image for the label (which creates more accessibility problems) will help make this more difficult.
In the end this should work fine, until someone takes the time to target your site or system specifically.
Edit The article linked to in this answer has good information.

How Do I Intercept Banner in WordPress?

My client wants me to make a plugin that intercepts the banner on a WordPress blog so that the existing one displays, but right beneath it, above the content and the sidebar, another banner appears. And he needs it such that it works in most themes and isn't theme-specific.
I found I could use add_action('loop_start','interceptMe') to put something at the top before posts or a single post, but it still left the sidebar on the right. I have tried using add_action('all','test') to dump out different intercepts to see if I could figure this out, but I just can't seem to get it yet. I'm thinking I may have to intercept all esc_html calls and contextually inspect that until I find one used for the banner.
Does anyone know how to intercept the banner to add another one right beneath it?
This is going to be very challenging to do. There's no consistent structure, HTML, or CSS IDs that would allow you to do cross-theme injection like this (hell, some themes don't have a header image). You will likely need to make manual changes to each theme for this.
I suppose you might insert some JavaScript that looks for an H1 tag and inserts your banner right after it. Ceejayoz is right though -- there's not consistency to different themes. One theme might use H1 for the site header and another for a Post title.