Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Another dumb webview (html) question

Featured Replies

<!--

* 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.


  • Author
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.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.