I understand what you are saying about using a javascript function but I am very weak in javascript. I have no clue how call this function and pass in the url, width, height, etc parameters.. I'm not sure where this function goes. I assume in the html but where? Presently, I use a LinkButton control embedded in a Gridview control. When clicked, I use the method called by the CommandName to run the RegisterStartupScript. Not sure how to call this function you provided me now.
-------------- Original message -------------- From: "Dean Fiala" <[EMAIL PROTECTED]> Get yourself a copy of the javascript bible. http://www.amazon.com/JavaScript-Bible-Fifth-Danny-Goodman/dp/0764557432/sr=8-1/qid=1158157281/ref=pd_bbs_1/103-2982630-1495037?ie=UTF8&s=books Easily worth $35. You only have one argument here, the formatting ends up in the URL, so it doesn't get passed along to the window optiosn. Make your life easier and call a custom javascript function. This is one I use... function popUp(url, width, height) { sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=' + width + ',height=' + height); self.name = "mainWin"; } You can add in the top and left parameters, or hardcode them in the script. On 9/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Peter, > > Here is the view source for my javascript: > > <script language="JavaScript">PopupWindow=window.open(' > CustomerDetails.aspx?ProductID=26290&StartDate>=1/1/2004&EndDate<=3/31/2005, > width=500,height=280,top=300,left=100');PopupWindow.focus();</script> > <script type="text/javascript"> > > Yes, I'm sure it's some bad syntax. My problem is that I no little about > the proper syntax for this type of javascript. Maybe you can see what's > wrong with it. > > Thanks, > Bob > > > -------------- Original message -------------- > From: "Peter Brunone" <[EMAIL PROTECTED] <peter.brunone%40gmail.com>> > > What does the script look like when you right-click the page and select > View Source? You may just have an errant comma or quote in that mess of > concatenation (happens to everybody)... > > Cheers, > > Peter > > On 9/12/06, [EMAIL PROTECTED] <rherrmann05%40comcast.net> < > [EMAIL PROTECTED] <rherrmann05%40comcast.net>> wrote: > > > > > > Hi all, > > > > I am using the following code to produce a popup window when the user > > clicks a button. I am using VS 2.0: > > ClientScript.RegisterStartupScript(GetType(String), "", "<script > > language=""JavaScript"">" & _ > > "PopupWindow=window.open('" & "CustomerDetails.aspx?ProductID=" & > l1.Text& "&StartDate>=" & Session("StartDate") & "&EndDate<=" & > Session("EndDate") > > & ", width=500,height=280,top=300,left=100" & "');" & "PopupWindow.focus > > ();</script>") > > > > The popup window does appear. But I want to make the size of the window > > smaller and i want to center the page. It appears as though the width, > > height, and top is not working properly. It just ignores whatever I put > in > > the above statement. Does anyone know what I am doing wrong? > > > > Thanks, > > Bob > > > > [Non-text portions of this message have been removed] > > [Non-text portions of this message have been removed] > > > -- Dean Fiala Very Practical Software, Inc Now with Blogging... http://www.vpsw.com/blogbaby Microsoft MVP [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNet2/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/AspNet2/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

