Re: Problems with PrintReady javascript and published Frontpage 2003 web site

From: Stefan B Rusynko (sbr_enjoy_at_hotmail.com)
Date: 08/01/04


Date: Sun, 1 Aug 2004 06:25:56 -0400

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
|
|



Relevant Pages

  • RE: Problems with PrintReady javascript and published Frontpage 2003 w
    ... I didn't see the script provided with the Print Ready Script. ... In my computer it works perfectly, it opens a new document and writes ... > link it opens a new windows and my browser freezes. ... I thought the problem was the Frontpage Web Bot counter that I put ...
    (microsoft.public.frontpage.client)
  • Re: Which Is The Better Approach To Working With Javascript?
    ... implementation has no interprocess communication capability, or ability to interface with a script interpreter. ... Java SCRIPT runs in the browser exclusively. ... No language is written just for a single environment. ...
    (comp.lang.php)
  • Controling Modal Dialogs
    ... In order to trap new windows created by script calls to window.open, ... Form and a new browser control in that tab. ... window.external.showModalDialog(dialog, varArgIn, varOptions);} ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Absolute element offsets--exercise in futility
    ... browser sniffing in lieu of feature testing. ... implemented in the latest rewrite of jQuery purports only to support ... it is dynamic script injection. ...
    (comp.lang.javascript)
  • Re: Resend of- 7/15 ->2004: How zoom+ view of received small-font html newsletters?
    ... I called it "Open HTML in Browser". ... select the "Open HTML in Browser" script. ... so it automatically looks for and opens Safari, ...
    (microsoft.public.mac.office.entourage)

Loading