WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 New Pm JavaScript on Sun Dec 25, 2011 11:45 pm

kwnos100


Registered Member
Registered Member
Hi!
I dont knew to what category post it and i posted in this...sorry if i am wrong Sad
I am creating a menu for my forum...and i want to put when you have a pm says new pm...What is the javascript for this?
Thanks Smile

2 Re: New Pm JavaScript on Mon Dec 26, 2011 5:00 am

Unknown Data


Registered Member
Registered Member
Do you want notification text in your menu to be the same, as the notification text from the orginal menu?

Because the you could just hide the original navbar, and set the fields value in your new menu, to the same as the notification text from the original one. Smile

http://www.sjovfakta.dk

3 Re: New Pm JavaScript on Mon Dec 26, 2011 3:31 pm

kwnos100


Registered Member
Registered Member
Yes this i want Smile

4 Re: New Pm JavaScript on Mon Dec 26, 2011 4:56 pm

Unknown Data


Registered Member
Registered Member
Give me your current HTML of the menu you've created and the version of your forum software, and I can try give it a shot Smile

http://www.sjovfakta.dk

5 Re: New Pm JavaScript on Mon Dec 26, 2011 9:14 pm

kwnos100


Registered Member
Registered Member
I dont have created...

6 Re: New Pm JavaScript on Mon Dec 26, 2011 9:25 pm

Unknown Data


Registered Member
Registered Member
You are using PHPBB2, right? Because then you can use this:
Code:
$(function () {
$("#idforfield").html($("a.mainmenu[href=/privmsg?folder=inbox]").text());
});

... But before it works, then you have to create a element and give that element an id, which should have the PM notification in it. That could be something like this:
Code:
<div id="idforfield"></div>

^This element will now have the same text as the text in the PM notification from the navbar.

NOTE; If this should work, then you have to have the original navbar on your forum. You can hide it with CSS though. Smile

http://www.sjovfakta.dk

View previous topic View next topic Back to top  Message [Page 1 of 1]

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