code

Joined
Mar 9, 2011
Messages
17
Reaction score
0
Points
1
HI, I'm trying to put changing text onto a website created in iWeb. I have created the file as an animation in photoshop, uploaded it to the server and used the following code to place in an html snippet. When I check the published file in a local folder the text does not appear. Do I have to go live before it shows ? Can anyone please advise ? The coded is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.morganbentleyltd.co.uk/media/flash.html">
<head>
<title>flash.html</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body bgcolor="transparent">
<!-- Save for Web Slices (Flash.psd) -->
<img id="BrowserPreview" src="BrowserPreview.png" width="300" height="100" alt="" />
<!-- End Save for Web Slices -->
 
Joined
Oct 22, 2007
Messages
8,967
Reaction score
287
Points
83
Location
London
Your Mac's Specs
Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
<img id="BrowserPreview" src="BrowserPreview.png" width="300" height="100" alt="" />

Where is the PNG file in relation to the html file you created (is it in another folder

and also you have no </body> tag at the end
 
OP
B
Joined
Mar 9, 2011
Messages
17
Reaction score
0
Points
1
Code

Hi,
The animation file was created as a psd file not png. Do I need to convert to png and if so would the png file be the complete animation ?
If so do I upload to the media folder on the server ?
Thanks for your help.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
<html xmlns="http://www.morganbentleyltd.co.uk/media/flash.html">
I'm not sure who (or what) suggested that this was a valid namespace. Where did this come from?

<img id="BrowserPreview" src="BrowserPreview.png" width="300" height="100" alt="" />
The key here is the src attribute. This has to point to a valid image. In this case, you're saying "use BrowserPreview.png which is located in the same directory as this HTML file." So, you need a PNG named "BrowserPreview.png" and it has to be in the same directory. However, you can always change the name and location. Changing the name is easy but the location can be a bit tricky for some to wrap their minds around. Locations are relative to the file being edited. So, if you had that image in a directory called "img", you'd change that src attribute to "img/BrowserPreview.png". Does that help?
 
OP
B
Joined
Mar 9, 2011
Messages
17
Reaction score
0
Points
1
Hi, This is all a bit over my head... think I'll go to fiverr or elance and get someone to sort it for me.
Thanks for your help.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top