<img scr + html file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A pic can be inserted using --> <img scr="http://www.filename.jpg"

Can a html file be similarly inserted?

Tried everything, which isn't all that much, that I could think of.

Thanks in advance for your help.

george
 
Can a html file be similarly inserted?

Probably not. An HTML file isn't an image.

What are you trying to accomplish? Displaying a web page as an image?

Bob Lehmann
 
drgeorgep said:
A pic can be inserted using --> <img scr="http://www.filename.jpg"

Can a html file be similarly inserted?

Tried everything, which isn't all that much, that I could think of.

Thanks in advance for your help.

george

Do you mean <img src="http://www.filename.jpg"> (slight dyslexia) ?

Anyway what you probably need is an iframe

Thsi what I do
<button onclick="loadIframe('News','news.html')">Open/Close News of this Site</button>
<iframe id="News" src=""></iframe>

The script loadIframe is:
function loadIframe(id,sPath)
{
var x = document.getElementById(id)
if (x.style.display != 'block')
{ x.src = sPath
x.style.display = 'block' }
else
x.style.display = 'none'
}

It loads the file news.html into the frame on clicking on the button. On clicking it again, it hides the iframe
 
Hi Bob,

Thanks for your reply. Excuse the syntax errors in the original http example.

I want to use code to insert information that appears in 50+ files. The
information may change, from time to time, and I'm trying to avoid going into
each of the files to make the changes.

I insert an image, which changes periodically, by using a generic name for
the image, e.g., <img src="pagetopimage.jpg."> jpegs are renamed to the
generic as required.

Can I do this with text?

Thanks.

george
 
drgeorgep said:
Hi Bob,

Thanks for your reply. Excuse the syntax errors in the original http
example.

I want to use code to insert information that appears in 50+ files.
The information may change, from time to time, and I'm trying to
avoid going into each of the files to make the changes.

I insert an image, which changes periodically, by using a generic
name for the image, e.g., <img src="pagetopimage.jpg."> jpegs are
renamed to the generic as required.

Can I do this with text?

Thanks.

george

See my reply about using Iframes. You can do the same, i.e. use a generic name for the html file loaded into the iframe. Or you can
keep all the old files and then just copy whichever one you want to the generic name.
 
The OP could use "Include Pages" - anyone mention that?

I believe that's what the OP was asking about.
 
Try the Include Page option under Web components (Insert > Web Component >
Page).

That is, if I understand your question taking that you've used img src as an
example, you want to know how to similar include/insert a file?
 
Hi Trevor,

Yes, give your suggestion a try, but it kinda knocked the oage symmetry
for loop. Am working the code to see what I can do. Your suggestions seems
the best way around this dilemma. Thanks. gp
 
Use the FP Include Page Component, this way the content will be part of the page, resulting in a
single page being loaded, instead of 2 pages every time the main page is called.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Back
Top