473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Javascript problem

Hello All,

I am trying to offer "Print" functionality using an HTML button with the
help of "window.print()"

This button works fine in Firefox but not in IE7. I am dumping the entire
content of the page which has this HTML button code onto a different page
using document.write. Everything else works fine except for this print
button. I have a close button using "window.close" that works fine but not
this print button.

Any ideas or suggestions?
Mar 28 '07 #1
3 1363
Diffident wrote:
Hello All,

I am trying to offer "Print" functionality using an HTML button with the
help of "window.print()"

This button works fine in Firefox but not in IE7. I am dumping the entire
content of the page which has this HTML button code onto a different page
using document.write. Everything else works fine except for this print
button. I have a close button using "window.close" that works fine but not
this print button.

Any ideas or suggestions?
Standard question #1:
What do you mean by "not working"?

Standard question #2:
What error message do you get?

--
Göran Andersson
_____
http://www.guffa.com
Mar 28 '07 #2
Usually, when the window.print works properly, it should display the "print"
screen in a window using which you can print the documentusing the default
printer. It is not displaying that window in my case. And, I am not getting
any javascript error. It does nothing. However, it works fine in firefox.

Any pointers?

"Göran Andersson" wrote:
Diffident wrote:
Hello All,

I am trying to offer "Print" functionality using an HTML button with the
help of "window.print()"

This button works fine in Firefox but not in IE7. I am dumping the entire
content of the page which has this HTML button code onto a different page
using document.write. Everything else works fine except for this print
button. I have a close button using "window.close" that works fine but not
this print button.

Any ideas or suggestions?

Standard question #1:
What do you mean by "not working"?

Standard question #2:
What error message do you get?

--
Göran Andersson
_____
http://www.guffa.com
Mar 28 '07 #3
"Nothing" rarely ever happens. Have you enabled Javascript error
messages in the browser? Otherwise it will only show up in the status bar.

Diffident wrote:
Usually, when the window.print works properly, it should display the "print"
screen in a window using which you can print the documentusing the default
printer. It is not displaying that window in my case. And, I am not getting
any javascript error. It does nothing. However, it works fine in firefox.

Any pointers?

"Göran Andersson" wrote:
>Diffident wrote:
>>Hello All,

I am trying to offer "Print" functionality using an HTML button with the
help of "window.print()"

This button works fine in Firefox but not in IE7. I am dumping the entire
content of the page which has this HTML button code onto a different page
using document.write. Everything else works fine except for this print
button. I have a close button using "window.close" that works fine but not
this print button.

Any ideas or suggestions?
Standard question #1:
What do you mean by "not working"?

Standard question #2:
What error message do you get?

--
Göran Andersson
_____
http://www.guffa.com

--
Göran Andersson
_____
http://www.guffa.com
Mar 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
6
by: Alex Rast | last post by:
First of all, this is not a programming question. I'm a user, not programming in JavaScript. I'm not, however, a novice user or even a power user - I certainly know programming intimately as well...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.