cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Javascript code disappears after activating the form

Former Member
0 Likes
4,880

Not sure what's wong, but as soon as I activate the form all the javascript disappears. It still works when the form is executed and displayed, all events work fine. But when I go back in livecycle designer to see the code, there is just no code at all. I have shutdown SAP GUI, my computer, restarted everything but cannot get around this problem.

Any ideas? google didn't return anything as well.

Accepted Solutions (0)

Answers (11)

Answers (11)

Former Member


Dear Frozen Monkey,

I have some problem and i found the solution.

* What happened : The XML source file was generated not correct .

For the specific field were created 2 or more events "initialize" and JS code for events.

For solving the Problem - U need delete the dupicates from XML source.

Best Regards,

Alex Gritsevsky

Former Member
0 Likes

Hi Alex,

Thanks for the help.

We had the similar issue and when we went to XML view and your right it had duplicate event code.

After clean up in XML it is working fine now.

Thanks

Naresh

stephenl1
Participant
0 Likes

This problem occurs with older versions of Lifecycle Designer. It is described on SAP note 2259632. If you don't update to the required version the form can still be fixed by following instructions on note 2280896,

I also found this article on clearing cache, and although this did not fix the issue for me, it may be something worth noting.

I have the problem on Lifecycle Designer 10.4.0. It looks like I need patch level 3 to fix the issue permanently.

Cheers

Stephen

0 Likes

It looks like sometimes ALCD inserts duplicate copies of the event scripts - you can see it in XML view. When this happens it stops displayed script under event tab. To fix it switch to XML view and clean up code by deleting duplicate events manually.

Former Member
0 Likes

Hello Frozen,

Were you able to resolve this issue? I am facing the same issue. I found a link Js Script or FormCalc scripting is not appearin... | Adobe Community but did not understood.

Please let me know if you have any resolution.

Regards,

Ranganadh.

Former Member
0 Likes

As suggested I deleted the duplicate events from the xml source, now I can able to see the script. Thank you.

Former Member
0 Likes

Hi,

sometimes I solved by cleaning the xml file, removing the tag (<? templateDesigner>) in the vicinity of the event  and also removing doubles events, created because rewriting the code every time.

It is not a solution but surely it would need to report to SAP.

Regards,

Rocco

Former Member
0 Likes

Hi *,

If the Javascript is working and does not appear in Script Pallet, select the element (e.g textbox) and go to XML tab.

There, you will see that Javascript exists and so you don't need to write it again and again.

This problem occurs in older version of LiveCycle.

Thank You.

Chandler Bing

Harsh9
Participant
0 Likes


Hello Chandler,

Since past week, I have been bugged up with this issue. Every time I write javascript code on click event of checkbox, it disappears after I save it. It works fine and can be seen in XML source. But how do I restore things to normal?

I am using SAP GUI 7.30 and Adobe LiveCycle Designer 9.0.

Your help will be highly appreciated.

Regards,

Harsh

Former Member
0 Likes

Hi Harsh,

unfortunately I cannot tell you how to solve the issue, but maybe I still can help somewhat. In my case re-Installation of LifeCycle Designer and SAP GUI did not help. I then just gave up trying to solve it and used another pc. On the other PC (with same Version of LifeCycle Designer and SAP-GUI) I could see all the Java scrip again and it was ok for me to use another machine because I normally do not have to work with Adobe Forms. Maybe this gives you a hint to solve the issue.

KR

Felix

Harsh9
Participant
0 Likes

Hi Felix,

Thanks for your reply.

I tried doing what you recommended. I tried accessing the ADOBE FORM from another PC with my login credentials but that didn't result in JavaScript being visible. What other option do I have?

Regards,

Harsh

Former Member
0 Likes

Hi Harsh,

Sorry for late reply.

I found 2 ways to solve this problem.

1. Update to the latest LiveCycle designer. (The most efficient and nest approach to do). You can download it from SAP Service Market. This may help you.

This should be the latest version.

ADOBE LiveCycle Designer ES3 - Version 10.4.0 (I am using this one)

2. Copy Adobe Form (old) to new Form (Temp Form in SFP). Check the new form. It should not have the problem. And delete the old one. Recopy it to the old one. (I had to do this 2-3 times. It is tedious. but solved the problem.)

Hope this would help you.

Regards.

Chandler Bing.

Harsh9
Participant
0 Likes

Hello Chandler,

For this instance, I replicated the form again.

