Hi friends, in this article i will explain
about how to add Google Talk pop up to your website.
Take one new .ASPX
page and add the following code to .aspx page .
<a class="add_now_text" href="javascript:(function(){open('http://talkgadget.google.com/talkgadget/popout','_blank','width=300,height=445,toolbar=0,status=0,menubar=0,location=0,resizable=1,scrollbars=0')})();javascript:urchinTracker('/talk/outgoing/gadget')">Google talk</a>
If you want to put the code
to the button then add the following code to your page.
<asp:Button class="add_now_text" ID="Button1" runat="server" Text="Launch Google Talk" onclientclick="javascript:(function(){open('http://talkgadget.google.com/talkgadget/popout','_blank','width=300,height=445,toolbar=0,status=0,menubar=0,location=0,resizable=1,scrollbars=0')})();javascript:urchinTracker('/talk/outgoing/gadget')"/>
The css of the add_now_text
is as follows
<style type ="text/css" >
.hand1 {cursor:pointer;cursor:hand;}
.add_now_text
{font-weight:bold;padding-left:1px;text-align:center;margin-top:100px;margin-left:250px;background-repeat: none;font-size:medium;display:block;
</style>
Then after that run code it shows like the below screenshots.
The complete code of the page is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
>
<head runat="server">
<title>Add Google
Talk</title>
<style type ="text/css" >
.hand1 {cursor:pointer;cursor:hand;}
.add_now_text
{font-weight:bold;padding-left:1px;text-align:center;background-repeat: none;font-size:medium;display:block;
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button class="add_now_text"
ID="Button1"
runat="server"
Text="Launch
Google Talk" onclientclick="javascript:(function(){open('http://talkgadget.google.com/talkgadget/popout','_blank','width=300,height=445,toolbar=0,status=0,menubar=0,location=0,resizable=1,scrollbars=0')})();javascript:urchinTracker('/talk/outgoing/gadget')"/>
<a href="javascript:(function(){open('http://talkgadget.google.com/talkgadget/popout','_blank','width=300,height=445,toolbar=0,status=0,menubar=0,location=0,resizable=1,scrollbars=0')})();javascript:urchinTracker('/talk/outgoing/gadget')">Launch
Google talk</a>
</div>
</form>
</body>
</html>
Copy this code into your .aspx page and Run the page.Happy coding...............
hi,
ReplyDeletei used the above code in my web application it opens the pop up window but it is empty can u please suggest me to solve this problem .
Thanks
sai
mail id:sairam1301@gmail.com
Hi Sairam,
ReplyDeleteActually error is not in the code.Please check the below link
http://www.google.com/talk/start.html
Thanks,
Roja