By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,714 Members | 1,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,714 IT Pros & Developers. It's quick & easy.

Display Popup Message in Right-Hand Corner of the Screen

Inbaraj
P: 76
HI....

This is Inbaraj... I am doing an Internet Chat program... I that if a person who enter into that portal a popup message should be displayed like in google talk.. In right hand side a popup window will be displaying saying that person is online..

I dont know how to bring that pop window in the righ handside corner..

can any one give me the sample code for that how to bring that.....

Thanks in advance..
reg
Inbaraj...
Jun 29 '07 #1
Share this Question
Share on Google+
16 Replies


Inbaraj
P: 76
Hi....

This is Inbaraj... I am doing an Internet Chat program... I that if a person who enter into that portal a popup message should be displayed like in google talk.. In right hand side a popup window will be displaying saying that person is online..

I dont know how to bring that pop window in the righ handside corner..

can any one give me the sample code for that how to bring that.....

Thanks in advance..
reg
Inbaraj...
Jun 29 '07 #2

P: 54
Post some piece of code and we will help you out!
What are you doing till now?
Jun 29 '07 #3

Inbaraj
P: 76
Post some piece of code and we will help you out!
What are you doing till now?
Sir..

I need a popup message in right-hand corner of the scree... as it comes in Gtalk or Yhaoomessenger......

reg
inbaraj
Jun 30 '07 #4

gits
Expert Mod 5K+
P: 5,390
hi ...

ok ... you want the popup-window there ... do you have something done? the idea is to retrieve the screen-size of the users sreen, then use it to open the window at the desired position ... when you have tried something ... post your try and ask specific questions in case you have some ... then we may help you with those problems ...

kind regards
Jul 1 '07 #5

kovik
Expert 100+
P: 1,044
Make a big box and float it right. I'm not seeing what about this you couldn't have done.

What have you tried?
Jul 1 '07 #6

gits
Expert Mod 5K+
P: 5,390
Make a big box and float it right.
i don't know yahoomessenger or gtalk ... but i think the request is to open a small popup-window that notifies the user when a message is incoming or a buddy-list-member logs in ... like all common messengers do ... a small popup in the right bottom corner of the screen (thunderbird uses this too when notifying that new messages have arrived) ... that is outside of the 'messenger-application-window' ... so as far as i would see and assuming im right with the above understatement of the request ... there is no other possibility as to open a new window at the desired position? ...

kind regards
Jul 1 '07 #7

kovik
Expert 100+
P: 1,044
i don't know yahoomessenger or gtalk ... but i think the request is to open a small popup-window that notifies the user when a message is incoming or a buddy-list-member logs in ...
Oh. I've never used them before. I thought he was thinking more in terms of web apps than desktop.
Jul 1 '07 #8

gits
Expert Mod 5K+
P: 5,390
... yes he does ... and i think he wants it to look like an desktop-app ... thats the general goal of a lot of todays webapps that use ajax etc. ...

kind regards ...
Jul 1 '07 #9

acoder
Expert Mod 15k+
P: 16,027
Threads merged. Please do not double post.

Changed thread title too to something more meaningful.
Jul 2 '07 #10

acoder
Expert Mod 15k+
P: 16,027
... yes he does ... and i think he wants it to look like an desktop-app ... thats the general goal of a lot of todays webapps that use ajax etc. ...
Very true. Unfortunately, that means that sometimes some people want to do the impossible as far as the browser is concerned.
Jul 2 '07 #11

acoder
Expert Mod 15k+
P: 16,027
hi ...

ok ... you want the popup-window there ... do you have something done? the idea is to retrieve the screen-size of the users sreen, then use it to open the window at the desired position ... when you have tried something ... post your try and ask specific questions in case you have some ... then we may help you with those problems ...

kind regards
Retrieve the screen size using the Screen object. I'm not sure how many properties are supported by all browsers, but you probably only need availHeight and availWidth.
Jul 2 '07 #12

acoder
Expert Mod 15k+
P: 16,027
I need a popup message in right-hand corner of the scree... as it comes in Gtalk or Yhaoomessenger.
You need to make a start on it first. Once you get stuck, post here again with your problem.

One other possibility (and a preferred one, IMO), is to display the popup within the browser using DHTML. You could even have it moving up from the bottom until all of it can be seen. This way you have more control over it.
Jul 2 '07 #13

P: 54
Sir..

I need a popup message in right-hand corner of the scree... as it comes in Gtalk or Yhaoomessenger......

reg
inbaraj
I understand what you need. But usually people post some piece of code and ask for help with certain parts that arent working properly.

Once you have your element ready you will need to do something like

pageBody = document.getElementsByTagName("body")[0]
yourElementHere.style.left = pageBody.clientWidth - this.holder.offsetWidth + "px"

This way you will place your element in the right side!
You can do almost the same to put it in the bottom!

Good luck
Jul 2 '07 #14

arnabc
P: 6
I understand what you need. But usually people post some piece of code and ask for help with certain parts that arent working properly.

Once you have your element ready you will need to do something like

pageBody = document.getElementsByTagName("body")[0]
yourElementHere.style.left = pageBody.clientWidth - this.holder.offsetWidth + "px"

This way you will place your element in the right side!
You can do almost the same to put it in the bottom!

Good luck

how about an absolute div with right:0px and top:0px
Jul 3 '07 #15

gits
Expert Mod 5K+
P: 5,390
;) short summary: with 'div's (and other ccs-based 'quasi'-popups) you are bound to the actual browser-window that handles them ... a popup is a new window (and has its own window-context too) ... its up to you which possiblity you prefer or have to use that what the feature-request requires ...

kind regards ...
Jul 3 '07 #16

P: 54
how about an absolute div with right:0px and top:0px
Well im thinking about something like the gmail interface like he said, and there the holder stays always on the right bottom part!

Using absolute (right 0 / top 0) is a way to place the element on the top right side of the screen, but what you gonna do when you scroll the page?

You will need some js to bring the element down!
(or you can make some tests with position fixed, but may face some problems with specific browsers)
Jul 3 '07 #17

Post your reply

Sign in to post your reply or Sign up for a free account.