Safari and HTML Files
I created an HTML file in Text Edit and another in Microsoft Word and saved the extensions as .htm and .html
When I try to open the webpages in Safari by going to File > Open File, the HTML documents show only the source code in Safari instead of the actually webpage (with images and links).
Am I using the wrong program or are ther preferences that I need to change?
First off, you could try the free Nvu program I linked to in the reply just before yours.
In TextEdit, there are two changes you need to make in Preferences:
1. Under "New Document" set "Format" to "Plain Text.
2. Under "Open and Save", uncheck "Add '.txt' extension to plain text files".
This will make all future files you create to be plain text and will allow you to save the files using an .html extension.
If you already have files created in TextEdit, open them, select everything by clicking Command-A, and then go to Format > Make Plain Text. Save the file. You may have to rename it if it does not yet have an .html extension.
Similar Messages
-
A working method to load local PDF and HTML files on iOS
I had a lot of trouble getting this to work, and I'm hoping this post saves someone time. Some of the information that's been posted in other locations is either wrong, incomplete, or might only work on Android. By the time you read this message the information here may no longer be accurate, so here's the testing environment:
Window 7
Flash CS 5.5.0
AIR 2.7.0.19530, which was compiled on June 28, 2011
iPad 1, version 4.3.5 of iOS
Let's get started.
On iOS, you load external PDF and HTML files using the StageWebView class.
On Windows, StageWebView works but the HTMLLoader class is a better choice if you're creating a desktop app.
You can also load HTML files by reading in the file's text. The information in this post is only for loading external HTML files.
StageWebView will not load a file that's in File.applicationDirectory. All files bundled in your app are placed in File.applicationDirectory, which means you'll have to copy any external file you wish to load with StageWebView to another directory.
So where can you copy your file? File.applicationStorageDirectory won't work. File.documentsDirectory does work.
Several people have recommended copying to a temporary file using File.createTempFile(). This works, but there's a catch: it seems that, like Windows, StageWebView relies on a file's extension when determining how to load it. When you create a temporary file on iOS using File.createTempFile(), the file will have no extension (and on Windows, File.createTempFile() creates a file with the extension .tmp, which is equally problematic).
The solution to the file extension problem is to rename the temporary file by appending the original file's extension. AIR currently does not have a <file>.rename() function, so you'll have to do it using <tempFile>.moveTo().
Here's some code I've successfully tested several times on both iOS and Windows. The file is copied to the temp directory. The file's extension is restored by just slapping the original file name to the end of the temp file.
private function loadExternalFile():void
var webView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle( 0, 0, 1024, 555 );
// Works with either html or pdf files.
// These are stored in the root of the application directory.
var fileName:String = "euei.pdf";
//var fileName:String = "euei.htm";
var sourceFile = File.applicationDirectory.resolvePath( fileName );
var workingFile = File.createTempFile();
try
sourceFile.copyTo( workingFile, true );
// You have to rename the temp file
var renamedTempFile:File = workingFile.resolvePath(workingFile.nativePath + fileName);
workingFile.moveTo(renamedTempFile, true);
webView.loadURL( renamedTempFile.url );
catch (err:Error) { }I tried this with Flash CS5.5 and AIR 4.0 SDK. Any pdf loaded simply fills the viewPort with black. Also tested with a png version of the pdf and that displayed just fine.
What's the purpose of copying to a temp work file? I found that webView.loadURL( sourceFile.url ); gave me the exact same results.
Any ideas?
Thanks! -
Hi, I need to implemnt this for my project....
I need to combine XML and HTML file and generate a new HTML file
Sample XML File:
<user>
<txtName>sun</txtName>
<txtAge>21 </txtAge>
</user>
Sample HTML File:
<body>
Name: <input type="text" name="txtName" value=""
Age : <input type="text" Age="txtAge" value=""
</body>
I need a java program to combine the above xml and html files and generate the output in HTML.
Any kind of help is sincerely Appreciated.
Thanks.toucansam wrote:
So you want us to write it for you? It's pretty straight forward, first parse the xml file with the *[best java xml parser|http://www.google.com/search?&q=parsing+xml+in+java]* and then go through the nodes and construct the html with strings and concatination. Then write the file using *[the best java file writer|http://www.google.com/search?hl=en&q=writing+to+a+file+in+java]*.
He would do better to use existing tools that make this easy [http://www.ling.helsinki.fi/kit/2004k/ctl257/JavaXSLT/Ch05.html|http://www.ling.helsinki.fi/kit/2004k/ctl257/JavaXSLT/Ch05.html] -
Flash CC does not publish swf and html files
I'm having issues with Flash CC. When I go to publish my movie the status bar appeaers then quickly disappears and the html and swf files are not created. I'm also not able to export the movie as a quicktime or AVI file. Is there specific settings I must have to publish and export? Note: I am working with AS3 and tried to do a simpple test with a box moving left to right and I have the same problem.
Any help is appreciated. Thanks!Are you sure the HTML and SWF are not currently in use? For example if you publish and preview it in a browser, it can lock those files because they're "in use". Then Flash cannot overwrite them. You'd need to close the browser or any Flash Players displaying them. If that still won't overwrite, delete the files and see if they're re-created.
If no files are being created at all, gointo publish settings and set a path to export the SWF and HTML file to, don't leaving it at the default (same folder as FLA). Try various places in fact to test permissions.
If you're on Windows you could try running Flash CC as Administrator to also get around any file writing permission issues. Right-click on the Flash icon and select Run as Administrator.
I've only really encountered this when my SWF/HTML was in use or stuck in a process. -
How to read data from PDF and HTML file
I have got solution to read text form .txt file but did'nt get code for PDF and HTML.
I dont want to convert PDF to txt.
Please help me ...ah crap i could have guessed there would be a crosspost only the forum in where the crosspost is made is abit funny
To OP: DO NOT CROSSPOST
http://forum.java.sun.com/thread.jspa?threadID=5267875&tstart=0 -
How to read data from a excel and HTML file
Hi
I am writing an 2D-array of string into Excel/HTML file using Report generation.
Can anybody tell me how to retrieve back the written data from the same files again and view in array format.
Thanks & regards
Visuman
Solved!
Go to Solution.you can use activex to read the data from the excel fileback in the array format...go through this vi...may b this will help you.........
Attachments:
Read Excel-1.vi 32 KB -
When I made Firefox 3.6.2 my default browser, it changed the icons for my .htm & .html files to the fox&globe symbol - how do I change back to my old red dragon symbol? Folder options doesn't work, the icon for the file type changes in folder options, but has no effect on the icon displayed by Windows XP Explorer. Changing registry entries for DefaultIcon from ...\firefox.exe,1 to ....\mozilla.ico also failed, the WxExplorer icons changed to a generic symbol. Thanks, [email protected]
search keyword axolotlWith the help of information from user, ptressel, in [https://support.mozilla.org/en-US/questions/1032154#answer-673322 a post here about the existence of sessionstore.js when version 33 was released], I was able to easily recover my tabs and tab groups as follows:
# close Firefox and, perhaps, allow a few seconds (30s?) for any final closing of files;
# check to see if you have a sessionstore.js file in your profile folder, named like the one I documented in my original post above;
# if it is not timestamped prior to the discovery of your problem, open the sessionstore-backups folder;
# check if the recovery.js file is suitably timestamped and, if not, the recovery.bak.
# At this point, you are likely to find that none of them are prior to your problem occuring. If so, open your backups of this folder and go through steps 2-4 to find a file prior to your problem occuring.
# When you find a file, copy it to the root of your current profile folder and name it, "sessionstore.js"
# Open Firefox. Mine opened up as desired.
This is a Windows solution. Sorry I can't comment on other platforms, but I'd bet that as this is just a file copy and renaming, it is likely the same.
For Windows users, you may find you need to sign out and login as an administrator in order to access the backups. You need not logoff your standard account, but do have Firefox closed as described above.
Hope that helps. -
Published swf and html file viewing issues.
Greetings,
I design web banners and used to, with Flash 8, sedn my
clients the published *.html and *.swf files to download onto their
desktops so they could view the banner. With Flash CS3 this doesn't
seem to be working the same way. It keeps giving them the window
that says something about "ac_runactivescript.js". How come this
never did this with Flash 8?click file/publish settings/formats, make sure the swf and html boxes are selected, and click the use default names button. then click file/publish. are the files in your directory with your fla?
if not, create a new directory (that has no subdirectories), save your fla to that new directory using a new name (ie, click file/save as). then click file/publish. check the new directory for your 3 files. -
AppleScript: Change an order of texts and HTML file in the body of Mail
I would like to know how to insert a HTML file below the Signature in the body of Email.
This is my code,,,,
set the clipboard to (read (choose file) as «class RTF »)
set theBody to "Hello"
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {content:theBody, visible:true, subject:"mysubject"}
end tell
tell application "System Events"
tell process "Mail"
set focused of UI element 1 of scroll area 1 of window 1 to true
keystroke "v" using command down
end tell
end tell
What I would like to do is an order of body going like
From the top:
Body
Signature
HTML rtf file
Please teach me how to do!
Cheers,Hi,
murrayshimada wrote:
Wondering how about inserting a HTML between body and signature? If you have a free time, please give me a tip again. Anyway, thank you for your help. Cheers,
You can set the order like this:
set the clipboard to (read (choose file) as «class RTF »)
set theBody to "Hello" & return & return -- need two return character to paste the clipboard after the body
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {content:theBody, visible:true, subject:"mysubject"}
my pasteToEnd()
delay 0.6 -- need a delay to not remove the pasted text.
set message signature of theMessage to signature 1 -- this put the signature after the text
end tell
on pasteToEnd()
tell application "System Events"
tell process "Mail"
set focused of UI element 1 of scroll area 1 of window 1 to true
key code 125 using command down -- (arrow down + command down) to set the insertion point to the end of text
keystroke "v" using command down
end tell
end tell
end pasteToEnd
Here's another example, the order = the HTML, the body and the signature:
set the clipboard to (read (choose file) as «class RTF »)
set theBody to "Hello"
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {content:"theBody", visible:true, subject:"mysubject"}
my pasteAtBeginning() -- at beginning
delay 0.6 -- need a delay to not remove the pasted text.
set message signature of theMessage to signature 1 -- this put the signature after the text
end tell
on pasteAtBeginning()
tell application "System Events"
tell process "Mail"
set focused of UI element 1 of scroll area 1 of window 1 to true -- this set the insertion point at beginning
keystroke "v" using command down
keystroke return & return -- to put a blank line between the RTF and the body
end tell
end tell
end pasteAtBeginning -
Lost Tomcat, its database and all JSP and HTML files
I have mistakably uninstalled Tomcat from my machine, it removed the data I stored in the root including HTML and JSP files, I am using windows XP, Is there any way I can recover htem back, atlest the database and the JSP files? please Help
Also a good example of why you should develop apps in a separate directory structure and then deploy the WAR file to Tomcat.
You didn't have all your source code under Tomcat, did you?
You weren't using a source control system like CVS?
Oh, my. ;)
You will from now on, I'll bet.
% -
Flash navigation and html files
I have a Flash navigation banner. The navigation banner
contains seven buttons. Each button when clicked goes to different
frames in the Flash movie. So, the first interaction is to make the
movie to go to a particular frame, which I was able to do easily.
On those frames, I also would like to load or link to HTML page.
Like frame 10 will be page1.htm, frame 18 will be page2.htm so on
and so forth. How do I link .htm files and the single navigation
bar where each button would go to a specific frame and play the
frame? I don’t want to use frames in my html docs. Is there
any other solution? Please help!!
Thank you in advance.
FAThank you for reply. I appreciate it. So, if I understand
correctly:
I would embed the navbar.swf in all my html files. Then Each
button would go to each html pages (Like page1.htm page2.htm
etc...) Then I use your code in my html file right? Like each html
file will have the following code:
<param name="movie" value="nav.swf?frame=page2">
Is that how it works. Sorry for not being able to your
answer.
Thank you very much again -
SWF and HTML files separate directories.
I am generating HTML wrapper dynamically and it runs
successfully (No JavaScript errors etc.). I right click on the page
and it displays "Print,Settings, About Flash Player"
Problem is that my SWF file which resides somewhere else on
the HTTP server is not played at all. I get a blank page. The path
to SWF was provided in HTML using an alias defined on the HTTP
config file.
If I run static HTML file in the same directory as SWF file
the page is generated OK.
Am I missing a crossdomain.xml file but everything is on the
same domain (so ruled out).
Please help.Hi zetokore, and welcome to the Community!
You cannot separate the HTM and SWF files, so don't try.
These files are designed to be symbiotic and must be accessed from
the same location. Your "getaround" won't work because if you link
to the SWF instead of theHTM, the output will be warped ... the HTM
file contains sizing parameters for display of the SWF; so without
proper sizing, the SWF will appear warped.
In short - you'll have to live with it, because what you are
seeing is Captivate's designed behavior.
To emphasize the point: Design and record your Captivate
projects at the size they are to be displayed to the end-user ...
always! And - again always - link to the HTM file, never to the
SWF.
. -
Saving jpeg and html file into different folders
Hi, all.
I developed a VI that generates, on a timely basis, reports (HTML format) that contain some text, numerical values and graph images (jpeg). The problem is that when it saves a HTML file to a folder, JPEG files are also saved into the same folder.
Is there any way I can save these html and jpeg into different folders?
Or is it even possible to generate html report with some graph images without having to have save jpeg files? (this would be even better).
I included a screen shot of the VI.
Thanks in advance for your help.
Attachments:
screen shot.doc 184 KBThere is currently no way, with the Report Generation VIs, to save the image files for an HTML report to a separate folder. If you think this would be a helpful feature, please submit your request to the Product Suggestion Center, and we will look into possibly including this feature in a future release. For now, the only workaround I can think of would be for you to use the File I/O VIs to manually create another folder and move the image files to it, then use the string manipulation functions to edit the contents of the HTML file to point all image file references to the new location.
As for not generating images, I don't know of an easy way to have an HTML page with images where there are not corresponding image files.
Good luck,
-D
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman -
CRAZY FONTS! Garbled garbage in Safari and help files. How do I fix it?
I wish I could post a screen shot.
Some pages in my browser, particularly in Wikipedia, display the bulk of the content in numerals that look like fractions--0 over 02 8996 to the 4th--with an occasional hyperlink (bold, blue, and/or underlined) appearing in regular Latin characters. If I copy the nonsense and paste it into anothe app like excel, it displays in Latin characters and I can read it. And that has been my workaround. But I'm getting tired of it. WHY does Safari (and today, a help system, which wasn't ANY help at all) display these fractional numbers instead of alphabetic letters? And how can I stop it? It doesn't appear linked to the font I choose to display in.The problem is due to an underlying bug in the WebKit.framework, which is the framework Safari, Mail, and other applications use to display HTML content. The bug causes the glyphs from Fraction style fonts to be displayed in place of the plain-style glyphs, even when the web page specifies the plain style should be used.
-
Hi,
I hope someone can help me - it is probably a simple thing,
but have searched the help files etc.
I have a flash document with 3 buttons, each with links. When
I publish the file, the links in the SWF file work fine, but those
in the HTML file don't (all other actions are OK).
I doubt this important, but I have Flash CS3 on an offline
computer.
Please help!!
Mark.This is the html code - it is just copied from the file which
is published in CS3.
Thanks.
<noscript>
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="775" height="160" id="TPmenu" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="TPmenu.swf" /><param
name="loop" value="false" /><param name="quality"
value="best" /><param name="bgcolor" value="#003366" />
<embed src="TPmenu.swf" loop="false" quality="best"
bgcolor="#003366" width="775" height="160" name="TPmenu"
align="middle" allowScriptAccess="sameDomain"
allowFullScreen="false" type="application/x-shockwave-flash"
pluginspage="
http://www.macromedia.com/go/getflashplayer"
/>
</object>
</noscript>
Maybe you are looking for
-
How do I make partitions on an external drive?
Disk utility no longer has a Partition tab, so how can I reformat and partition in Lion?
-
Game server: Map managing questions
Hello everyone, I'm trying to develop some kind of RPG. I have different issues, where I need advice: 1) Map(2D) managment on game server The map I want to keep in memory on server will contain objects such as: Item, NPC, Character, etc. Item, NPC, C
-
HT201260 where are /library/receipts version 10.6.8
Hi, I am looking for the Library/receipts in Version 10.6.8. I am doing a reinstall of FCP7 and it recommend to delete the FCP pkg file before reinstall.
-
Planning Rule (Calc Manager) Names Disappearing
I have deployed several rules to Planning but after sometime, the rule names no longer show in Planning. I have yet to determine the sequence of events that cause the rule names to disappear but this is the 3rd time it has happened. Is this a known b
-
Can I use BzAPI in windows? If yes, how?
How can I install BzAPI in my Windows machine?