Advertisement

04.18.2008 at 12:59PM PDT, ID: 23335420
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Loading local PDF into IFrame using Javascript

Asked by hasan_tek in JavaScript, Adobe Acrobat, Programming for ASP.NET

Tags: ,

I am develping a ASP.Net based web page. However this issue is not specific to .Net and it is about javascript.
My requirement is to give a preview of PDF document from local machine file system(c:\PDFS\abc.pdf) before uploading to the server.
The webpage contains an IFrame and FILEUPLOAD control (to simplify: Input type=file) . I wrote a javascript to open the local pdf and called it on OnChange event of the upload control, but it does'nt work. For testing purpose have I changed the document to a  jpeg file and it works (c;\mypics\me.jpg).
Please suggest a solution.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
Onchange I am calling: setIframeSRC('doc_frame',this.value)
For ASP.Net guys: Others please ignore the next line
======================================================
fup_rpt.Attributes.Add("onchange", "setIframeSRC('" + doc_frame.ClientID + "',this.value)");
=======================================================
 
Javascript function
===================
 function setIframeSRC(objFRM,local_src)
 {
     alert(objFRM);
     alert(local_src);
/////// None of this works and doesnt throw any error but load a blank page(about:blank)
///////////////////////////////
/// attempt #1
        //document.getElementById(objFRM).src = local_src;
/// attempt #2
       // testiframe.location.replace = local_src  // local_src = 'c:\\PDFS\\abc.pdf'
/// attempt #3
     //objIFrame = document.getElementById(objFRM);
     //objIFrame.src = local_src;
/// attempt #4
     //document.all.ctl00_cph_1_doc_frame.src = local_src;
 
////// This works   ////////
     //document.all.ctl00_cph_1_doc_frame.src = C:\\mypics\\me.jpg';
////////////////////////////
     
 }
 
Loading Advertisement...
 
[+][-]04.18.2008 at 01:29PM PDT, ID: 21389376

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 01:52PM PDT, ID: 21389546

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 01:53PM PDT, ID: 21389553

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 02:03PM PDT, ID: 21389627

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 02:11PM PDT, ID: 21389672

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 05:30PM PDT, ID: 21390530

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Adobe Acrobat, Programming for ASP.NET
Tags: Javascript, IE 6/7, Firefox
Sign Up Now!
Solution Provided By: LordOfPorts
Participating Experts: 1
Solution Grade: A
 
 
[+][-]04.18.2008 at 08:50PM PDT, ID: 21391102

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.21.2008 at 07:51AM PDT, ID: 21402437

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 09:14PM PDT, ID: 21930960

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 05:17PM PDT, ID: 21949780

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628