cancel
Showing results for 
Search instead for 
Did you mean: 

java script not working

0 Kudos

Hi all

I have a web dynpro abap application with an adobe interactive form. In the form I want to make certain fields read only. To do this I am using java script. It works fine from the livecycle designer in preview mode but when I run the wd4a nothing happens - like the java script is not being executed. I tried changing the Adobe form properties to Acrobat 8 (Dynamic) XML form but it still does not work. Any ideas?

I'm using ALD 8.0, sapgui 710, Netweaver 7 SP 22 and IE8

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Have you checked that you can see the access property, for example, with a message box?

xfa.host.messageBox(xfa.form.D8.Page2.<my field>.access);

Also try accesing the field directly

<my field>.access = "readonly";

Do you have any script working in your form?

Regards, Aldo.

Edited by: Aldo Velazquez on Dec 9, 2010 4:36 PM

Former Member
0 Kudos

Hi Aldo,

only "readOnly" O in uppercase is available not with lowercase.

Cheers,

Sai

Former Member
0 Kudos

Hi Stuart,

Do you have Acrobat Pro...? if so you can actually see line by line erro messages if any at runtime for evry event.

Else is it possible to send that form to me to investigate ...?

Cheers,

Sai

0 Kudos

Hi Aldo, Sai

Infortunately I do not have Adobe professional. I have tried putting a message in the script but that is also not working. So to me it looks like any script is not being executed. As mentioned before it all works fine in preview in the LCD.

0 Kudos

Solved!!

I installed ALD ES version 8.2 , inserted web dynpro script , tested and it worked (FOR THE TIME BEING!). Hopefully this will avoid pain and suffering for others in my position. It seems that the version of SAP netweaver, sap gui, ALD, ADS all need to be compatible otherwise you will have problems. I can not find any documentation on this subject. My 5 cents worth - just don't go there.

Former Member
0 Kudos

Hi Stuart,

Just in case did you check the value which drives the JS is populated in the form at runtime.

may be silly but my experience is, our backend developer said the value is XX or null i did the script according and then he claims the form is not working when I checked it the value is basically YY or Null.

Cheers,

Sai

0 Kudos

Hi Sai

I'm pretty sure its correct. This is the script:

xfa.form.D8.Page2.<my field>.access = "readOnly";

it works in preview.

I think the problem has something to do with the web dynpro script I have inserted via utilities>inser web dynpro script. This is the script:

802.20090903061432.597600.590319

I'm just not sure if this is the correct version of the script.

0 Kudos

Any gurus out there that can help?

Perhaps java script and Web dynpro abap are not compatible?

Any ideas? If I don't find a solution soon I am in trouble. I feel like I have all my ducks in a row and STILL the interactive form gives me trouble.