Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2004, 03:33 AM
Authorized User
 
Join Date: Jul 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default page size

hi does anyone know if there is a way to specify a page size, i have one page which takes in parameters, but i want to upload files to a server and i want a smaller pop up window to come up to allow the user to browse for the file and upload it? thank you!

 
Old August 25th, 2004, 06:52 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Page size? Do you mean specify the page size of your pop up window? If so this question would be better suited in a javascript forum, anyway you would do this like:

The following anchor tag fires a JS function 'openNewWin'

------cut n paste start----------------------
<A HREF="#" onClick="openNewWin('pageNameOfNewWindow.asp','win dowName',300,300,250,250);">LinkText</a>
------cut n paste finish---------------

Put this in the head of your document(the parameters are self explanitory, change them(300,300,250,250 - as seen above) to 'resize' and 're position' your pop up window):

------cut n paste start--------------------
<script>
    var newWindow
    function openNewWin(pageURL, pageName, width, height, top, left)
    {
          newWindow = window.open(pageURL, pageName,"width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",scrollbars=1, resizable=1,toolbar=0,location=0,status=0,menubar= 0");
          newWindow.focus()
    }
</script>
------cut n paste finish----------------------
NOTE: the newWindow.focus() in the above functions allows the window to be re focussed if lost behind any other active windows - very important for your web sites useability to the non savy web user (most users)

The above code if cut n pasted (dont forget to change the pagename in the achor tag) will produce a window that is:
300 pixels wide
300 pixels high
Positioned
250 pixels from the top of the browser window
250 pixels from the left of the browser window



Wind is your friend
Matt
 
Old September 3rd, 2004, 06:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use <input type="file" ...> that shows you a textbox along with BROWSE button, that lets the user to browse the files from your system. Is that what you are looking for? If so, then you will have to take care of the remaining upload code. Does that help?

_________________________
- Vijay G
Strive for Perfection
 
Old September 3rd, 2004, 11:49 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

You could have better put this question in JS forum. Anyway, here is the JS code.

window.open(pageURL,"<window name>","width=400,height=400");
 
Old September 6th, 2004, 02:25 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

......mmmm very wierd

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView and page size snufse ASP.NET 2.0 Basics 1 January 11th, 2008 08:54 AM
Page Size HelmutArnold Reporting Services 0 October 6th, 2006 08:47 AM
Window or Page size ckrajeshvarma ASP.NET 2.0 Professional 0 August 6th, 2006 12:53 AM
CrystalReportViewer : page size problem kriangsak Crystal Reports 0 December 20th, 2005 02:52 AM
Checking page size in kb G Classic ASP Basics 1 September 24th, 2003 02:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.