Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Javascript
I need to remove the task bar,menu bar and close button from the child window...i use this code to done it..but not working
 
...
<span önclick="window.open('CCAgentLiveChat.aspx?ChatId=<%#DataBinder.Eval(Container.DataItem," chatid=") %>&UserName= <%#DataBinder.Eval(Container.DataItem," name=") %>&UserRole= <%#DataBinder.Eval(Container.DataItem," userrole=") %>','mywindow&lt;%#DataBinder.Eval(Container.DataItem,"></span>
 

[edit]Code block added, HTML encoded - OriginalGriff[/edit]
Posted 11-Nov-12 23:58pm
Edited 12-Nov-12 1:25am
MT_9.8K
v4
Comments
Member 9562996 at 12-Nov-12 5:59am
   
which code?
lukeer at 12-Nov-12 6:10am
   
The code is there, hidden in tags:
<span> ... some code ... </span>
I don't know Javascript. So I can't make out what the code should mean, maybe you can.
Member 9492907 at 12-Nov-12 5:59am
   
i use this cose but not working
 
<span önclick="window.open('CCAgentLiveChat.aspx?ChatId=<%#DataBinder.Eval(Container.DataItem,"ChatId") %>&UserName= <%#DataBinder.Eval(Container.DataItem,"Name") %>&UserRole= <%#DataBinder.Eval(Container.DataItem,"UserRole") %>','mywindow<%#DataBinder.Eval(Container.DataItem,"ChatId") %>',' width=450,height=400,left=300,top=150,menubar=0,toolbar=0,resizable=no')"
lukeer at 12-Nov-12 6:08am
   
Please use the "Improve question" link directly beneath your question to edit its content.
The code you provided there is hidden because it's wrapped in a "span" tag:
<span> ... some code ... </span>
Replace left angle brackets or "smaller-than" characters with sequences of "& lt ;" (without the quotation marks and without spaces.
Member 9492907 at 12-Nov-12 7:05am
   
this s my code
 
onclick="window.open('CCAgentLiveChat.aspx?ChatId=<%#DataBinder.Eval(Container.DataItem,"ChatId") %>&UserName= <%#DataBinder.Eval(Container.DataItem,"Name") %>&UserRole= <%#DataBinder.Eval(Container.DataItem,"UserRole") %>','mywindow<%#DataBinder.Eval(Container.DataItem,"ChatId") %>',' width=450,height=400,left=300,top=150,titlebar=no,toolbar=no,statusbar=no')"

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use this javascript code. Hope it helps you.
var mylocation="page_name"
var winheight=100
var winsize=100
var x=5
var newwindow = '';
var url = "page_name"
function popitup()
{
    document.getElementById(&quot;smt&quot;).style.display='none';
    if (!newwindow.closed && newwindow.location)
    { newwindow.location.href = url; }
    else
    {
        newwindow=window.open(url,'','toolbar=no,location=no,menubar=no,scrollbars=yes');
        if (!newwindow.opener) newwindow.opener = self;
    }
    if (window.focus)
    {
        newwindow.focus()
        newwindow.moveTo(0,0)
        newwindow.resizeTo(screen.availWidth, screen.availHeight)
        window.opener=""
        window.close(0);
    }
    return false;
}
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.140814.1 | Last Updated 12 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100