4 Replies - 705 Views - Last Post: 20 February 2013 - 02:49 PM

#1 strdev32  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 25-September 11

Looking for reference material to JScript for a custom app.

Posted 20 February 2013 - 01:50 PM

Greetings,

I am attempting to build a custom application for printing pages from a custom layout CSS page, and have a few questions that may help in guiding it along.

1. JScript, is there any usable pages out there to explain code behind it? I have found a ton on Javascript but very
little on this Microsoft used code.

a. main reason I have found the jscript function window.print(), will print without asking for a printer dialogue box, which would be the intended

Is This A Good Question/Topic? 0
  • +

Replies To: Looking for reference material to JScript for a custom app.

#2 strdev32  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 25-September 11

Re: Looking for reference material to JScript for a custom app.

Posted 20 February 2013 - 01:57 PM

Greetings,

I am attempting to build a custom application for printing pages from a custom layout CSS page, and have a few questions that may help in guiding it along.

1. JScript, is there any usable pages out there to explain code behind it? I have found a ton on Javascript but very
little on this Microsoft used code.

a. main reason I have found the jscript function window.print(), will print without asking for a printer dialogue
box, which would be the intended result.

b. the app i'm using to print I would like to be able to specify the printer settings such as page layout to the
default printer ahead of time, and this would be intranet or just a local and known device setup so security is
important but not being broadcasted on the internet.

2. What I am really interested in with JScript is finding out how to do background printing such as not interrupt the users session.

3. Are there any other programming functions I could use that would be both Windows and Linux compatible??

Thank you for any positive input.

strdev32
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Looking for reference material to JScript for a custom app.

Posted 20 February 2013 - 02:06 PM

Here's the MSDN page for JScript.

JScript and Javascript are very largely the same, or have become so over the years. window.print() is the same instruction in Javascript and I suspect it is more to do with the browser whether it produces a print dialog - most will, I believe(?). Perhaps using JScript with Internet Explorer may print directly?

Added: I've only just seen the rest of your post. I would guess that it may be possible to do something within IE using an ActiveX object and a async-script (from IE10) but I don't really know. I very much doubt that you can control print settings cross-browser. Someone else might contribute with other information :)

This post has been edited by andrewsw: 20 February 2013 - 02:15 PM

Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,393
  • Joined: 12-December 12

Re: Looking for reference material to JScript for a custom app.

Posted 20 February 2013 - 02:17 PM

Of course, I am assuming that you are talking about building a web-site (application with a small a)? If you are building an Application (Desktop or Web Application/Service) then the situation is very different.
Was This Post Helpful? 0
  • +
  • -

#5 strdev32  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 25-September 11

Re: Looking for reference material to JScript for a custom app.

Posted 20 February 2013 - 02:49 PM

Thanks for your suggestions andrewsw, I'm afraid there isn't an 'a' somewhere in between but this small stage in it has just become a mountain of learning. Also I would like to be more compatible to both Win and Linux platforms.

My end goal would be to take data from a database such as mySQL >> use something like PHP to bring it over into a custom layout (CSS) then as a webpage print that custom layout. The purpose would to be printing the data from the database as a ticket transaction, unique to the purchaser, this would continually change but the basic CSS layout would stay the same except for dynamic variables pulled from the database. In summary I am trying to use the windows or linux default printer instead of being tied into a software reliance of printing a ticket other than sending a function to trigger events.

My main concern in this stage is to print without having the print dialogue box coming up (assumed default printer settings are already set), and without having to have the page in the foreground while it occurs. So I will continue to play with Javascript functions and see where that path leads. JScript however has a direct to printer option that Javascript does not or did not from what I have looked at.

Thanks again for your input and have a good day.

strdev32
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1