ruby on rails - How to create a form and connect it with a download -


i'm looking hours now, how create simple form on website , submitting, start download.

i want simple form name, last name, , email adress. should send me via email. submitting name, should either start download of file or if easier, want send e-mail submitted email address download link in it.

any idea on how or know tutorial didn't find yet?

thanks lot! marc

i dont know of framework doing so,

but not hard implement yourself.

  1. make anchor tag redirect user download.
  2. bind evnt of clicking anchor using jquery .on function.
  3. in js function send ajax serialised info. throw .ajax function.
  4. when complete, redirect user using location.assign('/dl.php?f=123.mp3'); built in js function.

is help? (if not, not vote me down, ask further , help)


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -