X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Message-ID: <362B4C81.A7E4C5CD@concentric.net> Date: Mon, 19 Oct 1998 10:28:17 -0400 From: Eric Durant X-Mailer: Mozilla 4.5b2 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: microsoft.public.frontpage.client To: Ed Callahan Subject: Re: don't want height= option added to IMG tag References: <#Porbgv#9GA.181@uppssnewspub05.moswest.msn.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ed Callahan wrote: > I manually enter the tag src="http://www.envstat.com/cgi-bin/rand_image.pl"> into a web page > in FrontPage98 Editor. Now when the web page is brought up a > randomly selected JPG file is displayed. However, FrontPage takes > it upon itself to add width= and height= options to the img tag at > some point (when I save the page?). Since each JPG file is a > different size the height and width values FrontPage selects are > never correct. > > How can I get FrontPage to leave my img tag alone? The other replies to your post suggest changing the way you layout your page or select your images. If these work for your application, that's great, but getting the effect you originally asked about, if that is indeed what you want to do, can be done. The simplest solution is to include the IMG tag in FrontPage HTML Markup tags, but if you want the proper WIDTH and HEIGHT included, read on... Early this year, I achieved this effect on an NCSA Webserver by using the server-side include capability to call a compiled program which generated HTML code (several IMG tags, with randomly selected images having various WIDTH and HEIGHT attributes). The page had to pre-render in browsers supporting it, and it was not desirable for the graphics art people to have to enter the pixel dimensions into a database when adding a new image, so the WIDTH and HEIGHT had to be derived from the image files themselves. In your case, this would probably mean subsuming the function of rand_image.pl into ASP source protected by FrontPage HTML Markup tags. Alternatively, if the Webserver you're using post-processes your pages, you could insert an include directive to it calling a program to include just the image, again protected by FrontPage HTML Markup tags. The sticky point is that, as is, your Perl program seems to output a JPEG image stream. The drawback to this is that you don't have a priori access to the image metadata. Depending on the nature of your random image (selected from an image store, generated based on dynamic data, etc.), you might want to consider restructuring the Perl program or creating a helper program to select a random image (or attributes of a random image) and then use this data to construct the page and as arguments to another program (or as a direct reference if the image store is generally static) to retrieve the image data. C++ code for the image size functions and a routine to generate an IMG collage from an image repository, complete with WIDTH and HEIGHT attributes, compilable with both MSVC++ 5.0 and DEC cxx, is downloadable from my Website, should you have a need for it. Of course, the best approach depends on the details your task, server and resources. Good Luck, Eric Durant --- Website: http://www.edurant.com/ ICQ: 9118339