PDA

View Full Version : IE vs Firefox



Billbo
22-04-2015, 23:42
I use both IE (Internet Express) and Firefox. The reason is because of two sites, up to now. Now you are the third. The problem is saving a webpage that has a program on it, that using that page offline, later, to copy the code into an editor. In one of the other sites, the problem is with their wiki, the other one is the site itself. But, I'll explain the problem for this site.

When I save a page from this site, using firefox, that has code, and try and copy and paste later, it displays as one continuous line, for example:

Uses "console"Dim s,str1,rmv As String str1 = "She was a soul stripper. She took my heart!" rmv ="aei" s = Remove$(str1, Any rmv) PrintL s WaitKey

If I do the same, but use IE, it will display correctly, for example:

Uses "console"
Dim s,str1,rmv As String
str1 = "She was a soul stripper. She took my heart!"
rmv ="aei"
s = Remove$(str1, Any rmv)
PrintL s
WaitKey

The reason I just caught it for this site is that here I normally copy and paste while on line.

BTW The problem with firefox the other site's wiki is corrected with firefox by the GreaseMonkey add-on. IE copies and pastes the wiki as one line. Weird.

Any suggestions, other than telling me to go to hell?

Bill

P.S. It's just the code that this happens. I saved this page, copied and pasted the text just fine. Again, weird.

John Spikowski
23-04-2015, 06:38
Hi Bill,

I run into that from time to time myself. A trick that sometimes works for me is to use my e-mail client to format the pasted text correctly. It doesn't work in all cases but has save some reformatting on occasions.

John

Billbo
23-04-2015, 17:38
John,

Thanks John. I'll give that a try.

Bill

Petr Schreiber
23-04-2015, 18:42
Hi Bilbo,

thanks for letting us know about the issue. I never noticed it, as I use the following trick:

hover your mouse over code in forum post
hold CTRL and click (blue margin will appear)
press CTRL+C and paste anywhere


Hope it helps,
Petr

Billbo
23-04-2015, 19:11
John and Petr,

Thanks for your suggestions. But, as I indicated, I wanted to be able to do it offline. Like using my laptop at the park on a nice sunny day. John, can't access you e-mail client offline. Petr, yes that works, but again, you have to be online to do that. Offline, you have to click and drag to highlight the code to copy. For now, I'll just stick with IE for the site.

Thanks, again, to you both.

Bill

Petr Schreiber
23-04-2015, 23:01
Well, why not help this with a little ThinBASIC script, right? ;)

Please use the script in the attachement to extract all code snippets from the downloaded page to separated TXT files...

Attached also 2 downloaded HTML files which I used for testing this solution.


Petr

EDIT: Attachement removed, re-attached in my post below

John Spikowski
24-04-2015, 00:24
John, can't access you e-mail client offline.

I just pop a new e-mail message (on my laptop), paste the code in the message area and once formatted I copy it it my text editor. Maybe I didn't explain that very well in my prior post. :neutral:

Billbo
24-04-2015, 05:34
John and Petr,

John; yes I understood your post. But, again, I cannot access my e-mail client offline and, therefore, cannot use your method. But, yes, it does work while on line.

Petr,

First off, I bundled your script and used it with your example htm's and it worked great. But! There are two to save a webpage and have a htm file. One is save as "Web Page, HTML only (*.htm, *.html)" and the other is "Web Page, complete (*.htm, *.html). I tried the first method on a page with code and get a "No snippets found0" popup. I tried the second method and it found five(5) snippets, but saved with gibberish in them. The page used is:

http://www.thinbasic.com/community/showthread.php?11167-enumerations&p=91913#post91913

Attached is a zip of the page and the five(5) snippets produced. Plus, there's a "Type .._ As.htm" saved by the first method for you to checkout.

Your little program is a great tool. I just need to get it work for me. Now, I haven't tried with an IE saved file yet. I'll let you know.

Thanks to you both,

Bill

P.S. I just checked it out after saving a page (the above) in both methods using IE. No good. This time, the first method worked but saved the files as 0 bytes in length. This time the second method gets the "No snippets found0" popup. Weird.

Petr Schreiber
24-04-2015, 18:33
Hi Bilbo,

my mistake, try this fixed version, produces correct output for me.
It now supports both versions of HTML saved by Firefox ;)


Petr

EDIT: Attachement removed

Billbo
24-04-2015, 20:18
Petr,

I am sorry to say that it did not work correctly. I ran it on the enumerations page, again, and it only finds the first out of the five(5) snippets. Still doesn't find any on the "page only."

Bill

Petr Schreiber
24-04-2015, 20:43
Hehe,

I am tired from work, sorry, here comes the working version :)


Petr

Billbo
24-04-2015, 22:11
Petr,

I hope you do not consider it a waste of time on this thread. Well, you're half way there. Your new version works fine on the enumerations page, if I save the page as "page only." If I run on the "complete page" save, it, again, saves the file with gibberish. But, in addition to that, before it save each snippet, a popup window with page's coded text (php, whatever) is displayed with and "Ok" and "Cancel." If you click "Ok", it will save the snippet, and the do the same for the next. But, as I indicate, they're save with the gibberish. I hope that makes sense.

I know, everyone probably thanks I should go on to something more important.

Bill

Petr Schreiber
24-04-2015, 22:42
Hi Bilbo,

fixed the popups, but cannot replicate "gibberish" with this version on my side, I get valid output. I attached the files how my firefox 37.0.2 saves them (used for tests).

It is interesting task for me, so don't worry :)


Petr

Billbo
25-04-2015, 00:27
Petr,

I am glad you find the problem interesting. Well, at least we are using the same version of firefox, 37.0.2, but in comparison, there is difference in size of a saved page (see in the attached). On your two(2) files everything's fine. For mine, no more popups, but everything else is the same. I have attached my re-saved pages of enumerations, and the snippets created with the last bundle of you program. My pages end with a 2. The other two(2) are yours. I've used UltraEdit as an editor for years; I am going to compare both our pages in it.
To prep you about the difference in size, my Complete2.htm is 122,806 bytes; your Complete.htm, 111,688 bytes. My JustPage2.htm is 92,424 bytes; your JustPage.htm, 105,479 bytes. There's something mine adds that causes the additional characters in the Complete snippets. I hope you're still interested.

Bill

Petr Schreiber
25-04-2015, 08:11
Good morning Bilbo!,

I tried to open the snippets from your zip file... and there is no gibberish on my PC, just have a look at the screenshot.
Can you try to open the snippets in notepad?


Petr

Billbo
27-04-2015, 17:00
Petr,

I had not thought of what you did. You see, I've used Total Commander (TC) for years and I use its lister feature to view files; graphics, applications, text files, etc. I'll normally view a file before I use it. Also, I can copy text without having open the application. But I use UltraEdit for text editing. I opened the gibberish files in it and they are okay. But what gets me is that your files display okay in lister and mine do not. So, I suppose the matter is solved. The problem is TC's lister.

I sure thank you.

Bill

P.S. This is late, because your site went down on me when I was making this reply right after yours. It just now came up for me. I'm surprised there nothing on the site about it.

Billbo
06-05-2015, 16:02
Hey all,

Here's what I found today. Using IE I saved the page of Rene's new thread. Displayed it offline and lines were on top of each other. Not the whole page, but in places.

I saved it using firefox. Offline I copied some of the code into my Word 2007 and saved as text. There was gibberish at the being of the lines. I saved the same in my Atlantis Word Processor as text and everything was great. This is getting crazy!!

Bill

P.S. I forgot to mention in my posts, I save the pages in the mht Web Archive format.