Solved

Problems with PrintReady javascript and published Frontpage 2003 web site

Posted on 2004-07-31
4
318 Views
Last Modified: 2013-12-24
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,

Eduardo Marquez-Blake
0
Comment
Question by:eduardo_marquez
  • 2
4 Comments
 
LVL 11

Expert Comment

by:ajaikumarr
ID: 11691509
Hai,

I checked your page and it's just taking long time to load 3 pictures that's why you are feeling that it's getting hanged...

You can do something like this... Save this page as html or open the html page in Dreamweaver and then reformat the page and upload it.

Bye
Ajai
0
 
LVL 31

Accepted Solution

by:
seanpowell earned 125 total points
ID: 11694082
Yes, it's crashing here too. Normally the printing is handled by CSS - without the need for any script, but the use of tables to layout your page (not a good idea) will make this impossible to do. Also, since you set an absolute pixel width on the content, it will get cut off anyways when printed - so fixing the script may not help much :-(

I think your best bet would be to post a Q in the javascript TA to see if someone there can determine the particular conflict that's causing the browser to crash. I'm afraid there's not much I can do here for yuo...

As a side note - regarding the CSS, it's basically handled like this. This gets added to the head tag of the page:

<style type="text/css" media="print">

#header, #nav, #extra, #table3, #footer, #spacer { display:none; }
#table4, #table39  { background-color:none; border:none; }

</style>

The first line are all the things on the page that you don't want to print.
The second line modifies the printing behaviour of those things that you do want to print. But as I said, becuase you've used tables to layout your web page, this best possible approach is going to be very hard to pull off...

Thanks,
Sean
0
 
LVL 1

Author Comment

by:eduardo_marquez
ID: 11695379
Thank you Sean and Ajai for your help! I appreciate it a lot.

I'll do what Sean says and check with the javascript guys to see if they help me find the conflicting code. I also posted this same question on the frontpage newsgroup in the public microsoft server so I'm on my way there to see if someone have already replied. If someone comes up with an answer, I'll get back here and post it, just in case somebody has the same problem as I.

I also thank Sean for the css option, I didn't knew it can be done like that.

Best regards!

Eduardo.
0
 
LVL 1

Author Comment

by:eduardo_marquez
ID: 11696115
Hello all,

Stefan B Rusynko at microsoft.public.frontpage.client newsgroup found the problem... I did some tampering with the javascript code and it wasn't functioning as it should when published. Stefan make some suggestions that worked great, so the problem wasn't either with FrontPage nor with the PrintReady javascript code, it was me. After moving around the lines in the code, everything semms to be working flawlessly.

Thank you again to all who commented on this and to the new visitors who are reading this, there's any problem in using FrontPage with the PrintReady script, just don't attempt to "edit code that you don't understand" ;-)

Best regards!

Eduardo.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now