Remove pop up search
3 posters
Page 1 of 1
Remove pop up search
Good Morning,
I am trying to remove the pop up search from my forum and instead have the navigation bar just link to the search page. The code has the onclick property to fire the search box, I can't find a way to remove this as it's not accessible in the templates.
Here's a screenshot of why I want to remove it, it falls behind the #wrap in my code.

My forum link is pogoraids.forumotion.com, accessible at pogoraiders.com.. Forum version is ModernBB
Edit: the code that shows in dev console is
So i tried to override using
However this does nothing.
I am trying to remove the pop up search from my forum and instead have the navigation bar just link to the search page. The code has the onclick property to fire the search box, I can't find a way to remove this as it's not accessible in the templates.
Here's a screenshot of why I want to remove it, it falls behind the #wrap in my code.

My forum link is pogoraids.forumotion.com, accessible at pogoraiders.com.. Forum version is ModernBB
Edit: the code that shows in dev console is
- Code:
<a class="mainmenu" href="/search" onclick="showhide(document.getElementById('search_menu')); return false;" target="_blank">Search</a>
So i tried to override using
- Code:
const a = document.querySelector('.mainmenu');
a.onclick = null;
a.removeAttribute('target');
However this does nothing.
Last edited by EnigmaSpirit on January 23rd 2021, 22:15; edited 1 time in total
Re: Remove pop up search
Dear @EnigmaSpirit,
have you tried with this?
Let me know
have you tried with this?
- Code:
$(function() {
const a = document.querySelector('.mainmenu');
a.onclick = null;
a.removeAttribute('target');
});
Let me know

Re: Remove pop up search
Niko wrote:Dear @EnigmaSpirit,
have you tried with this?
- Code:
$(function() {
const a = document.querySelector('.mainmenu');
a.onclick = null;
a.removeAttribute('target');
});
Let me know
This does not work.
Re: Remove pop up search
@EnigmaSpirit try this one then

- Code:
$(function() {
$('.mainmenu[href="/search"]').attr('onclick',null);
});
skouliki and SarkZKalie like this post
Re: Remove pop up search
Niko wrote:@EnigmaSpirit try this one then![]()
- Code:
$(function() {
$('.mainmenu[href="/search"]').attr('onclick',null);
});
You are amazing, thank you!
Niko likes this post
Re: Remove pop up search
Problem solved & topic archived.
|

» How do I remove "Search Google" from "Advanced Search"?
» Remove Search Box
» How to remove search box?
» How to remove this search box?
» Remove search box
» Remove Search Box
» How to remove search box?
» How to remove this search box?
» Remove search box
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum