From vivekjoshi07 at gmail.com Mon Jul 12 05:58:48 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Mon, 12 Jul 2010 16:28:48 +0530 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox Message-ID: Hi All can any one please help me. i am not able to print embaded pdf in FireFox ,the same code is working fine in IE ,the code is given below From philthathril at gmail.com Mon Jul 12 08:27:16 2010 From: philthathril at gmail.com (Philip Thompson) Date: Mon, 12 Jul 2010 08:27:16 -0500 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: Message-ID: On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > Hi All > > can any one please help me. i am not able to print embaded pdf in > FireFox ,the same code is working fine in IE ,the code is given below > > > > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > First, you should probably filter the extra junk out of your example... people don't want to have to wade through it to find what the issue is. Second, you can't have a "body" tag and a "frameset" tag in the same file (unless you include a body tag within a "noframeset" tag). I don't think this will necessarily fix the issue you're having, but try cleaning it up first. ~Philip From vivekjoshi07 at gmail.com Mon Jul 12 08:41:04 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Mon, 12 Jul 2010 19:11:04 +0530 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: Message-ID: On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson wrote: > On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > > > Hi All > > > > can any one please help me. i am not able to print embaded pdf in > > FireFox ,the same code is working fine in IE ,the code is given below > > > > > > > > > > > > > > > > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > > > > > > > > > > First, you should probably filter the extra junk out of your example... > people don't want to have to wade through it to find what the issue is. > Second, you can't have a "body" tag and a "frameset" tag in the same file > (unless you include a body tag within a "noframeset" tag). I don't think > this will necessarily fix the issue you're having, but try cleaning it up > first. > > ~Philip > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From vivekjoshi07 at gmail.com Mon Jul 12 08:49:11 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Mon, 12 Jul 2010 19:19:11 +0530 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: Message-ID: Hi philip i have tried after removeing the body tag , but problem is same .it gives the error print function is not present. my requirement is that I need a common code for both IE and Firefox On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson wrote: > On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > > > Hi All > > > > can any one please help me. i am not able to print embaded pdf in > > FireFox ,the same code is working fine in IE ,the code is given below > > > > > > > > > > > > > > > > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > > > > > > > > > > First, you should probably filter the extra junk out of your example... > people don't want to have to wade through it to find what the issue is. > Second, you can't have a "body" tag and a "frameset" tag in the same file > (unless you include a body tag within a "noframeset" tag). I don't think > this will necessarily fix the issue you're having, but try cleaning it up > first. > > ~Philip > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From riegel at clearimageonline.com Mon Jul 12 08:50:23 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Mon, 12 Jul 2010 09:50:23 -0400 Subject: [Javascript] Differences with event handlers Message-ID: Hello All, I have an issue with event handlers and am not sure how to resolve it... I can handle a click event for an anchor one of two ways... 1. anchorObj.addEventListener( 'click', fn, false ); // or attachEvent or 2. anchorObj.onclick=fn; With the second method I can "return false;" from fn and it stops the browser from doing the normal thing, but with the addEventListener it still sends the anchor. What is the best way to get the first method to work like the second one. Thanks, Terry From david at dorward.me.uk Mon Jul 12 08:52:33 2010 From: david at dorward.me.uk (David Dorward) Date: Mon, 12 Jul 2010 14:52:33 +0100 Subject: [Javascript] Differences with event handlers In-Reply-To: References: Message-ID: On 12 Jul 2010, at 14:50, Terry Riegel wrote: > What is the best way to get the first method to work like the second one [and stop the link the event is on from being followed] function fn(event) { event.stopPropagation() } https://developer.mozilla.org/en/DOM:event.stopPropagation -- David Dorward http://dorward.me.uk From dlovering at gazos.com Mon Jul 12 08:52:55 2010 From: dlovering at gazos.com (David Lovering) Date: Mon, 12 Jul 2010 07:52:55 -0600 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: Message-ID: <000301cb21c9$891e5280$9b5af780$@com> >From what I've seen, Firefox is a lot tighter about grammar violations (i.e; mixing frameset and body declarations) in the same .html object. Maybe that's why your code is dying outside IE. Break it down into the details, such as importing a PDF into a .div and then trying to print it. There are a number of examples out there that demonstrate this method, and the ones I've used seem to port well across platforms. Really, mixing Framesets and body entities is a violation of the DOM structure (unless as noted earlier you wrap the body in a noframeset pairing, which effectively neuters the body block). By "cleaning up" the previous author almost certainly meant "make DOM-compliant". Your code (even reduced) doesn't go through my syntax parser without throwing flags. -- David Lovering -----Original Message----- From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek joshi Sent: Monday, July 12, 2010 7:41 AM To: JavaScript List Subject: Re: [Javascript] problem to print embdad pdf which is in object tag in Fire fox On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson wrote: > On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > > > Hi All > > > > can any one please help me. i am not able to print embaded pdf in > > FireFox ,the same code is working fine in IE ,the code is given below > > > > > > > > > > > > > > > > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > > > > > > > > > > First, you should probably filter the extra junk out of your example... > people don't want to have to wade through it to find what the issue is. > Second, you can't have a "body" tag and a "frameset" tag in the same file > (unless you include a body tag within a "noframeset" tag). I don't think > this will necessarily fix the issue you're having, but try cleaning it up > first. > > ~Philip > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript From mwarden at gmail.com Mon Jul 12 08:54:11 2010 From: mwarden at gmail.com (Matt Warden) Date: Mon, 12 Jul 2010 09:54:11 -0400 Subject: [Javascript] Differences with event handlers In-Reply-To: References: Message-ID: On Mon, Jul 12, 2010 at 9:50 AM, Terry Riegel wrote: > Hello All, > > I have an issue with event handlers and am not sure how to resolve it... > > I can handle a click event for an anchor one of two ways... > > > 1. anchorObj.addEventListener( 'click', fn, false ); // or attachEvent > > or > > 2. anchorObj.onclick=fn; > > > With the second method I can "return false;" from fn and it stops the browser from doing the normal thing, but with the addEventListener it still sends the anchor. > > What is the best way to get the first method to work like the second one. > > Thanks, Cancel the event and its bubbling up the DOM. http://www.quirksmode.org/js/events_order.html -- Matt Warden Cincinnati, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From peter at brunone.com Mon Jul 12 09:27:20 2010 From: peter at brunone.com (Peter Brunone) Date: Mon, 12 Jul 2010 07:27:20 -0700 Subject: [Javascript] Differences with event handlers Message-ID: <7b5ada1$9cf7d07$1b749bda$@com> Do you have to use an anchor at all? Why not just a div or button? That way there's no default behavior that you have to cancel... or are you trying to plan for js-less clients? ---------------------------------------- From: "Terry Riegel" Sent: Monday, July 12, 2010 8:51 AM To: "JavaScript List" Subject: [Javascript] Differences with event handlers Hello All, I have an issue with event handlers and am not sure how to resolve it... I can handle a click event for an anchor one of two ways... 1. anchorObj.addEventListener( 'click', fn, false ); // or attachEvent or 2. anchorObj.onclick=fn; With the second method I can "return false;" from fn and it stops the browser from doing the normal thing, but with the addEventListener it still sends the anchor. What is the best way to get the first method to work like the second one. Thanks, Terry From riegel at clearimageonline.com Mon Jul 12 12:57:36 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Mon, 12 Jul 2010 13:57:36 -0400 Subject: [Javascript] Differences with event handlers In-Reply-To: <7b5ada1$9cf7d07$1b749bda$@com> References: <7b5ada1$9cf7d07$1b749bda$@com> Message-ID: Peter, I am planning for a degraded experience, yes. Matt, David, Thanks for the advise I will work on implementation. Terry On Jul 12, 2010, at 10:27 AM, Peter Brunone wrote: > Do you have to use an anchor at all? Why not just a div or button? That > way there's no default behavior that you have to cancel... or are you > trying to plan for js-less clients? > > ---------------------------------------- > From: "Terry Riegel" > Sent: Monday, July 12, 2010 8:51 AM > To: "JavaScript List" > Subject: [Javascript] Differences with event handlers > > Hello All, > > I have an issue with event handlers and am not sure how to resolve it... > > I can handle a click event for an anchor one of two ways... > > 1. anchorObj.addEventListener( 'click', fn, false ); // or attachEvent > > or > > 2. anchorObj.onclick=fn; > > With the second method I can "return false;" from fn and it stops the > browser from doing the normal thing, but with the addEventListener it still > sends the anchor. > > What is the best way to get the first method to work like the second one. > > Thanks, > > Terry > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From peter at brunone.com Mon Jul 12 13:23:58 2010 From: peter at brunone.com (Peter Brunone) Date: Mon, 12 Jul 2010 11:23:58 -0700 Subject: [Javascript] Differences with event handlers Message-ID: Nothing like getting ready for disappointment :) ---------------------------------------- From: "Terry Riegel" Sent: Monday, July 12, 2010 12:58 PM To: "JavaScript List" Subject: Re: [Javascript] Differences with event handlers Peter, I am planning for a degraded experience, yes. Matt, David, Thanks for the advise I will work on implementation. Terry On Jul 12, 2010, at 10:27 AM, Peter Brunone wrote: > Do you have to use an anchor at all? Why not just a div or button? That > way there's no default behavior that you have to cancel... or are you > trying to plan for js-less clients? > > ---------------------------------------- > From: "Terry Riegel" > Sent: Monday, July 12, 2010 8:51 AM > To: "JavaScript List" > Subject: [Javascript] Differences with event handlers > > Hello All, > > I have an issue with event handlers and am not sure how to resolve it... > > I can handle a click event for an anchor one of two ways... > > 1. anchorObj.addEventListener( 'click', fn, false ); // or attachEvent > > or > > 2. anchorObj.onclick=fn; > > With the second method I can "return false;" from fn and it stops the > browser from doing the normal thing, but with the addEventListener it still > sends the anchor. > > What is the best way to get the first method to work like the second one. > > Thanks, > > Terry > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript From riegel at clearimageonline.com Mon Jul 12 15:41:50 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Mon, 12 Jul 2010 16:41:50 -0400 Subject: [Javascript] Differences with event handlers In-Reply-To: References: Message-ID: <414717E7-B76F-44A1-9B99-EE2DF7B71E30@clearimageonline.com> Thanks all for the hints. I not exactly clear about how this all works, but I have a "better" understanding. Here is my working example to demonstrate what I was trying to do. I have paired it way back just to illustrate what I was attempting to do. It is all part of a bigger picture at clearjs.org But here is the URL that demonstrates how I was able to stop propagation... http://clearjs.org/apps/clear/stoppropagation.html I was able to test it on FF, Safari, Chrome, and IE6,7,and 8. Thanks again for the pointers, Terry Riegel On Jul 12, 2010, at 2:23 PM, Peter Brunone wrote: > Nothing like getting ready for disappointment :) > > ---------------------------------------- > From: "Terry Riegel" > Sent: Monday, July 12, 2010 12:58 PM > To: "JavaScript List" > Subject: Re: [Javascript] Differences with event handlers > > Peter, > > I am planning for a degraded experience, yes. > > Matt, David, > > Thanks for the advise I will work on implementation. > > Terry > > On Jul 12, 2010, at 10:27 AM, Peter Brunone wrote: > >> Do you have to use an anchor at all? Why not just a div or button? That >> way there's no default behavior that you have to cancel... or are you >> trying to plan for js-less clients? >> >> ---------------------------------------- >> From: "Terry Riegel" >> Sent: Monday, July 12, 2010 8:51 AM >> To: "JavaScript List" >> Subject: [Javascript] Differences with event handlers >> >> Hello All, >> >> I have an issue with event handlers and am not sure how to resolve it... >> >> I can handle a click event for an anchor one of two ways... >> >> 1. anchorObj.addEventListener( 'click', fn, false ); // or attachEvent >> >> or >> >> 2. anchorObj.onclick=fn; >> >> With the second method I can "return false;" from fn and it stops the >> browser from doing the normal thing, but with the addEventListener it > still >> sends the anchor. >> >> What is the best way to get the first method to work like the second > one. >> >> Thanks, >> >> Terry >> _______________________________________________ >> Javascript mailing list >> Javascript at lists.evolt.org >> http://lists.evolt.org/mailman/listinfo/javascript > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From vivekjoshi07 at gmail.com Wed Jul 14 04:27:53 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Wed, 14 Jul 2010 14:57:53 +0530 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: <000301cb21c9$891e5280$9b5af780$@com> References: <000301cb21c9$891e5280$9b5af780$@com> Message-ID: can any one please help me ,for this matter , till now it is not solved On Mon, Jul 12, 2010 at 7:22 PM, David Lovering wrote: > >From what I've seen, Firefox is a lot tighter about grammar violations > (i.e; > mixing frameset and body declarations) in the same .html object. Maybe > that's why your code is dying outside IE. > > Break it down into the details, such as importing a PDF into a .div and > then > trying to print it. There are a number of examples out there that > demonstrate this method, and the ones I've used seem to port well across > platforms. > > Really, mixing Framesets and body entities is a violation of the DOM > structure (unless as noted earlier you wrap the body in a noframeset > pairing, which effectively neuters the body block). By "cleaning up" the > previous author almost certainly meant "make DOM-compliant". Your code > (even reduced) doesn't go through my syntax parser without throwing flags. > > -- David Lovering > > -----Original Message----- > From: javascript-bounces at lists.evolt.org > [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek joshi > Sent: Monday, July 12, 2010 7:41 AM > To: JavaScript List > Subject: Re: [Javascript] problem to print embdad pdf which is in object > tag > in Fire fox > > > > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > > On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson > wrote: > > > On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > > > > > Hi All > > > > > > can any one please help me. i am not able to print embaded pdf in > > > FireFox ,the same code is working fine in IE ,the code is given below > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > > > > > > > > > > > > > > > > > > > First, you should probably filter the extra junk out of your example... > > people don't want to have to wade through it to find what the issue is. > > Second, you can't have a "body" tag and a "frameset" tag in the same file > > (unless you include a body tag within a "noframeset" tag). I don't think > > this will necessarily fix the issue you're having, but try cleaning it up > > first. > > > > ~Philip > > _______________________________________________ > > Javascript mailing list > > Javascript at lists.evolt.org > > http://lists.evolt.org/mailman/listinfo/javascript > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From riegel at clearimageonline.com Wed Jul 14 05:08:37 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Wed, 14 Jul 2010 06:08:37 -0400 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: <000301cb21c9$891e5280$9b5af780$@com> Message-ID: <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> Sure, what does your code look like after employing David and Phillip's suggestions? Terry On Jul 14, 2010, at 5:27 AM, vivek joshi wrote: > can any one please help me ,for this matter , till now it is not solved > > > > > On Mon, Jul 12, 2010 at 7:22 PM, David Lovering wrote: > >>> From what I've seen, Firefox is a lot tighter about grammar violations >> (i.e; >> mixing frameset and body declarations) in the same .html object. Maybe >> that's why your code is dying outside IE. >> >> Break it down into the details, such as importing a PDF into a .div and >> then >> trying to print it. There are a number of examples out there that >> demonstrate this method, and the ones I've used seem to port well across >> platforms. >> >> Really, mixing Framesets and body entities is a violation of the DOM >> structure (unless as noted earlier you wrap the body in a noframeset >> pairing, which effectively neuters the body block). By "cleaning up" the >> previous author almost certainly meant "make DOM-compliant". Your code >> (even reduced) doesn't go through my syntax parser without throwing flags. >> >> -- David Lovering >> >> -----Original Message----- >> From: javascript-bounces at lists.evolt.org >> [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek joshi >> Sent: Monday, July 12, 2010 7:41 AM >> To: JavaScript List >> Subject: Re: [Javascript] problem to print embdad pdf which is in object >> tag >> in Fire fox >> >> >> >> >> >> >> >> >> >> >> > type="application/pdf" width="500" height="500"> >> >> >> >> >> >> >> On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson >> wrote: >> >>> On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: >>> >>>> Hi All >>>> >>>> can any one please help me. i am not able to print embaded pdf in >>>> FireFox ,the same code is working fine in IE ,the code is given below >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> type="application/pdf" width="500" height="500"> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> First, you should probably filter the extra junk out of your example... >>> people don't want to have to wade through it to find what the issue is. >>> Second, you can't have a "body" tag and a "frameset" tag in the same file >>> (unless you include a body tag within a "noframeset" tag). I don't think >>> this will necessarily fix the issue you're having, but try cleaning it up >>> first. >>> >>> ~Philip >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at lists.evolt.org >>> http://lists.evolt.org/mailman/listinfo/javascript >>> >> _______________________________________________ >> Javascript mailing list >> Javascript at lists.evolt.org >> http://lists.evolt.org/mailman/listinfo/javascript >> >> _______________________________________________ >> Javascript mailing list >> Javascript at lists.evolt.org >> http://lists.evolt.org/mailman/listinfo/javascript >> > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From vivekjoshi07 at gmail.com Wed Jul 14 05:15:51 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Wed, 14 Jul 2010 15:45:51 +0530 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> Message-ID: Hi terry i am not much stronger in javascript ,but i have remove the body tag from the code ,the code is not working fine . and I tried it with div tag also I am not able to do it i,if you have some code then can you send me please On Wed, Jul 14, 2010 at 3:38 PM, Terry Riegel wrote: > Sure, what does your code look like after employing David and Phillip's > suggestions? > > Terry > > > > On Jul 14, 2010, at 5:27 AM, vivek joshi wrote: > > > can any one please help me ,for this matter , till now it is not solved > > > > > > > > > > On Mon, Jul 12, 2010 at 7:22 PM, David Lovering > wrote: > > > >>> From what I've seen, Firefox is a lot tighter about grammar violations > >> (i.e; > >> mixing frameset and body declarations) in the same .html object. Maybe > >> that's why your code is dying outside IE. > >> > >> Break it down into the details, such as importing a PDF into a .div and > >> then > >> trying to print it. There are a number of examples out there that > >> demonstrate this method, and the ones I've used seem to port well across > >> platforms. > >> > >> Really, mixing Framesets and body entities is a violation of the DOM > >> structure (unless as noted earlier you wrap the body in a noframeset > >> pairing, which effectively neuters the body block). By "cleaning up" > the > >> previous author almost certainly meant "make DOM-compliant". Your code > >> (even reduced) doesn't go through my syntax parser without throwing > flags. > >> > >> -- David Lovering > >> > >> -----Original Message----- > >> From: javascript-bounces at lists.evolt.org > >> [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek joshi > >> Sent: Monday, July 12, 2010 7:41 AM > >> To: JavaScript List > >> Subject: Re: [Javascript] problem to print embdad pdf which is in object > >> tag > >> in Fire fox > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> >> type="application/pdf" width="500" height="500"> > >> > >> > >> > >> > >> > >> > >> On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson > >> wrote: > >> > >>> On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > >>> > >>>> Hi All > >>>> > >>>> can any one please help me. i am not able to print embaded pdf in > >>>> FireFox ,the same code is working fine in IE ,the code is given below > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> >>>> type="application/pdf" width="500" height="500"> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>> First, you should probably filter the extra junk out of your example... > >>> people don't want to have to wade through it to find what the issue is. > >>> Second, you can't have a "body" tag and a "frameset" tag in the same > file > >>> (unless you include a body tag within a "noframeset" tag). I don't > think > >>> this will necessarily fix the issue you're having, but try cleaning it > up > >>> first. > >>> > >>> ~Philip > >>> _______________________________________________ > >>> Javascript mailing list > >>> Javascript at lists.evolt.org > >>> http://lists.evolt.org/mailman/listinfo/javascript > >>> > >> _______________________________________________ > >> Javascript mailing list > >> Javascript at lists.evolt.org > >> http://lists.evolt.org/mailman/listinfo/javascript > >> > >> _______________________________________________ > >> Javascript mailing list > >> Javascript at lists.evolt.org > >> http://lists.evolt.org/mailman/listinfo/javascript > >> > > _______________________________________________ > > Javascript mailing list > > Javascript at lists.evolt.org > > http://lists.evolt.org/mailman/listinfo/javascript > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From riegel at clearimageonline.com Wed Jul 14 08:22:51 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Wed, 14 Jul 2010 09:22:51 -0400 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> Message-ID: Vivek, I believe the print() method is only available to the global object window, and to the object document. So in your example it looks like you are trying to print a pdf. Assuming that is what you are attempting to do then I would suggest creating a simple html document with an iframe in it. Something like... I tested the code above and it seems to work fine with Firefox assuming Firefox knows how to deal with pdf files. In other words is Firefox doesn't have a plugin to display pdf's inline then it will simply download the pdf. I would avoid the object tag unless you have a good reason to use it. The iframe is basically a way to get another browser window in your existing document. This would seem to provide the most consistent experience to your users. That should get you started. Terry On Jul 14, 2010, at 6:15 AM, vivek joshi wrote: > Hi terry i am not much stronger in javascript ,but i have remove the body > tag from the code ,the code is not working fine . and I tried it with div > tag also I am not able to do it i,if you have some code then can you send me > please > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > > > > On Wed, Jul 14, 2010 at 3:38 PM, Terry Riegel > wrote: > >> Sure, what does your code look like after employing David and Phillip's >> suggestions? >> >> Terry >> >> >> >> On Jul 14, 2010, at 5:27 AM, vivek joshi wrote: >> >>> can any one please help me ,for this matter , till now it is not solved >>> >>> >>> >>> >>> On Mon, Jul 12, 2010 at 7:22 PM, David Lovering >> wrote: >>> >>>>> From what I've seen, Firefox is a lot tighter about grammar violations >>>> (i.e; >>>> mixing frameset and body declarations) in the same .html object. Maybe >>>> that's why your code is dying outside IE. >>>> >>>> Break it down into the details, such as importing a PDF into a .div and >>>> then >>>> trying to print it. There are a number of examples out there that >>>> demonstrate this method, and the ones I've used seem to port well across >>>> platforms. >>>> >>>> Really, mixing Framesets and body entities is a violation of the DOM >>>> structure (unless as noted earlier you wrap the body in a noframeset >>>> pairing, which effectively neuters the body block). By "cleaning up" >> the >>>> previous author almost certainly meant "make DOM-compliant". Your code >>>> (even reduced) doesn't go through my syntax parser without throwing >> flags. >>>> >>>> -- David Lovering >>>> >>>> -----Original Message----- >>>> From: javascript-bounces at lists.evolt.org >>>> [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek joshi >>>> Sent: Monday, July 12, 2010 7:41 AM >>>> To: JavaScript List >>>> Subject: Re: [Javascript] problem to print embdad pdf which is in object >>>> tag >>>> in Fire fox >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> type="application/pdf" width="500" height="500"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson >>>> wrote: >>>> >>>>> On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: >>>>> >>>>>> Hi All >>>>>> >>>>>> can any one please help me. i am not able to print embaded pdf in >>>>>> FireFox ,the same code is working fine in IE ,the code is given below >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> type="application/pdf" width="500" height="500"> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> First, you should probably filter the extra junk out of your example... >>>>> people don't want to have to wade through it to find what the issue is. >>>>> Second, you can't have a "body" tag and a "frameset" tag in the same >> file >>>>> (unless you include a body tag within a "noframeset" tag). I don't >> think >>>>> this will necessarily fix the issue you're having, but try cleaning it >> up >>>>> first. >>>>> >>>>> ~Philip >>>>> _______________________________________________ >>>>> Javascript mailing list >>>>> Javascript at lists.evolt.org >>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>> >>>> _______________________________________________ >>>> Javascript mailing list >>>> Javascript at lists.evolt.org >>>> http://lists.evolt.org/mailman/listinfo/javascript >>>> >>>> _______________________________________________ >>>> Javascript mailing list >>>> Javascript at lists.evolt.org >>>> http://lists.evolt.org/mailman/listinfo/javascript >>>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at lists.evolt.org >>> http://lists.evolt.org/mailman/listinfo/javascript >> _______________________________________________ >> Javascript mailing list >> Javascript at lists.evolt.org >> http://lists.evolt.org/mailman/listinfo/javascript >> > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From vivekjoshi07 at gmail.com Wed Jul 14 08:32:50 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Wed, 14 Jul 2010 19:02:50 +0530 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> Message-ID: Thanks for the solution ,but it is not working fine in IE ,In IE it shows Window print box rather PDF print box On Wed, Jul 14, 2010 at 6:52 PM, Terry Riegel wrote: > Vivek, > > I believe the print() method is only available to the global object window, > and to the object document. > > So in your example it looks like you are trying to print a pdf. Assuming > that is what you are attempting to do then I would suggest creating a simple > html document with an iframe in it. Something like... > > > > > > > > > > > > I tested the code above and it seems to work fine with Firefox assuming > Firefox knows how to deal with pdf files. In other words is Firefox doesn't > have a plugin to display pdf's inline then it will simply download the pdf. > > I would avoid the object tag unless you have a good reason to use it. The > iframe is basically a way to get another browser window in your existing > document. This would seem to provide the most consistent experience to your > users. > > That should get you started. > > Terry > > > > On Jul 14, 2010, at 6:15 AM, vivek joshi wrote: > > > Hi terry i am not much stronger in javascript ,but i have remove the body > > tag from the code ,the code is not working fine . and I tried it with > div > > tag also I am not able to do it i,if you have some code then can you send > me > > please > > > > > > > > > > > > > > > > > type="application/pdf" width="500" height="500"> > > > > > > > > > > > > > > > > > > On Wed, Jul 14, 2010 at 3:38 PM, Terry Riegel > > wrote: > > > >> Sure, what does your code look like after employing David and Phillip's > >> suggestions? > >> > >> Terry > >> > >> > >> > >> On Jul 14, 2010, at 5:27 AM, vivek joshi > wrote: > >> > >>> can any one please help me ,for this matter , till now it is not > solved > >>> > >>> > >>> > >>> > >>> On Mon, Jul 12, 2010 at 7:22 PM, David Lovering > >> wrote: > >>> > >>>>> From what I've seen, Firefox is a lot tighter about grammar > violations > >>>> (i.e; > >>>> mixing frameset and body declarations) in the same .html object. > Maybe > >>>> that's why your code is dying outside IE. > >>>> > >>>> Break it down into the details, such as importing a PDF into a .div > and > >>>> then > >>>> trying to print it. There are a number of examples out there that > >>>> demonstrate this method, and the ones I've used seem to port well > across > >>>> platforms. > >>>> > >>>> Really, mixing Framesets and body entities is a violation of the DOM > >>>> structure (unless as noted earlier you wrap the body in a noframeset > >>>> pairing, which effectively neuters the body block). By "cleaning up" > >> the > >>>> previous author almost certainly meant "make DOM-compliant". Your > code > >>>> (even reduced) doesn't go through my syntax parser without throwing > >> flags. > >>>> > >>>> -- David Lovering > >>>> > >>>> -----Original Message----- > >>>> From: javascript-bounces at lists.evolt.org > >>>> [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek joshi > >>>> Sent: Monday, July 12, 2010 7:41 AM > >>>> To: JavaScript List > >>>> Subject: Re: [Javascript] problem to print embdad pdf which is in > object > >>>> tag > >>>> in Fire fox > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> >>>> type="application/pdf" width="500" height="500"> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson > >>>> wrote: > >>>> > >>>>> On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > >>>>> > >>>>>> Hi All > >>>>>> > >>>>>> can any one please help me. i am not able to print embaded pdf in > >>>>>> FireFox ,the same code is working fine in IE ,the code is given > below > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> >>>>>> type="application/pdf" width="500" height="500"> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>> > >>>>> > >>>>> First, you should probably filter the extra junk out of your > example... > >>>>> people don't want to have to wade through it to find what the issue > is. > >>>>> Second, you can't have a "body" tag and a "frameset" tag in the same > >> file > >>>>> (unless you include a body tag within a "noframeset" tag). I don't > >> think > >>>>> this will necessarily fix the issue you're having, but try cleaning > it > >> up > >>>>> first. > >>>>> > >>>>> ~Philip > >>>>> _______________________________________________ > >>>>> Javascript mailing list > >>>>> Javascript at lists.evolt.org > >>>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>>> > >>>> _______________________________________________ > >>>> Javascript mailing list > >>>> Javascript at lists.evolt.org > >>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>> > >>>> _______________________________________________ > >>>> Javascript mailing list > >>>> Javascript at lists.evolt.org > >>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>> > >>> _______________________________________________ > >>> Javascript mailing list > >>> Javascript at lists.evolt.org > >>> http://lists.evolt.org/mailman/listinfo/javascript > >> _______________________________________________ > >> Javascript mailing list > >> Javascript at lists.evolt.org > >> http://lists.evolt.org/mailman/listinfo/javascript > >> > > _______________________________________________ > > Javascript mailing list > > Javascript at lists.evolt.org > > http://lists.evolt.org/mailman/listinfo/javascript > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From riegel at clearimageonline.com Wed Jul 14 08:42:59 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Wed, 14 Jul 2010 09:42:59 -0400 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> Message-ID: <88009696-110F-4D22-94A2-3E94BF035787@clearimageonline.com> I am sorry I don't know what a window print box is. I also do not know what a PDF print box is. Terry On Jul 14, 2010, at 9:32 AM, vivek joshi wrote: > Thanks for the solution ,but it is not working fine in IE ,In IE it shows > Window print box rather PDF print box > > > On Wed, Jul 14, 2010 at 6:52 PM, Terry Riegel > wrote: > >> Vivek, >> >> I believe the print() method is only available to the global object window, >> and to the object document. >> >> So in your example it looks like you are trying to print a pdf. Assuming >> that is what you are attempting to do then I would suggest creating a simple >> html document with an iframe in it. Something like... >> >> >> >> >> >> >> >> >> >> >> >> I tested the code above and it seems to work fine with Firefox assuming >> Firefox knows how to deal with pdf files. In other words is Firefox doesn't >> have a plugin to display pdf's inline then it will simply download the pdf. >> >> I would avoid the object tag unless you have a good reason to use it. The >> iframe is basically a way to get another browser window in your existing >> document. This would seem to provide the most consistent experience to your >> users. >> >> That should get you started. >> >> Terry >> >> >> >> On Jul 14, 2010, at 6:15 AM, vivek joshi wrote: >> >>> Hi terry i am not much stronger in javascript ,but i have remove the body >>> tag from the code ,the code is not working fine . and I tried it with >> div >>> tag also I am not able to do it i,if you have some code then can you send >> me >>> please >>> >>> >>> >>> >>> >>> >>> >>> >> type="application/pdf" width="500" height="500"> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Wed, Jul 14, 2010 at 3:38 PM, Terry Riegel >>> wrote: >>> >>>> Sure, what does your code look like after employing David and Phillip's >>>> suggestions? >>>> >>>> Terry >>>> >>>> >>>> >>>> On Jul 14, 2010, at 5:27 AM, vivek joshi >> wrote: >>>> >>>>> can any one please help me ,for this matter , till now it is not >> solved >>>>> >>>>> >>>>> >>>>> >>>>> On Mon, Jul 12, 2010 at 7:22 PM, David Lovering >>>> wrote: >>>>> >>>>>>> From what I've seen, Firefox is a lot tighter about grammar >> violations >>>>>> (i.e; >>>>>> mixing frameset and body declarations) in the same .html object. >> Maybe >>>>>> that's why your code is dying outside IE. >>>>>> >>>>>> Break it down into the details, such as importing a PDF into a .div >> and >>>>>> then >>>>>> trying to print it. There are a number of examples out there that >>>>>> demonstrate this method, and the ones I've used seem to port well >> across >>>>>> platforms. >>>>>> >>>>>> Really, mixing Framesets and body entities is a violation of the DOM >>>>>> structure (unless as noted earlier you wrap the body in a noframeset >>>>>> pairing, which effectively neuters the body block). By "cleaning up" >>>> the >>>>>> previous author almost certainly meant "make DOM-compliant". Your >> code >>>>>> (even reduced) doesn't go through my syntax parser without throwing >>>> flags. >>>>>> >>>>>> -- David Lovering >>>>>> >>>>>> -----Original Message----- >>>>>> From: javascript-bounces at lists.evolt.org >>>>>> [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek joshi >>>>>> Sent: Monday, July 12, 2010 7:41 AM >>>>>> To: JavaScript List >>>>>> Subject: Re: [Javascript] problem to print embdad pdf which is in >> object >>>>>> tag >>>>>> in Fire fox >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> type="application/pdf" width="500" height="500"> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson >>>>>> wrote: >>>>>> >>>>>>> On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: >>>>>>> >>>>>>>> Hi All >>>>>>>> >>>>>>>> can any one please help me. i am not able to print embaded pdf in >>>>>>>> FireFox ,the same code is working fine in IE ,the code is given >> below >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> type="application/pdf" width="500" height="500"> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> First, you should probably filter the extra junk out of your >> example... >>>>>>> people don't want to have to wade through it to find what the issue >> is. >>>>>>> Second, you can't have a "body" tag and a "frameset" tag in the same >>>> file >>>>>>> (unless you include a body tag within a "noframeset" tag). I don't >>>> think >>>>>>> this will necessarily fix the issue you're having, but try cleaning >> it >>>> up >>>>>>> first. >>>>>>> >>>>>>> ~Philip >>>>>>> _______________________________________________ >>>>>>> Javascript mailing list >>>>>>> Javascript at lists.evolt.org >>>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>>> >>>>>> _______________________________________________ >>>>>> Javascript mailing list >>>>>> Javascript at lists.evolt.org >>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>> >>>>>> _______________________________________________ >>>>>> Javascript mailing list >>>>>> Javascript at lists.evolt.org >>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>> >>>>> _______________________________________________ >>>>> Javascript mailing list >>>>> Javascript at lists.evolt.org >>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>> _______________________________________________ >>>> Javascript mailing list >>>> Javascript at lists.evolt.org >>>> http://lists.evolt.org/mailman/listinfo/javascript >>>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at lists.evolt.org >>> http://lists.evolt.org/mailman/listinfo/javascript >> >> _______________________________________________ >> Javascript mailing list >> Javascript at lists.evolt.org >> http://lists.evolt.org/mailman/listinfo/javascript >> > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From vivekjoshi07 at gmail.com Wed Jul 14 08:46:34 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Wed, 14 Jul 2010 19:16:34 +0530 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: <88009696-110F-4D22-94A2-3E94BF035787@clearimageonline.com> References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> <88009696-110F-4D22-94A2-3E94BF035787@clearimageonline.com> Message-ID: you just try to the same code ,run it on IE ,this show the normal print box,but same if you try in Firefox the pdf print box show On Wed, Jul 14, 2010 at 7:12 PM, Terry Riegel wrote: > I am sorry I don't know what a window print box is. I also do not know what > a PDF print box is. > > Terry > > > > On Jul 14, 2010, at 9:32 AM, vivek joshi wrote: > > > Thanks for the solution ,but it is not working fine in IE ,In IE it shows > > Window print box rather PDF print box > > > > > > On Wed, Jul 14, 2010 at 6:52 PM, Terry Riegel > > wrote: > > > >> Vivek, > >> > >> I believe the print() method is only available to the global object > window, > >> and to the object document. > >> > >> So in your example it looks like you are trying to print a pdf. Assuming > >> that is what you are attempting to do then I would suggest creating a > simple > >> html document with an iframe in it. Something like... > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> I tested the code above and it seems to work fine with Firefox assuming > >> Firefox knows how to deal with pdf files. In other words is Firefox > doesn't > >> have a plugin to display pdf's inline then it will simply download the > pdf. > >> > >> I would avoid the object tag unless you have a good reason to use it. > The > >> iframe is basically a way to get another browser window in your existing > >> document. This would seem to provide the most consistent experience to > your > >> users. > >> > >> That should get you started. > >> > >> Terry > >> > >> > >> > >> On Jul 14, 2010, at 6:15 AM, vivek joshi wrote: > >> > >>> Hi terry i am not much stronger in javascript ,but i have remove the > body > >>> tag from the code ,the code is not working fine . and I tried it with > >> div > >>> tag also I am not able to do it i,if you have some code then can you > send > >> me > >>> please > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> >>> type="application/pdf" width="500" height="500"> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> On Wed, Jul 14, 2010 at 3:38 PM, Terry Riegel > >>> wrote: > >>> > >>>> Sure, what does your code look like after employing David and > Phillip's > >>>> suggestions? > >>>> > >>>> Terry > >>>> > >>>> > >>>> > >>>> On Jul 14, 2010, at 5:27 AM, vivek joshi > >> wrote: > >>>> > >>>>> can any one please help me ,for this matter , till now it is not > >> solved > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> On Mon, Jul 12, 2010 at 7:22 PM, David Lovering > > >>>> wrote: > >>>>> > >>>>>>> From what I've seen, Firefox is a lot tighter about grammar > >> violations > >>>>>> (i.e; > >>>>>> mixing frameset and body declarations) in the same .html object. > >> Maybe > >>>>>> that's why your code is dying outside IE. > >>>>>> > >>>>>> Break it down into the details, such as importing a PDF into a .div > >> and > >>>>>> then > >>>>>> trying to print it. There are a number of examples out there that > >>>>>> demonstrate this method, and the ones I've used seem to port well > >> across > >>>>>> platforms. > >>>>>> > >>>>>> Really, mixing Framesets and body entities is a violation of the DOM > >>>>>> structure (unless as noted earlier you wrap the body in a noframeset > >>>>>> pairing, which effectively neuters the body block). By "cleaning > up" > >>>> the > >>>>>> previous author almost certainly meant "make DOM-compliant". Your > >> code > >>>>>> (even reduced) doesn't go through my syntax parser without throwing > >>>> flags. > >>>>>> > >>>>>> -- David Lovering > >>>>>> > >>>>>> -----Original Message----- > >>>>>> From: javascript-bounces at lists.evolt.org > >>>>>> [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek > joshi > >>>>>> Sent: Monday, July 12, 2010 7:41 AM > >>>>>> To: JavaScript List > >>>>>> Subject: Re: [Javascript] problem to print embdad pdf which is in > >> object > >>>>>> tag > >>>>>> in Fire fox > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> >>>>>> type="application/pdf" width="500" height="500"> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson > >>>>>> wrote: > >>>>>> > >>>>>>> On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: > >>>>>>> > >>>>>>>> Hi All > >>>>>>>> > >>>>>>>> can any one please help me. i am not able to print embaded pdf in > >>>>>>>> FireFox ,the same code is working fine in IE ,the code is given > >> below > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> >>>>>>>> type="application/pdf" width="500" height="500"> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> First, you should probably filter the extra junk out of your > >> example... > >>>>>>> people don't want to have to wade through it to find what the issue > >> is. > >>>>>>> Second, you can't have a "body" tag and a "frameset" tag in the > same > >>>> file > >>>>>>> (unless you include a body tag within a "noframeset" tag). I don't > >>>> think > >>>>>>> this will necessarily fix the issue you're having, but try cleaning > >> it > >>>> up > >>>>>>> first. > >>>>>>> > >>>>>>> ~Philip > >>>>>>> _______________________________________________ > >>>>>>> Javascript mailing list > >>>>>>> Javascript at lists.evolt.org > >>>>>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>>>>> > >>>>>> _______________________________________________ > >>>>>> Javascript mailing list > >>>>>> Javascript at lists.evolt.org > >>>>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>>>> > >>>>>> _______________________________________________ > >>>>>> Javascript mailing list > >>>>>> Javascript at lists.evolt.org > >>>>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>>>> > >>>>> _______________________________________________ > >>>>> Javascript mailing list > >>>>> Javascript at lists.evolt.org > >>>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>> _______________________________________________ > >>>> Javascript mailing list > >>>> Javascript at lists.evolt.org > >>>> http://lists.evolt.org/mailman/listinfo/javascript > >>>> > >>> _______________________________________________ > >>> Javascript mailing list > >>> Javascript at lists.evolt.org > >>> http://lists.evolt.org/mailman/listinfo/javascript > >> > >> _______________________________________________ > >> Javascript mailing list > >> Javascript at lists.evolt.org > >> http://lists.evolt.org/mailman/listinfo/javascript > >> > > _______________________________________________ > > Javascript mailing list > > Javascript at lists.evolt.org > > http://lists.evolt.org/mailman/listinfo/javascript > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From riegel at clearimageonline.com Wed Jul 14 09:01:50 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Wed, 14 Jul 2010 10:01:50 -0400 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> <88009696-110F-4D22-94A2-3E94BF035787@clearimageonline.com> Message-ID: <2C44EB3A-0F7F-4DB3-B685-7D03F0A67421@clearimageonline.com> Vivek, On my copy of IE it downloads the PDF as I do not have any plug ins installed to handle pdf files. Perhaps this challenge is a bit much for your level of expertise. I would suggest that you do some reading on how browsers handle non-HTML content. What you are asking for is to have all the browsers handle non-html content the same way. I am not sure this is possible. I can appreciate that you would like to normalize the user experience as much as you can across browsers. Generally if a web browser can't display a particular type of content then it relies on some sort of plug-in architecture to do the display of that content, it would also rely on said plug-in architecture to print that content. So I think you need to clarify your expectations, but I think you need to understand how the browsers you are working with (including IE) handle content that it is/was not designed to handle. In you particular case you are asking the web browser to handle PDF content which is not something web browsers do. It would seem you are assuming that all users visiting your site have a particular plug in from a particular vendor for a particular purpose. If that is the case then that needs to be stated in your specification. Then when you ask on a forum like this there is a known baseline. Once this is known and articulated then we can provide help that is more to the point of what you need instead of what might sound like general suggestions. If on the other hand you are asking someone on the list to write the code for you then perhaps someone might offer to do that but I kind of doubt that is going to happen. I hope you find this list helpful and a great resource as I have. I know it is frustrating when you have a particular problem that you just want a solution for and the only responses you get seem to be vague and unhelpful. As someone that has been there done that I can tell you that the responses you have received will help you get to the solution you are after but it will require some googling and reading on your part to get there. Terry On Jul 14, 2010, at 9:46 AM, vivek joshi wrote: > you just try to the same code ,run it on IE ,this show the normal print > box,but same if you try in Firefox the pdf print box show > > On Wed, Jul 14, 2010 at 7:12 PM, Terry Riegel > wrote: > >> I am sorry I don't know what a window print box is. I also do not know what >> a PDF print box is. >> >> Terry >> >> >> >> On Jul 14, 2010, at 9:32 AM, vivek joshi wrote: >> >>> Thanks for the solution ,but it is not working fine in IE ,In IE it shows >>> Window print box rather PDF print box >>> >>> >>> On Wed, Jul 14, 2010 at 6:52 PM, Terry Riegel >>> wrote: >>> >>>> Vivek, >>>> >>>> I believe the print() method is only available to the global object >> window, >>>> and to the object document. >>>> >>>> So in your example it looks like you are trying to print a pdf. Assuming >>>> that is what you are attempting to do then I would suggest creating a >> simple >>>> html document with an iframe in it. Something like... >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> I tested the code above and it seems to work fine with Firefox assuming >>>> Firefox knows how to deal with pdf files. In other words is Firefox >> doesn't >>>> have a plugin to display pdf's inline then it will simply download the >> pdf. >>>> >>>> I would avoid the object tag unless you have a good reason to use it. >> The >>>> iframe is basically a way to get another browser window in your existing >>>> document. This would seem to provide the most consistent experience to >> your >>>> users. >>>> >>>> That should get you started. >>>> >>>> Terry >>>> >>>> >>>> >>>> On Jul 14, 2010, at 6:15 AM, vivek joshi wrote: >>>> >>>>> Hi terry i am not much stronger in javascript ,but i have remove the >> body >>>>> tag from the code ,the code is not working fine . and I tried it with >>>> div >>>>> tag also I am not able to do it i,if you have some code then can you >> send >>>> me >>>>> please >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> type="application/pdf" width="500" height="500"> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Jul 14, 2010 at 3:38 PM, Terry Riegel >>>>> wrote: >>>>> >>>>>> Sure, what does your code look like after employing David and >> Phillip's >>>>>> suggestions? >>>>>> >>>>>> Terry >>>>>> >>>>>> >>>>>> >>>>>> On Jul 14, 2010, at 5:27 AM, vivek joshi >>>> wrote: >>>>>> >>>>>>> can any one please help me ,for this matter , till now it is not >>>> solved >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Jul 12, 2010 at 7:22 PM, David Lovering >> >>>>>> wrote: >>>>>>> >>>>>>>>> From what I've seen, Firefox is a lot tighter about grammar >>>> violations >>>>>>>> (i.e; >>>>>>>> mixing frameset and body declarations) in the same .html object. >>>> Maybe >>>>>>>> that's why your code is dying outside IE. >>>>>>>> >>>>>>>> Break it down into the details, such as importing a PDF into a .div >>>> and >>>>>>>> then >>>>>>>> trying to print it. There are a number of examples out there that >>>>>>>> demonstrate this method, and the ones I've used seem to port well >>>> across >>>>>>>> platforms. >>>>>>>> >>>>>>>> Really, mixing Framesets and body entities is a violation of the DOM >>>>>>>> structure (unless as noted earlier you wrap the body in a noframeset >>>>>>>> pairing, which effectively neuters the body block). By "cleaning >> up" >>>>>> the >>>>>>>> previous author almost certainly meant "make DOM-compliant". Your >>>> code >>>>>>>> (even reduced) doesn't go through my syntax parser without throwing >>>>>> flags. >>>>>>>> >>>>>>>> -- David Lovering >>>>>>>> >>>>>>>> -----Original Message----- >>>>>>>> From: javascript-bounces at lists.evolt.org >>>>>>>> [mailto:javascript-bounces at lists.evolt.org] On Behalf Of vivek >> joshi >>>>>>>> Sent: Monday, July 12, 2010 7:41 AM >>>>>>>> To: JavaScript List >>>>>>>> Subject: Re: [Javascript] problem to print embdad pdf which is in >>>> object >>>>>>>> tag >>>>>>>> in Fire fox >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> type="application/pdf" width="500" height="500"> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Jul 12, 2010 at 6:57 PM, Philip Thompson >>>>>>>> wrote: >>>>>>>> >>>>>>>>> On Jul 12, 2010, at 5:58 AM, vivek joshi wrote: >>>>>>>>> >>>>>>>>>> Hi All >>>>>>>>>> >>>>>>>>>> can any one please help me. i am not able to print embaded pdf in >>>>>>>>>> FireFox ,the same code is working fine in IE ,the code is given >>>> below >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> type="application/pdf" width="500" height="500"> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> First, you should probably filter the extra junk out of your >>>> example... >>>>>>>>> people don't want to have to wade through it to find what the issue >>>> is. >>>>>>>>> Second, you can't have a "body" tag and a "frameset" tag in the >> same >>>>>> file >>>>>>>>> (unless you include a body tag within a "noframeset" tag). I don't >>>>>> think >>>>>>>>> this will necessarily fix the issue you're having, but try cleaning >>>> it >>>>>> up >>>>>>>>> first. >>>>>>>>> >>>>>>>>> ~Philip >>>>>>>>> _______________________________________________ >>>>>>>>> Javascript mailing list >>>>>>>>> Javascript at lists.evolt.org >>>>>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Javascript mailing list >>>>>>>> Javascript at lists.evolt.org >>>>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Javascript mailing list >>>>>>>> Javascript at lists.evolt.org >>>>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Javascript mailing list >>>>>>> Javascript at lists.evolt.org >>>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>> _______________________________________________ >>>>>> Javascript mailing list >>>>>> Javascript at lists.evolt.org >>>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>>>> >>>>> _______________________________________________ >>>>> Javascript mailing list >>>>> Javascript at lists.evolt.org >>>>> http://lists.evolt.org/mailman/listinfo/javascript >>>> >>>> _______________________________________________ >>>> Javascript mailing list >>>> Javascript at lists.evolt.org >>>> http://lists.evolt.org/mailman/listinfo/javascript >>>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at lists.evolt.org >>> http://lists.evolt.org/mailman/listinfo/javascript >> >> _______________________________________________ >> Javascript mailing list >> Javascript at lists.evolt.org >> http://lists.evolt.org/mailman/listinfo/javascript >> > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From mdougherty at pbp.com Wed Jul 14 10:42:14 2010 From: mdougherty at pbp.com (Mike Dougherty) Date: Wed, 14 Jul 2010 10:42:14 -0500 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: <2C44EB3A-0F7F-4DB3-B685-7D03F0A67421@clearimageonline.com> References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> <88009696-110F-4D22-94A2-3E94BF035787@clearimageonline.com> <2C44EB3A-0F7F-4DB3-B685-7D03F0A67421@clearimageonline.com> Message-ID: On Wed, Jul 14, 2010 at 9:01 AM, Terry Riegel wrote: > > I hope you find this list helpful and a great resource as I have. I know it > is frustrating when you have a particular problem that you just want a > solution for and the only responses you get seem to be vague and unhelpful. > As someone that has been there done that I can tell you that the responses > you have received will help you get to the solution you are after but it > will require some googling and reading on your part to get there. > > I agree with Terry. I would take it a step farther and recommend that it should not be your concern how user agents treat non-HTML content. Consider the mythological "fold" - as in put your important content 'above the fold.' That concept applied to newspaper headlines/articles appearing where they could be read while a fresh paper was unopened on a stack. I think it is fundamentally wrong to discuss the fold on a webpage (even the terminology is silly). We can't assume 800x600 resolution (or 1024x768/etc.) We can't assume windowed/maximized browser. We can't assume toolbar heights. We can't assume font sizes even after specifically setting them. Add to these permutations of browser configuration a number of smart phone browsers, game consoles w/ web access, and media provider embedded systems. It becomes intractable to expect a page to look the same for all audiences. If we accept that fact, then the experience for non-html content should be no different. With that caveat already stated, the inevitable exception is the company intranet. If you constrain your use-case(s) to only the supported user agents in the approved configuration then you might have some hope of providing a consistent user experience (to the extent that you are ever provided consistent users). It seems IE always requires an alternate method for accomplishing a task that you've already implemented and tests well in otherwise "standard" browsers. Which version of IE are you going to support? Are you expected to provide a consistent experience across every instance of IE - all the way back to what version? You can see that it quickly gets to be too difficult to be all-inclusive. I think it is more productive to provide some reference on your FAQ/Help page that describes the configuration of browser+plugin that has been tested and is supported. A disclaimer that variation from that expectation may lead to suboptimal user experience absolves you of the need to support every permutation found in the wild. Power users accept the risks implied by their own modifications. Non-power users generally are happy to click a button to become compliant and get to the content they want. btw, I use Foxit Reader instead of Acrobat Reader. How could you attempt to predict my user experience if you didn't know about Foxit and assumed only Acrobat Reader? From riegel at clearimageonline.com Wed Jul 14 11:09:27 2010 From: riegel at clearimageonline.com (Terry Riegel) Date: Wed, 14 Jul 2010 12:09:27 -0400 Subject: [Javascript] problem to print embdad pdf which is in object tag in Fire fox In-Reply-To: References: <000301cb21c9$891e5280$9b5af780$@com> <828CAE7D-6D1F-4F7D-9BEA-51D1742FB322@clearimageonline.com> <88009696-110F-4D22-94A2-3E94BF035787@clearimageonline.com> <2C44EB3A-0F7F-4DB3-B685-7D03F0A67421@clearimageonline.com> Message-ID: <79B5D405-E828-48D9-B4B7-2A48A43965C9@clearimageonline.com> Mike, Thanks for the thoughtful response... This has sort of digressed into some of the philosophical motivations that drive each of us. So... since Mike and I have started down that path I will add my 2 cents to Mikes 2 cents :) > Consider the mythological "fold" - as in put your important content 'above > the fold.' That concept applied to newspaper headlines/articles appearing > where they could be read while a fresh paper was unopened on a stack. I > think it is fundamentally wrong to discuss the fold on a webpage (even the > terminology is silly). We can't assume 800x600 resolution (or > 1024x768/etc.) We can't assume windowed/maximized browser. We can't assume > toolbar heights. We can't assume font sizes even after specifically setting > them. Add to these permutations of browser configuration a number of smart > phone browsers, game consoles w/ web access, and media provider embedded > systems. It becomes intractable to expect a page to look the same for all > audiences. If we accept that fact, then the experience for non-html content > should be no different. Even though this list is about Javascript I would argue we can't even assume javascript unless it becomes part of our specification for usage. I would argue that in many cases it doesn't have to be. > With that caveat already stated, the inevitable exception is the company > intranet. If you constrain your use-case(s) to only the supported user > agents in the approved configuration then you might have some hope of > providing a consistent user experience (to the extent that you are ever > provided consistent users). It seems IE always requires an alternate method > for accomplishing a task that you've already implemented and tests well in > otherwise "standard" browsers. Which version of IE are you going to > support? Are you expected to provide a consistent experience across every > instance of IE - all the way back to what version? You can see that it > quickly gets to be too difficult to be all-inclusive. I think this sort of thinking is also misguided. I offer as proof IE6. Many companies decided to dictate IE6 for their internal stuff but that dictate has affected all of us as these users are locked into a browser because of corporate policy but then these same users expect to be able to use the web for other things. I think it would be better for companies to try and build intranets that follow the same rules as the web. > I think it is more productive to provide some reference on your FAQ/Help > page that describes the configuration of browser+plugin that has been tested > and is supported. A disclaimer that variation from that expectation may > lead to suboptimal user experience absolves you of the need to support every > permutation found in the wild. Power users accept the risks implied by > their own modifications. Non-power users generally are happy to click a > button to become compliant and get to the content they want. > > btw, I use Foxit Reader instead of Acrobat Reader. How could you attempt to > predict my user experience if you didn't know about Foxit and assumed only > Acrobat Reader? Mostly agreed on that point. I think disclaimers can scare users. I would suggest that our disclaimers be more mild. Instead of saying "Only works with..." perhaps we would be better to say something like "Tested with... should work with W3C compliant..." From mdougherty at pbp.com Wed Jul 14 11:36:01 2010 From: mdougherty at pbp.com (Mike Dougherty) Date: Wed, 14 Jul 2010 11:36:01 -0500 Subject: [Javascript] Design Philosophy [was: problem to print ... ] Message-ID: On Wed, Jul 14, 2010 at 11:09 AM, Terry Riegel wrote: > This has sort of digressed into some of the philosophical motivations that > drive each of us. So... since Mike and I have started down that path I will > add my 2 cents to Mikes 2 cents :) > Great, now we only need three others to have a whole dime! (*hint*, *hint* y'all) Even though this list is about Javascript I would argue we can't even assume > javascript unless it becomes part of our specification for usage. I would > argue that in many cases it doesn't have to be. > Since we added philosophy to the subject line I'd like to mention the idea of progressive enhancement here. Even before javascript behaviors are added to a page, the markup should be semantic and functional. Without a stylesheet, the content should be obvious enough that users know how to proceed. I propose that functional (yet unstyled) markup is like the doctor's skeleton slide with all the muscle and visceral slides taken away - it provides a very clear picture of what can be built. If the frame won't support the weight of the finished product, a competent designer will see that and fix it earlier rather than later. After the markup, then add the css (the cosmetics). Then we can start adding behaviors. If we are using feature and object detection (rather than browser sniffing) then enhancements can fail gracefully all the way back to the basic functional markup. Will 98% of users with modern browsers care? Not likely. Good engineering pays for itself in intangible ways. If you have the means (can afford the think-time to do proper engineering), I highly recommend it. > > [intranets] > > I think this sort of thinking is also misguided. I offer as proof IE6. Many > companies decided to dictate IE6 for their internal stuff but that dictate > has affected all of us as these users are locked into a browser because of > corporate policy but then these same users expect to be able to use the web > for other things. > > I think it would be better for companies to try and build intranets that > follow the same rules as the web. > emphatically seconded. Our intranet was specifically designed for IE6. Thanks to a non-standard box model the intranet applications are unusable in what is now the company-supported browser (Firefox). So IE is required for using our intranet despite the security issued that prompted a company-side switch to Firefox. I'll never allow that kind of mistake to be made again. > > [disclaimers / FAQ] > > Mostly agreed on that point. I think disclaimers can scare users. I would > suggest that our disclaimers be more mild. Instead of saying "Only works > with..." perhaps we would be better to say something like "Tested with... > should work with W3C compliant..." > True. "Only works with..." has the added misfeature of sounding like the developer was too lazy to test a more exhaustive list. A notice about intended user experience may be one of the more carefully crafted copy on the site. :) From vivekjoshi07 at gmail.com Fri Jul 23 01:49:26 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Fri, 23 Jul 2010 12:19:26 +0530 Subject: [Javascript] disable right click in embdad pdf in browser Message-ID: Hi all i want to disable right click in embdad pdf in browser ,can any one please help me , till now what ever script I found this only work on simple html page but not on the page in which pdf is embdad From philthathril at gmail.com Fri Jul 23 09:48:28 2010 From: philthathril at gmail.com (Philip Thompson) Date: Fri, 23 Jul 2010 09:48:28 -0500 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: References: Message-ID: To my knowledge, not possible because the "embedded" PDF is viewed through a plugin (most likely Adobe) in the browser, and you don't have access to features of that plugin. Maybe you can address the issue you're having from a different angle. What's your ultimate goal? ~Philip On Jul 23, 2010, at 1:49 AM, vivek joshi wrote: > Hi all > > i want to disable right click in embdad pdf in browser ,can any one please > help me , till now what ever script I found this only work on simple html > page but not on the page in which pdf is embdad From lester at denhaag.org Fri Jul 23 19:33:35 2010 From: lester at denhaag.org (J. Lester Novros II) Date: Sat, 24 Jul 2010 02:33:35 +0200 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: References: Message-ID: <4C4A34DF.2010300@denhaag.org> Dear Vivek, On 07/23/2010 08:49 AM, vivek joshi wrote: > i want to disable right click in embdad pdf in browser ,can any one > please help me , till now what ever script I found this only work on > simple html page but not on the page in which pdf is embdad Hmm... Off the top of my head [and therefore completely untested] but you could try and overlay the browser viewport with a transparent DIV with position fixed. This would then, presumably, intercept all clicks. In case you need functionality from e.g. buttons on the page, you would need to replicate this in your fixed DIV. My .02 Euros. l8R lES -- We cannot control the rights of people to copy if they have computers. Copying is with us. Let?s see how we can be innovative and creative with our business models. Peter Jenner, International Music Managers' Forum http://lester.demon.nl/superm http://lester.demon.nl/tonka From hucklesby at gmail.com Fri Jul 23 21:35:46 2010 From: hucklesby at gmail.com (David Hucklesby) Date: Fri, 23 Jul 2010 19:35:46 -0700 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: References: Message-ID: <4C4A5182.4010800@gmail.com> On 7/22/10 11:49 PM, vivek joshi wrote: > Hi all > > i want to disable right click in embdad pdf in browser ,can any one > please help me , till now what ever script I found this only work on > simple html page but not on the page in which pdf is embdad FWIW - I generally download PDFs rather than viewing them in the browser as I do not have the Adobe plug-in. So I'm not sure what you would accomplish with that. Cordially, David -- From Ron.Luther at hp.com Mon Jul 26 12:24:21 2010 From: Ron.Luther at hp.com (Luther, Ron) Date: Mon, 26 Jul 2010 17:24:21 +0000 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: <4C4A34DF.2010300@denhaag.org> References: <4C4A34DF.2010300@denhaag.org> Message-ID: <6C571521FE9E4348AA16498E72C483BB2C0DD60E7E@GVW0671EXC.americas.hpqcorp.net> Vivek Joshi noted: > i want to disable right click in embdad pdf in browser Hi Vivek, Can you explain why? What is it you are trying to accomplish? You do know that you can 'lock' the pdf from copying, editing, and printing when you create it, right? Is there something you are trying to do that isn't covered by locking? Cheers, RonL. From vivekjoshi07 at gmail.com Tue Jul 27 00:49:58 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Tue, 27 Jul 2010 11:19:58 +0530 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: <6C571521FE9E4348AA16498E72C483BB2C0DD60E7E@GVW0671EXC.americas.hpqcorp.net> References: <4C4A34DF.2010300@denhaag.org> <6C571521FE9E4348AA16498E72C483BB2C0DD60E7E@GVW0671EXC.americas.hpqcorp.net> Message-ID: Hi yes I want to do the same thing,'lock' the pdf from copying, editing, and printing On Mon, Jul 26, 2010 at 10:54 PM, Luther, Ron wrote: > Vivek Joshi noted: > > i want to disable right click in embdad pdf in browser > > > Hi Vivek, > > Can you explain why? What is it you are trying to accomplish? > > You do know that you can 'lock' the pdf from copying, editing, and printing > when you create it, right? > > Is there something you are trying to do that isn't covered by locking? > > Cheers, > RonL. > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From mdougherty at pbp.com Tue Jul 27 07:54:01 2010 From: mdougherty at pbp.com (Mike Dougherty) Date: Tue, 27 Jul 2010 07:54:01 -0500 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: References: <4C4A34DF.2010300@denhaag.org> <6C571521FE9E4348AA16498E72C483BB2C0DD60E7E@GVW0671EXC.americas.hpqcorp.net> Message-ID: On Tue, Jul 27, 2010 at 12:49 AM, vivek joshi wrote: > > yes I want to do the same thing,'lock' the pdf from copying, editing, and > printing > > the best you can hope for is to make it so annoyingly difficult that most people don't bother. They could install Foxit Reader and not have Adobe Reader's restrictions on the document. They could maximize the viewer window and do a print screen then OCR the image. They could also have an intern read and re-key the content (old-school OCR :) They could attach the actual file in an email and send it to a dozen friends without your knowledge or consent. They could upload to their google docs and share it publicly with the world too. I guess I'm back to a philosophical point: If you are making your content freely available to the public, don't try to demand how they use it once they have it. If they've paid for copyrighted material, then the contractual obligation (EULA) they agreed to at purchase time should be sufficient. Don't annoy your paid subscribers by forcing them to read your pdf on-screen if they prefer to take a printout to a meeting (or to the park, etc.) My $0.02 aside, good luck on finding a solution. I don't have more helpful advice though. :) From Ron.Luther at hp.com Tue Jul 27 08:12:49 2010 From: Ron.Luther at hp.com (Luther, Ron) Date: Tue, 27 Jul 2010 13:12:49 +0000 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: References: <4C4A34DF.2010300@denhaag.org> <6C571521FE9E4348AA16498E72C483BB2C0DD60E7E@GVW0671EXC.americas.hpqcorp.net> Message-ID: <6C571521FE9E4348AA16498E72C483BB2C0DD613F0@GVW0671EXC.americas.hpqcorp.net> vivek joshi noted: >>yes I want to do the same thing,'lock' the pdf from copying, editing, and >>printing Hi Vivek, Okay, then you are in luck! ;-) However, you don't need any JavaScript to do this. I don't work with pdf files much ... but if you only have a few files, (and access to the Adobe tool), you can lock each one manually. If you have too many files to lock manually, (or don't have the budget for Adobe), then google for "scripts to lock pdf files" where you will find links to quite a few freeware, shareware, and commercial products to allow you to lock and unlock pdf files. You may have to test drive or do some research to figure out which of those will allow scripting to let you lock a lot of pdfs in a single batch. If you are creating the pdf files dynamically, then look for a locking script in whatever server side language you have available ... you should be able to find what you are looking for. This is a pretty common situation. Good Luck, RonL. From vivekjoshi07 at gmail.com Tue Jul 27 08:17:04 2010 From: vivekjoshi07 at gmail.com (vivek joshi) Date: Tue, 27 Jul 2010 18:47:04 +0530 Subject: [Javascript] disable right click in embdad pdf in browser In-Reply-To: <6C571521FE9E4348AA16498E72C483BB2C0DD613F0@GVW0671EXC.americas.hpqcorp.net> References: <4C4A34DF.2010300@denhaag.org> <6C571521FE9E4348AA16498E72C483BB2C0DD60E7E@GVW0671EXC.americas.hpqcorp.net> <6C571521FE9E4348AA16498E72C483BB2C0DD613F0@GVW0671EXC.americas.hpqcorp.net> Message-ID: thanks Luthar ,I think this is really helpful to me On Tue, Jul 27, 2010 at 6:42 PM, Luther, Ron wrote: > vivek joshi noted: > > >>yes I want to do the same thing,'lock' the pdf from copying, editing, and > >>printing > > > Hi Vivek, > > Okay, then you are in luck! ;-) However, you don't need any JavaScript > to do this. > > I don't work with pdf files much ... but if you only have a few files, (and > access to the Adobe tool), you can lock each one manually. If you have too > many files to lock manually, (or don't have the budget for Adobe), then > google for "scripts to lock pdf files" where you will find links to quite a > few freeware, shareware, and commercial products to allow you to lock and > unlock pdf files. You may have to test drive or do some research to figure > out which of those will allow scripting to let you lock a lot of pdfs in a > single batch. If you are creating the pdf files dynamically, then look for > a locking script in whatever server side language you have available ... you > should be able to find what you are looking for. This is a pretty common > situation. > > Good Luck, > RonL. > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript >