event.target not working when inside Browser

393 views
Skip to first unread message

Leena Jain

unread,
Jan 29, 2012, 11:56:34 PM1/29/12
to Adobe LiveCycle Developers
Hi ,

I have a Form which works standalone but does not work when embedded
in a browser.
I have a hidden button whose click has to be fired from within another
button.

Basically I want to submit the File as PDF to an ASP page and using
event.target to get hold of the PDF for submission.This works in
Reader but not when inside browser.

Thanks and Regards,
Leena Jain

tarekahf

unread,
Jan 30, 2012, 12:57:29 AM1/30/12
to Adobe LiveCycle Developers
Hi,

Submitting LiveCycle PDF to ASP is my area of experties !!!

I am using the following code:


function submitForm() {
theSubmitURL = getSubmitURL();
//console.println("theSubmitURL = " + theSubmitURL );
event.target.submitForm(
{cURL: theSubmitURL,
aPackets:["datasets","pdf"], cSubmitAs: "XDP"});
}


and the above code is working fine under IE 6, IE 7, IE 8 and FireFox.
I confirm that becuase I am using Integrated Windows Authentication,
IE 8 is the best.

You have to reader-enable the PDF using Adobe RES. For more details,
check the Shared Folder Below:

http://bit.ly/w00nNc

Tarek.

Leena Jain

unread,
Jan 30, 2012, 5:13:54 AM1/30/12
to Adobe LiveCycle Developers
Thanks Tarek,

I could resolve the issue.But i am getting
"NotAllowedError:security settings prevent access to this property or
method" in few systems while it works on some.I have Unckehed the
Enhanced Security Settings still I am facing this.

Any idea why?

Regards,
Leena
> > Leena Jain- Hide quoted text -
>
> - Show quoted text -

tarekahf

unread,
Jan 30, 2012, 5:33:37 AM1/30/12
to Adobe LiveCycle Developers
Please provide more info about how you are getting this error and
when ? Pls provide snapshot if you can.

Did you Reader-Enable to PDF Form ?

If the PC you are using has Adobe Acorbat (remove Adobe Reader just in
case), it should work fine.

What do you mean it works in some systems while in others it does not
work ?

More details are needed.

Tarek.
> > - Show quoted text -- Hide quoted text -

Leena Jain

unread,
Jan 30, 2012, 6:14:39 AM1/30/12
to Adobe LiveCycle Developers
I have a webservice connection in the Form and I have a Submit as PDF.
My form is Reader Extended.I am trying to open this within Sharepoint
Portal

I am getting "NotAllowedError:security settings prevent access to this
property or
method as pop up when trying to connect to the webservice i guess.

We have unchecked “Enable Enhanced Security” in Edit Preferences and
in Trust Manager allowed access to all sites. Still this issue
persists.

It works on dev environment but not through Citrix.

Regards,
Leena

tarekahf

unread,
Jan 30, 2012, 6:37:17 AM1/30/12
to Adobe LiveCycle Developers
It seems you have a complex setup. It will be very difficult to help
you without know the complete picture.

More questions:

1. When you mention Citrix, is this similar to Remote Desktop over VPN
Connection ?

2. How did you reader-enable the PDF ?

3. When you open the PDF form over Citrix, is Adobe Reader Installed
or Acrobat ?

4. Just before you get the error, open the PDF Form as usual, and
press Ctrl-K:
- goto Javascript
- Check Enable Javascript debugger
- When Execution is thrown chose Trace
- Check Enable Interactive console
- Check Show console on errors and messages.

5. Now regenerate the error, and press Ctrl-J.

6. From the console window, you should see the details of the error
and where it happened.

You need to provide exact details about when the error is hapening.

Tarek.

Leena Jain

unread,
Feb 1, 2012, 1:10:28 AM2/1/12
to Adobe LiveCycle Developers
Thanks Tarek.

1.When you mention Citrix, is this similar to Remote Desktop over VPN
Connection ?
It is working with Remote VPN connection but through a web interface
when we launch the IE it fails.

2. How did you reader-enable the PDF ?

Using Adobe Livecycle Reader Extensions ES

3. When you open the PDF form over Citrix, is Adobe Reader Installed
or Acrobat ?

Adobe Reader.

4. Enabled the Debugger but could not get the console

Also a related issue is that we are using this code:

var strURL = "<server URL>:\\PDF/PDFTest.aspx?PDFName="+fileNme ;
event.target.submitForm({cURL:strURL , cSubmitAs: "PDF"});

After the PDF is submitted another PDF with th URL is opening up when
tested standalone and when inside browser it navigates to the new ASP
page with the Response.

Is there a way by which even after submission we keep the control in
the PDF itself?

Thanks and Regards,
Leena Jain

tarekahf

unread,
Feb 1, 2012, 3:20:53 AM2/1/12
to Adobe LiveCycle Developers
Hi,

Here is my feedback.

1. I have seen cases from my side if I try to open a PDF over Juniper
Network via the web browser, then the relative links inside the PDF do
not work porperly. It will only work if I connect using "Juniper
Network Connect" which connects your PC remotely to be part of the
Work Domain. I think this is a limitation that need to be addressed on
a higher level via Citrix or Adobe Support.

3. Try with Adobe Acrobat to see if there is any difference.

4. The console will not show using Ctrl-J under Adobe Reader. You need
Acrobat. Or, you can try to add in your code, on a click of a summy
button to show th console using "console.show()". This will help you
see the details of the error. Still I am not sure if this will work
under Reader. That is why it is better to try it under Acrobat. If you
install Acorbat, remove Reader.

Also, your code should be like the following:

var strURL = "<server URL>://PDF/PDFTest.aspx?PDFName="+fileNme ;
event.target.submitForm({cURL:strURL , cSubmitAs: "PDF"});


5. For this:

> Is there a way by which even after submission we keep the control in
> the PDF itself?

The only way I know but I never tried is to submit the PDF to some
ASP.NET Web Service or to a special Adobe LiveCycle ES Service.

Also, you can have such effect using some nasty tricks using
traditional ASP.NET Web Page, where after successful submission, to
try to auto redirect back to the "submitted and saved" PDF, which I
recommend not to do. In my case, after successful submission, I
display a nice HTML Message inside a DIV with some cool icons. Simple
yet it provides much better user expereince.

> After the PDF is submitted another PDF with th URL is opening up when
> tested standalone and when inside browser it navigates to the new ASP
> page with the Response.

This is the same what happens in my case. This is normal.

Tarek.

Leena Jain

unread,
Feb 1, 2012, 3:43:43 AM2/1/12
to Adobe LiveCycle Developers
Thanks a lot Tarek!!Your response gave a much better understanding:)

wo...@subjectivist.org

unread,
Jan 30, 2012, 9:40:25 AM1/30/12
to live...@googlegroups.com
If the form works standalone with the Reader, but does not work via web
page, chances are the Adobe reader and add-ons need to be updated on that
machine. There is no reason for the form to work one way and not another.

> --
> You received this message because you are subscribed to the Google Groups
> "Adobe LiveCycle Developers" group.
> To post to this group, send email to live...@googlegroups.com.
> To unsubscribe from this group, send email to
> livecycle+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/livecycle?hl=en.


Reply all
Reply to author
Forward
0 new messages