Re: Problems with PrintReady javascript and published Frontpage 2003: Thanks!!!!

From: Lalo Márquez (lalo)
Date: 08/02/04


Date: Mon, 2 Aug 2004 10:32:22 -0700

Stefan,

That was it! It seems to be working flawless! Thank you again!
I have one more question... if I use the Tools->Optimize HTML... function in
FrontPage 2003, could it damage the code or just cleans it up? Will that
work for validating and closing my open tags?

Best regards,

Eduardo Marquez-Blake

"Stefan B Rusynko" <sbr_enjoy@hotmail.com> escribió en el mensaje
news:%23iumwH7dEHA.3944@tk2msftngp13.phx.gbl...
> Don't edit scripts you don't understand (-;
>
> In your script delete the 5 lines you have added between
> printWin.document.open();
> and
> printWin.document.close();
>
> All you should have is
> printWin.document.open();
> printWin.document.write(html);
> printWin.document.close();
>
> If you are attempting to add content to the printed page you need to add
it to the variable "html" after the line which starts your
> printed page content
> html += '\n</HE' + 'AD>\n<BODY>\n';
> or before / after the line that adds your page content (from the <div
id="printReady"> section)
> html += printReadyElem.innerHTML;
> but before the line which closes the page at
> html += '\n</BO' + 'DY>\n</HT' + 'ML>';
> Using
> html +=
> to add to the "html" string w/ proper syntax
> Then Test in Browser (not FP preview) before you publsih
>
> The actual line that generates ALL your html for the printed page is
> printWin.document.write(html);
>
> PS
> You also have some illegally nested <p> tags at:
>
http://frontpage.sobrenatural.net/contenido/secciones/escepticismo/articulo-6.htm
> Like
> <P align=right style="text-align: right">&nbsp;</P></p>
> <p><p style="text-align: center" class="copyright
> and make sure you close the last block tag w/ a (</p>) before the </div>
>
> - validate your page html
>
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> To find the best Newsgroup for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
> _____________________________________________
>
>
> "Eduardo Márquez-Blake" <eduardo_marquez@hotmail.com> wrote in message
news:OhS2va3dEHA.1048@tk2msftngp13.phx.gbl...
> | Hello,
> |
> | I'm building a frontpage web site and I'm testing it in
> | http://frontpage.sobrenatural.net
> |
> | I'm using a script from here
> | (http://javascript.about.com/library/scripts/blprintready.htm) that will
> | allow my visitors to click on a link an see and print a new document
with
> | just the text that I have included between <div id="printReady"> and
</div>
> | tags. In my computer it works perfectly, it opens a new document and
writes
> | the contents of those tags. But now that I've published using MS
FrontPage
> | 2003, it doesn't seem to work. In fact, when I click on the print script
> | link it opens a new windows and my browser freezes. I also tried it on
two
> | other computers here and it freezes the Internet Explorer Browser and
the
> | Avant Browser in them.
> |
> | At firs, I thought the problem was the Frontpage Web Bot counter that I
put
> | in them (to check how many times each of my articles have been read),
but I
> | move one of them outside of the <div> tag in this page
> |
(http://frontpage.sobrenatural.net/contenido/secciones/curanderismo/articulo
> | -1.htm) and the problem persists.
> |
> | Since my web site is in spanish language, I'm giving you the urls you
may
> | visit to reproduce the error. If you navigate to
> | (http://frontpage.sobrenatural.net/contenido/secciones/index.htm), you
> | should see some text that reads "Lista de Todos los Artículos
disponibles:",
> | under it, you should see a list of several pages. Please click on any of
> | them and when it opens, you'll see the article. Now please scroll down
and
> | on the left margin you should see a box that reads "Opciones" and then
an
> | icon with a printer with the label "Imprime este artículo". That's the
link
> | to the script, but the actual script is in a separate file that you may
> | download here (http://frontpage.sobrenatural.net/js/printready.js).
> |
> | So, as you may see, the problem is that I can't seem to figure out why
this
> | script does not work after it has been published, but it do work on my
local
> | hard drive.
> |
> | A word of CAUTION: If you click on the "Imprime este artículo" link,
your
> | browser will open a new window that may freeze all of your browser's
> | windows. You may have to shut down your browser enterely and reload it
> | again.
> |
> | By the way, I'm not a professional web developer, I'm just a humble
studio
> | photographer with a lot of spare time ;-)
> |
> | I will appreciate any help on this. Thanks in advance.
> |
> | Sincerely,
> |
> | Lalo Márquez
> | www.sobrenatural.net
> |
> |
> | ---
> | Este mensaje fue certificado Libre de Virus al ser Enviado.
> | Checked by AVG anti-virus system (http://www.grisoft.com).
> | Version: 6.0.719 / Virus Database: 475 - Release Date: 16/07/2004
> |
> |
>
>

---
Este mensaje fue certificado Libre de Virus al ser Enviado.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.730 / Virus Database: 485 - Release Date: 28/07/2004


Relevant Pages