The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Automatic Form javascript code don't work anymore on ModernBB

2 posters

Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 8:18 am

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/
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 9:14 am

Hi, @Manata.

Are you referring to this code?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 9:34 am

Yes.
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 9:35 am

Can you please post the code you are using here?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 9:38 am

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]');
    }
});
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 9:41 am

Okay, thanks. Which part of the forum is this for?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 9:42 am

All forums in Services category + Post and Affiliate Exchange + Battles
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 9:45 am

Did you add any other JavaScripts or CSS, or any template editing before you noticed the JavaScript ceasing to work?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 9:46 am

No, I didn't.
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 9:46 am

Okay, and you have that targeted only in all pages, correct?

EDIT: Meant all pages.


Last edited by Draxion on March 24th 2017, 9:47 am; edited 1 time in total
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 9:47 am

Yes, only when creating a new topic.
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 9:48 am

Sorry, I meant did you put the JavaScript to be placed in 'all pages'?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 9:49 am

Of course.
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 9:51 am

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]');
  }
});
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Manata March 24th 2017, 9:53 am

Still not working.
Manata
Manata
New Member

Posts : 24
Reputation : 4
Language : English

http://www.promotionstorm.com/

Back to top Go down

Automatic Form javascript code don't work anymore on ModernBB Empty Re: Automatic Form javascript code don't work anymore on ModernBB

Post by Draxion March 24th 2017, 10:07 am

Solved via PM.
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum