Expand my Community achievements bar.

DrDave6
DrDave6
Offline
Type
  • All
  • Questions
  • Discussions
  • Ideas
  • Blogs
Filter by user contributions
  • I figured this out...and it's pretty easy too.

    Type

    Questions

    Views

    2.0K

    Likes

    0

    Replies

    0
  • It's a good idea to start setting a coding standard for this stuff. Good suggestion.Perhaps I should start another thread for this, but....I have to use the following function 12 times in my form.var iImage = xfa.resolveNode("NA-Image-1");var nSize = iImage.value.image.value.length ;var nMB = nSize ...

    Type

    Questions

    Views

    1.9K

    Likes

    0

    Replies

    0
  • Thank you ocent12 -- your suggestion worked.I though I can to convert the number value to a string, before I could use it in text...but that is not the case.To understand what I'm doing, I have an ImageField and the user can add a JPG file. I'm then calculating the size of the JPEG to make sure that...

    Type

    Questions

    Views

    1.9K

    Likes

    0

    Replies

    0
  • I'm using the following in a validation eventvar MBn = (iSizeN / 1383.27)/ 1024;The result is a digit with around 10 decimal places.1) What do I need to do so that the result is only 2 decimal places?2) How do I then convert the 2-decimal place number to a text string so that I can use it in a messa...

    Type

    Questions

    Views

    3.4K

    Likes

    0

    Replies

    6
  • Thank you Niall (Paul & Marcel) for your detailed and thoughtful response. That is really appreciated.Because I'm a newbie, I didn't know enough to avoid dashes, when creating fields. To rename them at this stage in the game would be long and error-prone. As a result, I setup a variable as you sugge...

    Type

    Questions

    Views

    842

    Likes

    0

    Replies

    0
  • Hi Niall,It looks as though Marcel's validate routine would be the simpliest code to execute and manage. I just need to get the syntax correct so that it works.Thank you for your idea.

    Type

    Questions

    Views

    773

    Likes

    0

    Replies

    0
  • Thank you Marcel -- this LOOKS like we are on the right track.I pasted the code into the validate event, using FormCalc and got this error:Error:syntax error near token "Value" on line 1, column 20When I put the real name of my field in the function, column 20 refers to the end of the first "value."...

    Type

    Questions

    Views

    773

    Likes

    0

    Replies

    0
  • This is helpful. Thank you.I'm using an imageField called dhImage. What would the JavaScript look like for checking the image size (needs to be less than 1MB) and then alerting the user if it's over?I'm sure the script is stright-forwrd, but I'm a newbie and would appreciate your help.Would I put th...

    Type

    Questions

    Views

    773

    Likes

    0

    Replies

    0
  • Is there a way for me to know how large (in Bytes, etc) an image is within an imageField?Right now users can only insert images that are less than 1MB and I need to know how to test for that.All feedback is appreciated.

    Type

    Questions

    Views

    2.6K

    Likes

    0

    Replies

    10
  • Hi Steve,The relayout() still didn't work. I'm wondering if this did not work because of how I was referencing the my field.As you have seen from my previous post, the following worked.xfa.resolveNode("NA-Image-1").rawValue = null;Thank you for your help.

    Type

    Questions

    Views

    593

    Likes

    0

    Replies

    0
Top badges earned by DrDave6
Customize the badges you want to showcase on your profile