Google Answers Logo
View Question
 
Q: javascript printing issue ( No Answer,   4 Comments )
Question  
Subject: javascript printing issue
Category: Computers > Programming
Asked by: tractor_music-ga
List Price: $20.00
Posted: 24 Jun 2006 13:18 PDT
Expires: 24 Jul 2006 13:18 PDT
Question ID: 740789
Hello - I am trying to fix a javascript/printing issue. The problem is
that when I print the following page, the highlighted selections in
the dropdown textboxes get printed (as they should) UNLESS the user
selects anything towards the bottom of the dropdown boxes.
Here's the URL, and below is an example:
http://www.pianolessonsunlimited.com/lessons/pianochords/index.html
Example:
If you select "C" in the left dropdown box and "Major" in the right
dropdown box, and then hit print, everything works great - even the
selected options of the dropdown boxes get printed (as they should)

However, if you choose "B" in the left dropdown box (bottom option)
and "Major" in the right dropdown box, and then hit print, then there
is a problem >> the highlighted option of the left dropdown box does
not get printed.

Any ideas?

Thanks -
Answer  
There is no answer at this time.

Comments  
Subject: Re: javascript printing issue
From: rbanyal-ga on 29 Jun 2006 15:06 PDT
 
Please specify your browser name with version number. Thanks!
To find this info, click on the Help menu >> About <browser>
Subject: Re: javascript printing issue
From: stevehine-ga on 30 Jun 2006 05:10 PDT
 
This is because when you print the page (certainly in i.e.) it is
re-rendered at a much higher resolution before being sent to the
printer. I am unaware of any 'fixes' as such, however you could try
the following methods of dealing with this:

1, Add a label immediatly above each list which shows the currently
selected row and acts as a repeater for the information.

2, Use javascript to calculate the position of the selected row,
remove enough entries in the list to ensure that the row is shown when
the screen is re-rendered, then add the rows back in as soon as the
print function returns.

Cheers,

Steve
Subject: Re: javascript printing issue
From: mohammadirfan-ga on 06 Jul 2006 14:55 PDT
 
i think when the page is sent for printing, the scroll bars are
intitialized to their initial top positions and if you have made any
selections in any of the list beyond the height of the box it does not
show them.

SO THEIR ARE FOLLOWING TWO SOLUTIONS:

1- INCREASE THE SIZE OF THE LIST UPTO THE NUMBER OF ITEMS IN IT, MEANS
THE LIST WILL SHOW ALL THE ITEMS AND USER CAN SELECT ANY OF THEM

2- USE COMBO BOXES INSTEAD OF LIST

Regards
IRFAN
Subject: Re: javascript printing issue
From: lonely_cavalry-ga on 23 Jul 2006 14:20 PDT
 
You can use CSS

You could read this article:
http://www.alistapart.com/articles/goingtoprint


And you could be use Javascripts inner html property

http://www.experts-exchange.com/Web/Web_Languages/Q_20864812.html

http://www.quirksmode.org/dom/innerhtml.html

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy