Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 22nd, 2004, 06:06 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default Preview of HTML pages

Hi friends,

I have a number of HTML pages in a folder at server. I need to show a list of them in an ASP page. Then the visitor will select one from them. At that time, it should generate a thump image of the selected HTML page and show it like an image. On clicking this, it should open the HTML in its full size in a new window.

My doubt is how I can generate the thump picture of HTML page ? Can anybody please suggest some method ?

The pages and their structures are dynamic. i.e., they will change over time. Actually the pages are created by visitor with the help of an WYSIWYG tool and stored in the folder. So it is not possible to create a set of static images and use them.

Thanks

Madhu
Reply With Quote
  #2 (permalink)  
Old July 22nd, 2004, 10:26 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

hello madhu,

  I have a suggession. But i didnt check and not sure,

  read the file contents using textsreamobject and store in a variable. Generate a table dynamically with empty columns equal to the no of files u want to display. And also save the filepaths and form each column as <td name='td1' id='td1' onclick='somefunction(filename)'>&nbsp;</td> ...

Response.write strTable

This is lengthy process....



Reply With Quote
  #3 (permalink)  
Old July 23rd, 2004, 12:51 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Hello Rajanikrishna,

Thanks for the response.

But my problem is not to show a list of files. But while showing the list of HTML files, I need to show a thumb preview of the HTML page adjacent to the name of the file. I don't know how to generate the thumb preview of the HTML page.

By thumb preview, I mean the web page resized to 10% (or any other convenient) of original size. This is to help visitor choose his required template fast. (They don't like opening it in a new window.)
Reply With Quote
  #4 (permalink)  
Old July 24th, 2004, 03:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Madhu,

Unless someone could save those pages as images of required size for you, I don't think you can get there. Also I don't see any one providing components that converts html pages to thumbnail pics.

Just a thought, not sure if that could solve the purpose, you can check that out with using frames and show them on selection in a smaller size if possible.

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #5 (permalink)  
Old July 26th, 2004, 08:36 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Thanks for the responses. I agree with Vijay that there are no components (I searched for two days). So I am forced to use the following rude method.

The HTML is using only fixed pixels for widths and heights. So, I scan the HTML and replace all widths and heights in pixels by a reduced value (10% of what it is there now). This replacement was done with the help of a regular expression. Only tables, texts and images are involved. So I could do it. Then I am showing it in an inline frame. It is a ghost preview (images are all completely distorted) of what is created by the visitor.

The requirement that On clicking the reduced one, it should open the full HTML is dropped.

This is not a professional method, I agree. I hope I may be able to post a more brilliant method after some time.
Reply With Quote
  #6 (permalink)  
Old July 26th, 2004, 03:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

What do those html pages usually contain? And also remember, there should be WIDTH and HEIGHT used in every possible image,table etc... else those don't use WIDTH and HEIGHT attributes would not be reduced to a smaller value in your so called rude method;).

So how do you act upon the texts? It would be better to scan for all font tags and replace them with size attribute of value that fits your requirement.

May be you can post your code here or upload to somewhere and post the URL here, once you are done with it. Someone might suggest a better way of doing it or would fine tune it for you and for anyone who would come up with such a requirement in future.

Who knows, you can name it as Madhu's HTML Diminisher and release it soon.;)

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting html pages to database gilgalbiblewheel Access ASP 0 May 10th, 2007 08:49 PM
cannot preview pages in my browser Aden Dreamweaver (all versions) 8 December 17th, 2004 03:12 AM
converting pages from html to aspx debuajm ADO.NET 6 May 31st, 2004 12:41 PM
converting pages from html to aspx debuajm .NET Web Services 2 May 23rd, 2004 03:47 PM
Creating two worksheets from 2 HTML pages Greg Griffiths Excel VBA 0 February 9th, 2004 05:31 PM



All times are GMT -4. The time now is 06:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.