Automatic Form javascript code don't work anymore on ModernBB
2 posters
Page 1 of 1
Automatic Form javascript code don't work anymore on ModernBB
Hi! Moved my forum to ModernBB. The Automatic Form javascript was working till last night ( was working on ModernBB but for a while ). Now it just don't work anymore. My forum URL is: http://www.promotionstorm.com/
Re: Automatic Form javascript code don't work anymore on ModernBB
Can you please post the code you are using here?
Re: Automatic Form javascript code don't work anymore on ModernBB
It was working till last night.
- Code:
$(function() {
if (location.pathname == '/post' && location.search == '?f=4&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=18&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=19&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=20&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=22&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=5&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Review Type:[/b]\n[b]Review Areas:[/b]\n[b]Extra Notes:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=6&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Package Type:[/b]\n[b]Extra Notes:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=7&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Advertising Type:[/b]\n[b]Extra Notes:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=8&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Exchange Type:[/b]\n[b]Extra Notes:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=26&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Exchange:[/b]\n[b]Extra Notes:[/b]');
}
});
$(function() {
if (location.pathname == '/post' && location.search == '?f=11&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Category:[/b]\n[b]Extra Notes:[/b]');
}
});
Re: Automatic Form javascript code don't work anymore on ModernBB
Okay, thanks. Which part of the forum is this for?
Re: Automatic Form javascript code don't work anymore on ModernBB
All forums in Services category + Post and Affiliate Exchange + Battles
Re: Automatic Form javascript code don't work anymore on ModernBB
Did you add any other JavaScripts or CSS, or any template editing before you noticed the JavaScript ceasing to work?
Re: Automatic Form javascript code don't work anymore on ModernBB
Okay, and you have that targeted only in all pages, correct?
EDIT: Meant all pages.
EDIT: Meant all pages.
Last edited by Draxion on March 24th 2017, 9:47 am; edited 1 time in total
Re: Automatic Form javascript code don't work anymore on ModernBB
Yes, only when creating a new topic.
Re: Automatic Form javascript code don't work anymore on ModernBB
Sorry, I meant did you put the JavaScript to be placed in 'all pages'?
Re: Automatic Form javascript code don't work anymore on ModernBB
Hmm, I'm not sure what could cause it from not working other than possibly other JavaScripts in the same area overriding it. Let's try rewriting the code so it only works under one function. Replace the code with this and give it a go.
- Code:
$(function() {
if (location.pathname == '/post' && location.search == '?f=4&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=18&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=19&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=20&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=22&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Your nickname on the Forum/Website:[/b]\n[b]Description:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=5&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Review Type:[/b]\n[b]Review Areas:[/b]\n[b]Extra Notes:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=6&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Package Type:[/b]\n[b]Extra Notes:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=7&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Advertising Type:[/b]\n[b]Extra Notes:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=8&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Exchange Type:[/b]\n[b]Extra Notes:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=26&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Exchange:[/b]\n[b]Extra Notes:[/b]');
}
if (location.pathname == '/post' && location.search == '?f=11&mode=newtopic') {
$('#text_editor_textarea').val('[b]Forum/Website Name:[/b]\n[b]URL:[/b]\n[b]Category:[/b]\n[b]Extra Notes:[/b]');
}
});
Similar topics
» Automatic Form Code Not Working
» ModernBB - Javascript code management and templates managment
» javascript code work with members but doesn't with visiteurs
» im think html dont work on my templates orr i dont know because im new in forumotion
» I dont want dragonclan.org anymore
» ModernBB - Javascript code management and templates managment
» javascript code work with members but doesn't with visiteurs
» im think html dont work on my templates orr i dont know because im new in forumotion
» I dont want dragonclan.org anymore
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum