new window open FTP but don't wanna use Button1.Attributes.Add("onclick", "javascript")

hi all,

i wanna open a FTP in a new window

i use :

Button1.Attributes.Add("onclick", "var varOpenWin ='" + pstrNewFTP + _
  "' ,'FTU', 'width=700,height=500,copyhistory=no,directories=no,titlebar=no," + _
  "properties=no,menubar=no,toolbar=yes,location=no,scrollbars=yes," + _

it works, but actually i have to check the password (system login & pwd not the FTP password)

so i think i can't use Button1.Attributes.Add (under page load function)

anyone knows the javascript of open the new FTP window in the other method directly instead of "onclick" function?

(i hope to open under Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) not page load function)


many thx Wink


8/28/2006 2:40:49 AM 93655 articles. 6 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 55
Get it on Google Play
Get it on Apple App Store

Hi hunb,

    you could use RegisterStartupScript to run the script after postback


     in your button handler,  write

       Dim scriptString As String = "<script language=JavaScript>"
       scriptString += "the_scritpt_to_open_window"
       scriptString += "</"
       scriptString += "script>"
       Me.RegisterStartupScript("popup", scriptString)

8/28/2006 5:50:58 AM

it works now ma


my coding:

Dim scriptString As String
scriptString = "'" & stFTPLink& "', 'title', "
scriptString += "'width=700,height=500,copyhistory=no,directories=no,"
scriptString += "titlebar=no,properties=no,menubar=no,toolbar=yes,"
scriptString += "location=no,scrollbars=yes,resizable=yes,status=no');self.close();"
Page.ClientScript.RegisterStartupScript(Me.GetType, "popup", scriptString, True)


thx a lot dragon


8/29/2006 7:57:25 AM

Similar Artilces:

Why don't I see the "use master page" check box when I add a new web form to my web app?
From what I've read I should see this check box whenever I add a new web form but I don't.  Should I add something else instead of a web form or is there a flaw in my web apps install? Woot! I found the answer!  There is an item in the add new item dialog box called web content form! If you use this instead of the web form then all is good and warm fuzzy!...

"Open", "Open in new window", "Open in new tab" are greyed-out after drag&drop operation
Name: Dmitriy Email: dadotivanovathotmaildotcom Product: Firefox Release Candidate Summary: "Open", "Open in new window", "Open in new tab" are greyed-out after drag&drop operation Comments: Steps to Reproduce: 1. Drag&drop a bookmark from the Bookmarks Menu or Bookmarks Toolbar to the Tab bar. 2. Right-click on any bookmark (from the same folder, if darged from Menu, or from the visible part of Bookmarks Toolbar) Result: "Open", "Open in new window", "Open in new tab" are greyed-out Browser Details: Moz...

