redactor.js - Redactor - got to custom URL on submit -


i have page multiple forms, hidden based on link active. 1 of these forms using redactor , want send user page redactor form open on submit. default page refreshes on submit , shows default form page. couldn't find in docs. if knows how accomplish please let me know. thanks

to solve need use window.location.hash can send hash variable url when click on link form.

the urlhash works follows:

var urlhashval = window.location.hash.substr(1); //get hash value , store var $('form').hide(); //hide forms default $('form#' + urlhashval).show(); //show form id matches hash value 

what enable send link someone, http://ucanstayatthe.ym.ca#myform , open page form#myform on display.

now have enable urlhash work within page well. on page show/hide forms based on links. need write formid url link. add fromid href eg. "#myform". when click link display #myform @ end of windowurl.

this solves of problems because when page refreshes on redactor submit, reload url including hashvalue have written it. instead of reloading http://ucanstayatthe.ym.ca reload http://ucanstayatthe.ym.ca#myform in turn show correct from.

bingo


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -