Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 7 Months, 2 Weeks ago External links in navigation bar
#1
Solved: 4 Years, 7 Months, 2 Weeks ago
I know this is not related to MyBB but I don't know where to post it and there is no help out in the Google that will help me with this. Here goes my problem: I would like to add a external link into my custom website's navigation bar with the name 'Forum' to be clicked on to send the user to my MyBB forum. (Note: My navigation bar is created from javascript.) There is an attachment for you to look at, it is the source of my navigation bar. Please tell me where to put this thread if its in the wrong place thanks.

Regards,
Richard


Attached Files
.js   script.js (Size: 301 bytes / Downloads: 30)
Reply
#2
Solved: 4 Years, 7 Months, 2 Weeks ago
Just add a line where you want to have it displayed.

example to have it between Home and About:
document.getElementById("foot01").innerHTML =
"<p>&copy;  " + new Date().getFullYear() + " X-treme FreeRoam. All rights reserved.</p>";
document.getElementById("nav01").innerHTML =
"<ul id='menu'>" +
"<li><a href='Index.html'>Home</a></li>" +
"<li><a href='forum url'>Forum</a></li>" +
"<li><a href='About.html'>About</a></li>" +
"</ul>";

replace "forum url" with the url or relative path to your forum
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#3
Solved: 4 Years, 7 Months, 2 Weeks ago
Oh god, so it was the same elements, I thought I had to use the <link</link> element. Thanks Cat! I will note this down for future url navigation tabs. Thanks a lot! Thanks again CAT!
Reply
#4
Solved: 4 Years, 7 Months, 2 Weeks ago
(03-07-2015, 09:18 AM)Crazycat Wrote: Just add a line where you want to have it displayed.

example to have it between Home and About:
document.getElementById("foot01").innerHTML =
"<p>&copy;  " + new Date().getFullYear() + " X-treme FreeRoam. All rights reserved.</p>";
document.getElementById("nav01").innerHTML =
"<ul id='menu'>" +
"<li><a href='Index.html'>Home</a></li>" +
"<li><a href='forum url'>Forum</a></li>" +
"<li><a href='About.html'>About</a></li>" +
"</ul>";

replace "forum url" with the url or relative path to your forum

In what file would you add that code to?
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)