Button1.Attributes.Add("onclick","PopWindow();"); not working
Hi,   I have a button in my .aspx page and I want to execute javascript code on the click of this button.I wrote the following code. Button1.Attributes.Add("onclick","PopWindow();"); <script Language="javascript"> function goback() {  history.go(-1); } </script> But this code is not working.Plz help me fast. Abhilash Namdeo Web Developer A1technology function goback() { history.back(); //alert("tesxt"); } function goback() { history.back(); //alert("tesxt"); } function goback() { ...

"Using" or "With"
Hi all Please can someone enlighten to me as regards the difference with the "Using" and "With" statement when accessing data - which is better, what are the limitations and/or any pointers. Many thanks. Regards DaveDavid WinchesterPlease mark as answer if this is the solution.  using gives you the ability to use the connection and it closes the connection directlly after you finish using it. and there is no need to try- cach - finaly. there is no limitation on using USING keywordMuhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn I have a dataobject the re...

Using "+" or "||"
Using SQLAnywhere 5.5.04, I've gotten into the habit of using "||" in ISQL to indicate a string concatenation. I needed to paste my SQL statement into the PowerBuilder script painter for some embedded SQL, and PB didn't like the "||" very much at all. I changed it to "+" and it seems to be ok. Do these two operators indicate ~exactly~ the same thing? moin, afaik these two's are not the same! if you're using "||" and any term is NULL then in the resultstring the term will be ignored if you use "+" then the resu...

shifting "open in new tab" and "open in new window" in firefox 2
Name: Markus Gr´┐Żrmann Email: Product: Firefox Summary: shifting "open in new tab" and "open in new window" in firefox 2 Comments: Heyho! In firefox 2, opening new pages in a new tab instead of a new window is the standard setting. But ifyou right-click on a random link to open it either in a new window or a new tab, the option on top of the right-click-menu is "open in new window" you have to scroll down to open the link in a new tab. To support tabbed browsing as well as possible, the option to open links in a new tab s...

"Move tab to new window" is wanted; "Open in new window" is faulty.
Name: Michael Email: keybounceatgmaildotcom Product: Firefox Summary: "Move tab to new window" is wanted; "Open in new window" is faulty. Comments: Right now, tabs in FF 3.5.2 have "Open in new window". What they need is "Move tab to new window". The problem? The page is fully reloaded from scratch. Not all pages can be reloaded. Even if it doesn't look like a PUT, not all GETs return the same page. Even when they do, it may result in a lot of re-processing of javascript, etc. From URL: Note to ...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD Bruce "Bruce Lamb" <> wrote in message > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

why can't i use the attribute "onchange" or "onfocus" in checkbox
when i use the code like this:myCheckBox.Attributes["onfocus"]="this.blur()" it doesn't work,just generate the tag "span" containing the You should be using RegisterStartupScript or RegisterClientScript. See this article by Scott Mitchell: Injecting Client-Side Script from an ASP.NET Server Control Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it...

"Rightclick+T" to "Open in new tab".
Name: Lars Email: larsdotwilatonlinedotno Product: Firefox Summary: "Rightclick+T" to "Open in new tab". Comments: This is a free software, so I am not complaining, just giving some feeback. In any web page, you can "right click + t". This is the fastest way to open a number of pages. However if you use "right click + t" on the bookmark tool bar, it will delete the bookmark. So it is inconsistence, becuase I use "right click + t" all the time, and when I use it in the bookmark toolbar, it delete the bookmark, and I ...

btn_cancel.attributes.add("onclick","javascript:return confirm_del();") doesnot works
Hi  Iam working on VS2003 and using a asp:button for delete. I want to show a confirm when the user clicks on that button. So when he clicks on a cancel button in that confirm alert box the page shouldn't submitted. But now me getting page submission when clicking the cancel button. what will be the solution for me? Thanks  Rajesh Webinteractive Network Solutions Hi, in which event did you put that code? Also take a look at these free custom controls: Grz, Kris.Read my blog. Handy Firefox plugins for web develop...

Problem with opening new window "window.Open" using javascript
I am trying to open new window when press a button "btnPrint" using: Response.Write("<script language='javascript'>'CouponReport.aspx', 'window', 'HEIGHT=600,WIDTH=820,top=50,left=50,toolbar=yes,scrollbars=yes,resizable=yes'); </script>"); but when the new window opened the current page do a post back action and the current page format change like the following: before window open: after window opened: So, how i can a void the post back action.  <script language='javascript'> funct...

"New window" should make a copy of the "old window", keeping the "history".
Name: Kevin Ong Email: kevinwtcathotmaildotcom Product: Firefox Summary: "New window" should make a copy of the "old window", keeping the "history". Comments: I like Firefox very much, mainly because it's faster than Internet Explorer. There's really only one function I really miss. It is Internet Explorers function when you open a new window (ctrl+n). In IE the whole new window is an exact copy of the one you open it from - you get the same page and keep the "history". So you can for example click back and it takes you one page...

Web resources about - new window open FTP but don't wanna use Button1.Attributes.Add("onclick", "javascript") -

Resources last updated: 12/15/2015 7:40:43 PM