03/23/2015 at 5:14 pm
#324158
Participant
Thanks so much for your help. I’m still having an issue. I edited the code on those lines as you said and although it is redirecting, it is causing the entry to not show up in the wordpress back end as it should. Here is my code, maybe you can point me in the right direction.
/**
* @link http://stackoverflow.com/a/21583714
*/
// if missing doctype (quirks mode) then will always use 'body'
if ( document.compatMode !== 'CSS1Compat' ) return 'body';
// if there's a doctype (and your page should)
// most browsers will support the scrollTop property on EITHER html OR body
// we'll have to do a quick test to detect which one...
// similar behavior as an HTTP redirect
window.location.replace("https://gcba.org/?page_id=6044");
var html = document.documentElement;
var body = document.body;
// get our starting position.
// pageYOffset works for all browsers except IE8 and below
var startingY = window.pageYOffset || body.scrollTop || html.scrollTop;
// similar behavior as an HTTP redirect
window.location.replace("https://gcba.org/?page_id=6044");
// scroll the window down by 1px (scrollTo works in all browsers)
var newY = startingY + 1;
window.scrollTo(0, newY);
// And check which property changed
// FF and IE use only html. Safari uses only body.
// Chrome has values for both, but says
// body.scrollTop is deprecated when in Strict mode.,
// so let's check for html first.
var element = ( html.scrollTop === newY ) ? 'html' : 'body';
// now reset back to the starting position
window.scrollTo(0, startingY);
return element;
}
};
CN_Form.init();
I would really appreciate it if you could help me figure out what I am doing wrong. Again, thank you so much for taking the time to help me out and being so patient. I also attached the file if that helps.