I have been trying to figure out which latest version of Adobe LiveCycle Designer is compatible with SAP EhP6. Could you please help me with that?

Regards,

Harsh

SandySingh
Active Contributor
0 Likes

Hello

Please note that there is a specific ADLC version compatible with SAP GUI version.

ALD9.8 is compatible with SAP GUI Server Release 7.20, according to the SAP note:1658830

Refer to SAP note 962763 for more details.

Hope it helps

Regards

Sandy

Former Member
0 Likes

Hi Harsh,

Sandy is right.

You got to choose Adobe LiveCycle based on SAP GUI version, OS and DB.

You can download the Adobe LiveCycle Designer installer from SAP Service  Marketplace:

http://service.sap.com/installations

Entry by Application Group  -> SAP NetWeaver  -> SAP NETWEAVER  -> SAP NETWEAVER (your version)  -> installation and Upgrade  -> <Choose any OS and DB combination.>  -> Adobe LiveCycle Designer 10.

Thank you.

Chandler Bing

Harsh9
Participant
0 Likes

Hello,

You guys have been very helpful. Moreover, ALD 10.4 is possible to install in my system so I will go ahead for that.

On the other note, is it possible to clean the XML source of Adobe Form? By clean, I mean, removing all the erroneous things.

Regards,

Harsh

Former Member
0 Likes

Hi,

First check which version of SAP GUI you are using make sure it is 730 or higher .

Re install the adobe life cycle designer in your computer.

Your problem will be solved

Regards

Bikas

Former Member
0 Likes

I have the exact same problem.

Have written code to change caption in the initialize event of that text field but when returning to the form after testing it the code has disappeared. The code still works, but I cannot see, change or delete it anymore

Any suggestions would be helpful.

Erik

Piyushmatrixs
Participant
0 Likes

Hi Erik,

1.   Open your form in edit mode.

2.   Select the text field at which you had written script.

3. Select the " INITIALIZE "  event (it would be marked with " * " like "Initialize *" ) from drop-down list of events at top left . It will show your script.

I hope it will solve your issue.

Regards

Piyush

Former Member
0 Likes

Hi all,

I do have the same problem as Frozen Monkey. It is nothing about forgetting to be in edit mode. After activation the code dissappears. Note that it still works: When I for example put an object to presence = hidden dynamically in the code (depending on the value of a checkbox),  the code will still work. But there will be no code visible in the editor. I would for example select "events with scripts" of the corrsponding object and it will show nothing. I would go to the specific event (for example "initialize") and it will show nothing. I even go through all the events when I select the rood node and I still would not find it.

Has anyone else except Frozen Monkey and me encoutered this?

Felix

Piyushmatrixs
Participant
0 Likes

Hi Felix,

1.  Open your form in edit mode.

2. select the object (i.e. subform or textbox whatever it is) at which you wrote the script.

3. Click on drop-down of script-editor, find event which you had selected and written code under it. It would be marked with    " * ", select this. I am sure you will get your script.

Regards

Piyush

sandeep_katoch
Contributor
0 Likes

Hi Frozen,

Please check the dropdown at top left of the Adobe LiveCycle designer named as events.

There you need to select the event with * because there only you have written the code or else select that particular field on form where you have written script, then check the corresponding highlighted event name from the dropdown , you will find your code.

Another good examples are posted by Xiang Li .

Regards,

Sandeep Katoch

pavan_prabhu
Active Participant
0 Likes

Hello Frozen Monkey,

     Xiangli Heah is right.

1) Select the particular event instead of all events(my personal experience as well).

2) Check if you have written the Java script code in Edit mode(my personal experience as well).

rakesh_m2
Contributor
0 Likes

Is javascript editor disappearing or complete code? Can you please try by creating a simple form with only field and place simple script on that field like this.rawValue = '5' and see, if it still disappears.

--

Rakesh

Former Member
0 Likes

The javacode window is there, it has that one liner in it that tells which event I am coding for.

Any javascript statement would work, including the one you suggested (this.rawValue = '5') but it simply does not show up in the code part after I activate the form. The code works though, it will put '5' on the text box.

Former Member
0 Likes

Hi Frozen Monkey,

Can you please check if you have put your Javascript in correspond event?

There is a event drop down for you edit each of the event behavior; I would advice do not use the all event as some times lifecycle designer will save your code to elsewhere ; select the event u want to fire the code and do your coding.

Another stupid mistake i always did is, i edit my code in display mode and yet i still can activate my code, ended up all my code gone.

Hope this helps.

regards,

Xiang Li