VS 2008 Passing Sql Query Through Window.open?
Jul 6, 2010
i want to pass a query string with window.open of javascript
but since the sql query uses single quotes, there is some error
How can i handle this
Given below is the sample(The starting quote of SalesEmp is ending the single quote where window.open has started)
javascript:void(window.open('DetailedGraph.aspx?SqlQry=select SlpName, MonthYear, Sum(DocTotal)/100 Invtotal, max(Year) Year, max(MonthNum) MonthNum from OCT_VIEW_DB_Sales where SlpName='SalesEmp' ')
View 7 Replies
Similar Messages:
Nov 11, 2010
I need to pass these values : 'A02', 'A04' to a single value like this,
[URL]
using this javascript:void(window.open('http://server/reportserver?/rpt?Area='A02','A04'rs:Command=Render&rc:Parameters=false'))
not response.redirect, it works using response.redirect. but somehow when I use it using window.open(), it always give me parser error.
View 4 Replies
Mar 20, 2013
I tried simple code like this using href element. But it tries to open the sheet.xls in the browser window and says it can't find the file. I want the excel file to be opened in excel (not browser).
<a href="file://domainname/vol1/destinationfiles/sheet.xls" >some excel file</a>
View 1 Replies
Sep 10, 2010
i'm writing a button which need to open a new window and sending binded data as query string:
[Code]....
here is the open_win function:
[Code]....
But the url created is ".../Report.aspx?type=comment&id=undefined", the queryString["id"] is not defined.
In the calling page source html, comment_id has value.
[Code]....
How can i set the variable value of "comment_id" in button onclick, to call the javascript open_win() function ? the comment_id cannot known util runtime, it get value from datasource.
View 3 Replies
Oct 18, 2010
i have an aspx page in which a link in the grid view opens a popup page . the data in the grid view would be dynamic and i need to send the id of the row of grid while calling the child window. i get the id using sender.id, but how would i send this using window .open()?
View 2 Replies
Dec 3, 2010
I have the following HTML
<tr>
<td class="label" valign="top">
Affiliate Party
</td>
<td class="field">
<input type="hidden" name="ctl00$MainContent$ExternalAccountAttributes$AffiliatePartyId" id="AffiliatePartyId" />
<input name="ctl00$MainContent$ExternalAccountAttributes$AffiliatePartyName" type="text" id="AffiliatePartyName" class="PartyLookup" />
</td>
</tr>
and the following Javascript/jQuery
$(".PartyLookup").after("<img src='Images/book_open.png' class='PartyLookupToggle' style='padding-left:4px;' />");
$(".PartyLookupToggle").click(function () {
window.open("PartySearch.aspx", "PartySearch", "width=400,height=50");
return false;
});
I need to be able to flag ANY PartyId input field with class="PartyLookup" so that it will modify the DOM and include the image next to the input field. The popup window returns data to populate both the hidden and text fields, but since the click() is generic I need to pass it the ID of the input field.
View 2 Replies
Jul 29, 2013
I have a page, which contains 2 textboxes. When i click on the first textbox, i have to open a child window (tool), that contains a gridview control with 2 columns (corresponding to the 2 textboxes). When the user clicks on any row in the gridview, it should send back the 2 column values back to the parent window to the corresponding 2 textboxes. how do i achieve this?
View 1 Replies
Apr 29, 2010
I have a page wich opens a popup window. I want to pass some variables, like some textbox.text and 2 dataTables from parent window to the popup window. And then I'll have to return some vars from popup window to parent window. So what is the best way to do this,
1) using Sessions("")
or
2)passing the variables as parameteres:
LinkButton1.Attributes.Add("onclick", "window.open('popup.aspx?field1=" & value1 & "&field2=" & value2 & ......
I don't know if it's appropiated passing 8 or 10 variables as the option2 because the user will see a very long url with all the variables, but maybe is more efficient than using Sessions.... Anyway, could somebody clear me up?
View 12 Replies
Jan 10, 2010
How can I as passing a data from a active window to another window.
View 5 Replies
Mar 10, 2011
I have a login page that is loaded in popup window (colorbox) and after user logs in it should be closed and parent window should be loaded with new page.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Do While reader.Read()
If Trim(reader("ZAP").ToString()) = Trim(textBoxZap.Text) Then
Session("A") = "1"
Response.Redirect("~/default.aspx")
Else
lblErr.Text = "incorect"
End If
Loop
So once the buton is clicked and user name and password is corect popup window should be closed and user redirected to default aspx.
View 1 Replies
Apr 28, 2010
I am trying to open a popup window from main window using window.open() method. How to get back the value from the called popup window to the calling window in vb.net, basically i need to get back the value and populate in the text box available in the main window.
View 3 Replies
Sep 23, 2010
we are running a click-to-call service, my idea is basically like this: website have a link on their page, when the link is clicked, a web page(say it is popup.aspx) hosted on our server is popup, user can input their phone number, and click "call me" button to let the website call him. In the button click event, I want to get Request.UrlReferrer, then query the db to get website's phone. But in IE, Request.UrlReferrer is null(firefox is ok, not test chrome yet),my question is how to get opening window' url in IE? we put popup.aspx on our server because
our client website is not force to use asp.net. we have the control what we put on the popup window, and can modify the page just from our side, if we put the pop window on our partner's side, if we have 100 partner, and we change the page's design, we will notify everyone of them to change this, change that. we can implement a statics system to know how popup a day, which site is most popular,etc
View 1 Replies
Sep 24, 2010
I am using the javascript to open a child window using window.showModaldialog(), i have retuen a value from the child page is working fine in IE and firefox but is not working in chrome browser, is there any work around or alternative for it to work in chrome as well.
View 2 Replies
Feb 17, 2011
I have an asp.net page that contains an Iframe embedded with some data and a ImageButton. On ImageButton click event (server side) I have Response.Redirct:
Response.Redirect("results.aspx");
This always open the results.aspx in iframe. I want that results.aspx should always open in the parent window. I tried the following till now but none worked:
Response.Redirect("<script language='javascript'>self.parent.location='results.aspx';</script>");
Response.Redirect("javascript:parent.change_parent_url('results.aspx');");
..and also tried the options from [URL]
View 1 Replies
Sep 11, 2010
Click imagebutton open window.open in class asp.net 2.0
View 2 Replies
Aug 2, 2010
I am trying to open a file share link from the window.open ... but its adding the http://localhost/vdir/ before the path can any one say what is the problem?
View 1 Replies
Feb 12, 2010
How do I pass a window name to window.open(url, windowname) programmatically? I am using a user control inside aspx forms. I want the windowname to be different, so from each link a separate window opens.
I have an asp:hyperlink in a .ascx form. The code looks like this:
<asp:hyperlink runat="server" id="xx", navigateurl="is set programmatically" onclick="javascrip:return popup(this, 'my window'; " text="xxx"/>
'my window' needs to be a variable.
View 3 Replies
Aug 26, 2010
I have an aspx page which contains a user control(a gridview). When I click on a link button in the gridview, I will open a popup window(An aspx page) successfully. When I click on save button in the popup, I am saving the details and refreshing the parent page successfully. I have a button in popup window. My requirement is:
When I click on the button inside popup window1, I would like to open another popup(aspx)(Say popup window2) in a new window without closing popup window1. When I save some changes in popup window2 and click on save button in popup window2, I need to close it and refresh popup window1.
View 2 Replies
Aug 31, 2010
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.
[Code]....
View 2 Replies
Aug 25, 2010
I using VS2008 and C# for an ASP.NET web application. From within C# code, how to use the "Window.Open" method to create a new browser window? I know it can be done in ASP script code using Javascript but I would like to create new window from C# as desired.
View 11 Replies
Jun 24, 2010
I have a web service that runs a query (from C#) to get a dataset from sql server. I get the following time out error. Googling on this error says, you can set the timeout on command object. But I am not using command object to set the timeout. This is the code I am using to get the dataset.
code:
[code]....
View 8 Replies
May 23, 2010
I have a page with a lot of pictures on it. I want the user to be able to click on the picture and either bring up a popup type of window passing it the Param name and value , or to have the picture be replaced with this object.
<object id="ADR2" type="application/x-Autodesk-DWF"
width="250" height="250"> <param name="dwffilename"
value="path" /> </object>
I have found a number of places describing how to bring up a popup window, but not on how to pass it the values.
View 2 Replies
Nov 2, 2010
I am trying to pass parameters to a popup window via query string(a hidden field id & a textbox id). However, since I am using master pages the id's are very long (ct100_someid). Is there a way to elegantly pass my ids ? Can I shorten my id's or not show them to the user at all?
View 2 Replies
Jul 29, 2010
I have a parameter screen which contains many pop up windows for the parameters .
I have a department hierarchy which consists of department , branch and section.
I have 3 pop up windows for each parameter.
When i select, a department, it filters the list of the branch and shows only its branch when i open the branch pop up window.
But the problem is, when i select multiple departments, the branch pop up window shows the below error. The page works if only a department is shown.
Conversion failed when converting the nvarchar value '3,4,5,6 to data type int. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
My code for the branch page is :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Branch.aspx.cs" Inherits="Modules_Reports_Branch" Title="Select Branch"%>
<!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 id="Head1" runat="server">
[Code]....
View 4 Replies
Jan 19, 2010
Work on asp.net vs08 C#.i have a page .From this page i need to call a page on popup.On the popup page selected value will be set on the parent page text control.1) One parent page2)One child page.3)call parent to child as popup.4)On popup window contain a grid.5)on popup grid have command select,click on select close popup and selected value will set on parent page text control.
View 1 Replies