.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Open New Window Using Javascript

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :Sql Server
Using SSRS 2008. I have a main report where the user clicks on the KPI field and I want to open a new window and go to a detail report and pass parameters from the main report to the detail report. The following javascript will do that but when the KPI has "&" in it I get the following error. In this example the KPI field clicked on had "Headcount Imp & Ops" in it. Keep in mind the KPI field could have the "&" at anytime. Anyway around this? I appreciate any help. Error = The path of the item '/Test/DetailRpt, Imp' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath) Code. = "javascript:void(window.open('http://velma.fmr.com/ReportServer/Pages/ReportViewer.aspx?%2fSPARS%2fDetailRpt&rs:Command=Render&rc:Parameters=true&RptMonth=" & Parameters!RptMonth.value & "&Reports=" & Parameters!Reports.value & "&ID=" & Fields!ID.Value & "&Alias=" & Fields!KPI.Value & "&BD=" & Parameters!BD.Value & "&BD=" & Parameters!ED.Value &" ','_blank','width=875, height=400, top=75, left=35, toolbar=1, menubar=1, location=1, status=1, scrollbars=1, resizable=1'))"

View Complete Post

More Related Resource Links

javascript window.open problem



i have a page(A page) which has a linkbutton on it and i have added the following onattribute method which opens a new popup window(B page)


"onclick", "window.open('" & likeLink & "','newwindow','location=no,toolbar=no,directories=no,menubar=no,width=300,height=400,resizable=yes,scrollbars=yes,top=200,left=250,status=no'); return false;")

now on page B which has poped up there are some links

here is

Sharepoint and SQL SSRS viewer javascript:void window.open Problem


Ok, I've seen a number of threads similar to this, but I think i have my situation narrowed down pretty tight.

I'm using the javascript:void(window.open action to "pop-up" a drill through report on an SSRS report.  the function works just fine when viewing in the SSRS report viewer...however...


- If i display this report with this function in Sharepoint via the Report VIEWER (or page viewer) web part...the functionality of the pop-up no longer works....

and heres the strange part...

If i put a report EXPLORER part in, and have it set to list the report with the function (also passing what report to open) into a report viewer web part...THE FUNCTION NOW WORKS!?

 The SSRS "Jump to URL" action is ="javascript:void(window.open('http://www.google.com'))"

Any thoughts?

It's very strange indeed.  So to summarize,

- Javascript popup worsk in native sql report server interface

- Javascript popup works if the Sharepoint viewer web part GOT its report to view from a report explorer web part

- Javascript popup does NOT repeate NOT work when using a Sharepoint report viewer to directly open the report.

Open PopUp Window From Error httpModule


I would like to open a popup window from the assembly to present the information to the user. Does anyone know if this is possible, I am presently doing the following:

        WriteLine("body {font-family:""Verdana"";font-weight:normal;font-size: .7em;color:black; background-color:white;}")
        WriteLine("b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}")
        WriteLine("H1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }")
        WriteLine("H2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }")
        WriteLine("pre {font-family:""Lucida Console"";font-size: .9em}")

way of calling "javascript function of parent window from child window."

The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

Browser window is opening up on the second click with javascript code



I am trying to set a javascript code to open up a new browser window with this URL that exists like shown below.

On the first click nothing happens but on the second click the browser window is opening up.


How is it possible to make it open up on the first click ?

                                <asp:ImageButton ID="ImageButton3" runat="server" Height="84px" 
                                    ImageUrl="~/images/1.jpg" Width="165px" 
                                    onclick="ImageButton3_Click" />

    protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
        String openURL = "javascript:window.open('" + "Folder1/testing.aspx" + "');return false;";
        ImageButton3.OnClientClick = openURL;


Closing Javascript Modal dialog window after server side event processing


Hello Friends..

Please tell me how to close Javascript ModelDoalog Window.. after Server Side event Processing .

Basically i want close window in  finally Block After sucessfulll Updation.

AMit..... InnocentInnocentInnocentInnocentInnocentInnocentInnocent

Open a link in new window from a custom fields description MOSS 2007



I have kept a help link (ex: http://www.msdn.com) under a document library field's description. i want this link to be opened in a new window with out navigating from that page.

any ideas greatly appreciated.




Open aspx page in new window or tab



    I use the following code in a Buttons onClick handler.



Is it possible to open the EIQuotationReport.aspx web form in a new window or a new tab? I could change the button to a hyperlink if required.



Open my aspx page in new window....

Hi..On button click im using this Server.Transfer("abc.aspx", true); to transfer to abc page.. what i need is i need to open in new window by this abc.aspx page on button click..here im passing parameter to abc.aspx page, so let me know how to do...so plz let me know how to achieve this....

>>> Open a Popup window on Successful Login if something new added to website.

Hi, I would like to open a Popup window in Parallel if user Login successfully. The popup will give updates to the user that what's new added to the website. The popup will open only once if user login. If he logout and will re-login then it should not popup as we'll assume that he has been notified earlier. I have users table with user id's. It is for information that I am working in Framework 2.0 and not allowed to use any third party or AjaxToolkit. Therefore javascript or any other technique will resolve the issue. Any idea with coding example would be helpful.

Window.Open in AJAX Accordian Panel Opens Link in Same Window

I'm using the following span to open a page in a new window. What is INCREDIBLY odd is that it is exactly the same code from three different pages, but the first refuses to open in a new window. The only difference is that the first example resides within an Ajax Accordian Panel so I suspect that it might be an Ajax related issue. Ideas? Does not open in new window.<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">   Opens in new window<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">   Opens in new window<span onclick="window.open ('http://[domainname]/Mercury/production/content/directory/DirectorySideBar.aspx','mywindow','width=271,height=498,scrollbars=no');">  

how to open 2 different windows from different buttons with window.open or...

Hello, I'm trying to open 2 different windows from different buttons with window.open Do not manage... Annyone  who knows how? I need code xample...   Is it posible to set ID for this window.open ?   Thanks

Links to open new browser window?

I've setup some links on "My Site" and can't seem to figure out how to get them to open the links in a new window. I'd also like to do this for my RSS feed links.(This is in MOSS 2007) Can someone help?

Open a new window in existing window using WPF

Hi All, I'm trying to create a form which may be used as an MDI form. As far as I came to know with that there is no support for MDI form in WPF so is there any other way to fulfill this requirement. All help is welcome.   Thanks in anticipation. 

How to prevent Javascript window to steal focus

Hi,I have made an asp.net web application in which i open a javascript window for 4 seconds at regular interval . The problem is that when window opens it steals focus from current application. For example when application is running in background or is minimized and i am typing in word/Excel or outlook, the window pops up and steals the input focus.I want to popup window in some way that it never steal focus from some other application, just like msn or gtalk notification when someone sign in/out.Please suggest how it can be done ? Thanks

GridView Select Open New Internet Explorer Window

Hi, I'm wondering if there is a built in way to take a GridView select buttons and have them open an IE window or tab and link a FormView Control to that link.Basically a Master-Details type of view, but in a new window instead of the same window.

Open in new window option for Image Button

I am using an Image Button with onclientclick property set.Upon clicking the button I am able to navigate to URL page. But when I am right clicking on the Image Button I am not getting "Open in new window" or "Open in new tab". These options I see when I right click on an Hyperlink control.Can we achieve the same fro Image Button. If so how?Thank you,Praveen.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend