in reply to Re: Inserting values into a form
in thread Inserting values into a form

I'll explain the problem in detail. There's a form (say abc.html) where you configure certain settings (fill in text boxes and click on submit). Clicking on Submit saves the values so that the next time you open abc.html you can see the values entered earlier. Now these settings are the same every time you configure it. I want to save these settings in a text file, read these and then using a script populate the fields in the form abc.html. That way I don't have to type in the settings every time. I can just open my app, enter abc.html in the appropriate box and the click of a button will do the settings for me. Hope it's clear now.

Replies are listed 'Best First'.
Re^3: Inserting values into a form
by ww (Archbishop) on Oct 23, 2009 at 13:30 UTC

    Much clearer.

    So, some more questions:

    • "Clicking on Submit saves the values"
      How? Where? (eg, a cookie, a file (on server? in the browser's machine? Are both the same box?) (How you get them back depends on this...and please tell me you're not saving the values to --ie, rewriting-- abc.html.)
    • "I don't have to type"
      Should we take "I" literally, as in never anyone other than you personally or is that (misleading) shorthand for "any one of some number > 1 users"?
    • "I can just open my app"
      Which is? Another web page; something you execute in a terminal? A GUI ap, depending on X-windows, W32 or ???
      and where will that be located: on a remote server or locally?

    I may be way off base on this, but it sounds -- at this point -- as if you have a system design problem, as in "too complex." Think "going all around Robin Hood's barn!" Why not just write your config options into the ap itself or create config script for the ap?

    Update: Added concern about rewriting and Robin Hood.

      Answers to your questions: 1. "Clicking on Submit saves the values" - Values are saved on a server. So the next time someone opens abc.html they see the values entered earlier. The user can modify the values and submit again. 2. "I don't have to type" - Any number of users. Ofcourse only one user will make changes to abc.html at one point of time. 3. "I can just open my app" - the app will be another web page. The app will be located in a remote server. One more thing. I can't meddle with the source code of abc.html. I can only give values in the text boxes and submit them.