is there a code to add auto notifications such HTML code
2 posters
Page 1 of 1
is there a code to add auto notifications such HTML code
is there a code to add auto notifications such HTML code like what in the forum tool bar but with out the tool bar thank you
Michael_vx- Forumember
- Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is there a code to add auto notifications such HTML code
Hello Michael_vx,
You could probably make your own notifications system, but it would take a lot of work. This is just a quick example I wrote up :
Clicking the logout button will display a small notification saying that you clicked the logout button. You wont progress to the logout page, or logout. You can dismiss the notification by clicking the dismiss texts. If you wanted you could time the duration that the notification is displayed too.
Example :
You could probably make your own notifications system, but it would take a lot of work. This is just a quick example I wrote up :
- Code:
$(function() {
var body = document.getElementsByTagName('body')[0];
var logout = document.getElementById('logout');
var popup = document.createElement('DIV');
popup.id = 'user_notif';
popup.setAttribute('style','font-size:12px;color:#333;padding:3px;background:#EEE;border:1px solid #CCC;position:fixed;top:40px;right:100px;');
var dismiss = document.createElement('DIV');
dismiss.id = 'dismiss_notif';
dismiss.innerHTML = 'Dismiss Notification';
dismiss.setAttribute('style','cursor:pointer;text-decoration:underline;float:right;');
dismiss.onclick = function() { popup.parentNode.removeChild(popup) };
if (logout) {
logout.onclick = function() {
if (document.getElementById('user_notif')) return false;
body.appendChild(popup);
popup.innerHTML = 'You clicked the logout button !<br>';
popup.appendChild(dismiss);
return false;
};
}
});
Clicking the logout button will display a small notification saying that you clicked the logout button. You wont progress to the logout page, or logout. You can dismiss the notification by clicking the dismiss texts. If you wanted you could time the duration that the notification is displayed too.
Example :
Re: is there a code to add auto notifications such HTML code
i didnt understand much
all what in mind is something like text show you have new PM or watched topic and i need to use Arabic in side the code
for Example
new PM
im sorry for asking this much but im not that good in javascripts
right now im trying to understand the HTML codes and CSS
i still bad in javaScripts
my apologize
all what in mind is something like text show you have new PM or watched topic and i need to use Arabic in side the code
for Example
new PM
- Code:
لديك رسائل خاصه جديد
- Code:
هناك مشاركات جديده فى موضوع تراقبه
im sorry for asking this much but im not that good in javascripts
right now im trying to understand the HTML codes and CSS
i still bad in javaScripts
my apologize
Michael_vx- Forumember
- Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum