Submit textarea on enter - textarea

I found many solutions. But not the right one. I don't know if this is accurate, but I read only 2% of users have javascript enabled. I'm trying to stay away from javascript the best I can. Is there a way to submit textarea on enter without javascript? Much help is greatly appreciated. Thank You!

Someone has already asked this here:
Submit Form Without Javascript
Also, you have it backwards; 2% of users have it disabled. While it is good to have fallbacks for JS-disabled users, don't stay away of JS. If you're working on the web, you pretty much have to use JS.

Related

Rails switch (checkbox) caching

I have a task: I have three switches, each of them allows the user to add or remove some parts of the pdf, so basicall customize the pdf output.
So far I understood, that I need to cache the params, for this purpose I'd need to transform those switches into a kind of a "real" form, so that the input can be cached. I am super new to this, I hope, I am getting it right so far.
Thing is, as I don't really know, what am I supposed to do here, I am looking for some help online, but wasn't successfull by just googling. Maybe there are some tipps or tutorials on that, or what's the best way to search for the stey-by-step form params caching? Thanks for any help!

Twilio-Simple sms Form Box

Hi I apologize if this seems like a stupid question or if I am in the wrong section, but I am working for a startup company as their main web designer, but I was tasked with adding a simple referral code to the bottom of the page where all that is needed is where the user put their number in and they get a standard non random code outputed to their phone and if possible their number is databased and I'm just not sure where to start on this, I have followed some of their tutorials, but nothing seems to be following close to this, I have most of my experience in Javascript, CSS, and HTML and this is starting to get into some uncharted territory and I was wondering if anyone could guide me in the right way? Thank you very much for any help!

Rails warning message after clicking a 3rd party link

I am trying to find a way to show a "You are navigating away from this site" message every time someone clicks on a link that takes them away from my site.
I know this can be done for individual links but is there a way to apply it to all links that don't begin with https://www.genericwebsite.com or http://www.genericwebsite.com?
I hope this is clear. Thanks!
Yes, you can achieve this by java script. http://www.codepotato.co.uk/2012/08/09/how-to-create-a-warning-when-opening-external-links-in-jquery/ answers your question.

Page saving script

Specifically I'm looking for a way to save the webpage on the server (It's kind of a hard to phrase question so google isn't giving me anything useful).
I would like to add this function to a button somewhere on the page, then technically anyone who has access to this ContentEditable page can save their progress. Yes I'm aware of the insecurity of this.
What's the best/easiest way to do this? PHP? Javascript?

How to get rid of stupid "pad" labels produced by RTML functions?

I am unlucky to be in charge of maintaining some old Yahoo! Store built using their RTML-based platform.
Recently I've noticed that HTML code generated by some RTML functions is sprinkled all over with "padding images" (or whatever is the conventional name for those 1x1 pixel images used to enforce layout). I have nothing against using such images, but... all those images are supplied with an ALT attribute like this:
<img href="http://.../image1x1.gif" alt="pad">
With all due respect to the original authors of RTML, but they must have been smoking something when they came up with this "accessibility enhancement"... :-(
Anyway, here are my questions:
Does anybody know a list of all RTML functions that generate HTML with all these "pad" images?
Is there any way to get rid of all those alt="pad" attributes without rewriting a lot of RTML code?
NB: This may sound a little cynical, but improved accessibility is not the main goal here. The main goal is to stop exposing those moronic alt="pad" attributes to Google and other smart search engines. So client-side scripting is not going to help, as far as I know.
Thank you!
P.S. Probably, most of you are really lucky and never heard of RTML. Because if somebody would establish a prize for software products based on
commercial success
------------------
usability
ratio, this RTML-based "platform" would probably win the first place.
P.P.S. Apparently someone from Yahoo! finally listened, because I can no longer find those silly "pad" tags in the RTML generated for our store. Nevertheless, one of the ideas offered in response to my original question does provide a very practical solution - not just to the original problem but to any similar problem with RTML platform. See the winning answer - it's really good.
The only way I see is to have your own website front-end that will filter whatever you want from the RTML site....
for example, your rtml site is at http://rtmlusglysite.yahoo.com/store/XYZ01134 , you could host a simple PHP front-end at http:://www.example.com that would be acting like a "filtering" HTTP web proxy, so http://rtmlusglysite.yahoo.com/store/XYZ01134/item1234.rtml would be accessed by http://www.example.com/item1234.html
It's not an ideal solution, but it should work, and you could do some more fancy stuff.
Nice try from the other posters, but there is a very simple RTML command that will do it. . .
TEXT PAT-SUBST s GRAB
MULTI
HEAD
BODY
TEXT #var-with-alt-tag-equals-pad-in-it
frompat "alt=\"pad\""
topat ""
The above RTML will find all instances of alt="pad" and replace it with nothing.
Well you're right on RTML being relatively untraveled :)
Do you have a way to add your own attributes to these images tags? If so, would it be possible to override the alt attribute? If you specify alt="", I would think that would override Yahoo's... Otherwise consider putting a useful alt tag in there for the blind and dialup types.
It's the first time I'm hearing about this platform, but here is an idea: if you can add javascript to the pages, you could write a function that will run after the page has loaded and remove all the alt="pad" attributes from the page.
Unfortunately this solutions works only with browsers that know about scripting, so lynx or some other text based browsers might not support it.
I have shared a link official RTML guide from yahoo. Hope it will help. Thanks!
List of available RTML books and resources

Resources