Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I've read through all the Q and A on the CDF plug-in and still am puzzled. I've managed to create some webpages with CDF content, it's working fine except when you reveal the animation menu and use the input field instead of the slider. If you type anything in the input field, the demonstration is no longer viable and you need to refresh the page to get it working again.

The demonstrations at the main site don't have this issue.

Is there something I can do to prevent this from happening? And is it possible to get numeric input in this way?

Here is an example.

My skills are limited so maybe this requires lots of checking of input values to insure they match the constraints of the demonstration?

share|improve this question
    
Is it possible that the input field of the slider is treated as a form of arbitrary input?: "For activation of higher-level application content in .cdf files, such as arbitrary input, dialog windows, and loading external data, please contact Wolfram Research." –  David Carraher Mar 30 '12 at 11:37
    
Thanks for responding. I figured, but.... at the demonstrations site, this functionality WORKS in all the demonstrations I tried. So perhaps they are doing some special magic in the translation process... –  Tom De Vries Apr 2 '12 at 11:03

1 Answer 1

I don't think you are supposed to be able to use an input field. The Create a Computable Document HowTo says:

All interactive content must be generated with the Manipulate command and may only use mouse-driven elements, such as Slider, Locator, Checkbox, PopupMenu, etc.

Couldn't you build numerical selectors like below?

DynamicModule[{h = 0, s = 0, t = 0},
 Manipulate[
  Grid[
   {
    {Button["+", h++; If[h > 9, h = 0]], 
     Button["+", t++; If[t > 9, t = 0]], 
     Button["+", s++; If[s > 9, s = 0]]}, 
    {h, t, s}, 
    {Button["-", h--; If[h < 0, h = 9]], 
     Button["-", t--; If[t < 0, t = 9]], 
     Button["-", s--; If[s < 0, s = 9]]}
    }
   ]
  ]
 ]

Mathematica graphics

share|improve this answer
    
Does your social rank actually allow you to answer? I mean, you don't even have a capitalized "de" in your name. –  Daniel Lichtblau Apr 1 '12 at 15:23
    
@DanielLichtblau Tom is an emigré who forgot the origins of his name. 'de' is just 'the' and shouldn't be capitalized. –  Sjoerd C. de Vries Apr 1 '12 at 15:39
    
I haven't forgotten... I had heard this from my parents... but I guess they got tired of always clarifying the spelling of their name... but yeah... they came from Holland but I was born here... –  Tom De Vries Apr 2 '12 at 11:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.