Print Page | Close Window

FormFieldJavaScriptAction JavaScript Length

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1108
Printed Date: 12 Dec 25 at 9:44PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: FormFieldJavaScriptAction JavaScript Length
Posted By: Niels
Subject: FormFieldJavaScriptAction JavaScript Length
Date Posted: 12 Jun 09 at 2:04AM
Hi,
I am just playing around with JavaScript and some action for a button.
But now I think I have a serious problem.
It looks like that the method FormFieldJavaScriptAction has a restriction in the length of the JavaScript string; It complains if the Javascript string is longer than 255 character....
So If I would like to create more complex tasks by a button click It will not work?
It there a way solve this problem?

Regards
Niels



Replies:
Posted By: Ingo
Date Posted: 12 Jun 09 at 6:37AM
Hi Niels!

I've never tried the complete length. If it's so like you're explaining then perhaps it's possible to work with AddGlobalJavaScript and GetGlobalJavaScript building your script regarding the special situation?
Perhaps you can use code like this:
<script src="http://www.sample.com/example.js" type="text/javascript">
... to use external scripts?

Cheers, Ingo



Posted By: Niels
Date Posted: 15 Jun 09 at 12:35AM
Hi Ingo,
I can't use external JavaScript.
The PDF files we are creating are used offline! (The user edits the form data local and submits it later when he is online again back to us)
But the support told me that they will have a look in this matter.
Thanks
Cheers Niels


Posted By: Rowan
Date Posted: 30 Jun 09 at 11:10AM
The 255 character limit is for string constants in Delphi, so it's nothing to do with Quick PDF Library.  The easiest way around this to to break it up into multiple strings:

LongString := 'app.alert("This is a Long message window ' +
  'which can be displayed because the string Literal is ' +
  'bigger than 255 characters long <spacefiller><spacefiller>' +
  '<spacefiller><spacefiller><spacefiller><spacefiller>' +
  '<spacefiller><spacefiller><spacefiller><spacefiller>' +
  '<spacefiller><spacefiller><spacefiller>!");';



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk