Jump to content

Another dumb webview (html) question


miko

Recommended Posts

<!--

* This file was automatically generated by Microsoft Internet Explorer 4.0

* using the file %THISDIRPATH%\folder.htt (if customized) or

* %TEMPLATEDIR%\folder.htt (if not customized).

-->

<HTML>

<STYLE>

#TextPreview {

margin-top: -13px;

margin-left: 3px;

/* display: none; */

}

</STYLE>

<HEAD>

<script LANGUAGE="JavaScript" TYPE="text/javascript">

<!-- miko - using iframe -->

var wantText = "true"; // cool, text preview

</SCRIPT>

<script LANGUAGE="JavaScript" TYPE="text/javascript" FOR="FileList" EVENT="SelectionChanged">

<!-- miko - text preview -->

// stop & destroy any text preview

if (wantText)

document.all.TextPreview.innerHTML = "";

<!-- miko - text preview iframe -->

if (wantText && size) {

// show text preview based on file extension

ext = name.substring(name.lastIndexOf(".") + 1, name.length);

ext = ext.toLowerCase();

if (ext == 'txt' ) {

// show an iframe containing the text

document.all.TextPreview.innerHTML= '<IFRAME WIDTH="160px" HEIGHT="184px" FRAMEBORDER="0" MARGINWIDTH="3" MARGINHEIGHT="5" SCROLLING="no" SRC="' + items.Path +'"></IFRAME>'+'<P>'

}

}

</SCRIPT>

</HEAD>

<BODY SCROLL="no" ONLOAD="Init()">

<!-- START LEFT INFO PANEL -->

<DIV ID="Panel">

<!-- TEXT PREVIEW IFRAME -->

<DIV ID="TextPreview">

<BR>

</DIV>

</DIV>

</BODY>

</HTML>

does anyone know how to apply any kind of formatting to this (preferably font size and typeface)

btw this is from the win98 webview.

i have tried all i know of css and have hit the wall any help would be greatly appreciated.

(i have altered this post to hopefully show all the new elements (and their position) in folder.htt, most existing elements are not shown)

miko.

Link to comment
Share on other sites


use notepad. :lol:

i do :rolleyes: (well metapad anyway)

this is the webview pane (pain) i am working on the above code along with a couple of other little bits to give a text preview in the iframe,

it works great except the font is the one specified in IE under Fonts > Plain text fonts, and it looks crap next to my chosen system font Tahoma,

what i want to do is choose the font and font size,

the code is correct, but there seems to be know way to affect the formatting of the output using css or html tags, yet the innnerHTML command should convert the plain text fed to it from the iframe into HTML, it's all IE specific (which doesn't matter becuase its the webview) i think because of document.all, anyway i've reached the limits of what i know so any help from HTML gurus would be greatly appreciated.

miko.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...