Shop OBEX P1 Docs P2 Docs Learn Events
FORM METHOD="GET" Demo — Parallax Forums

FORM METHOD="GET" Demo

BeanBean Posts: 8,129
edited 2011-07-08 23:46 in Accessories
Here is a simple spin program that allows you to get data from the user by using a FORM.

Comments welcome.

Bean

Comments

  • CassLanCassLan Posts: 586
    edited 2010-11-20 10:12
    Works well!
  • CassLanCassLan Posts: 586
    edited 2010-11-20 11:24
    I'm going to try to take your GET code, and use it to write a file.
    This will enable text editing of the files via a browser (see pic)
    980 x 703 - 86K
  • jstjohnzjstjohnz Posts: 91
    edited 2011-01-15 17:27
    I'm using Bean's code and I'm trying to figure out a way to "force focus" to s specific field in the form (actually my form only has one field), whenever the page loads. Does anyone know how to do that?
    If that's not clear, basically when the page loads, I want the cursor to be in the form entry box so that the user doesn't have to manually move the cursor there before typing in a command.

    -jim-
  • xanaduxanadu Posts: 3,347
    edited 2011-01-16 12:11
    jstjohnz wrote: »
    I'm using Bean's code and I'm trying to figure out a way to "force focus" to s specific field in the form (actually my form only has one field), whenever the page loads. Does anyone know how to do that?
    If that's not clear, basically when the page loads, I want the cursor to be in the form entry box so that the user doesn't have to manually move the cursor there before typing in a command.

    -jim-
    <FORM NAME="KILLERROBOTS" METHOD=POST><SCRIPT LANGUAGE="JavaScript">
    <!-- window.document.KILLERROBOTS.TEXTBOXNAMEGOESHERE.focus(); //-->
    </SCRIPT> Have not tested this on Spinneret yet.
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2011-07-04 11:24
    Bean,
    It seems as though i saw something about this awhile back, but, when i run this code for a long period of time, it freezes. Any Ideas?
  • Mike GMike G Posts: 2,702
    edited 2011-07-04 12:20
    Brian, it's helpful if you post your code.

    From my experience, lockups were due to bugs in my code. The best thing to do is log all HTTP requests so you can see what was going on at the time of the error.
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2011-07-04 12:48
    Mike, Is there a bug free version?
  • Mike GMike G Posts: 2,702
    edited 2011-07-04 13:23
    Brian, I'm not sure there is a bug in Bean's code. Are you using Bean's code as is or have you changed it to fit your needs?

    Post your source!
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2011-07-08 23:46
    Bean,

    Your code was timely for a Perl application I was working on, thanks!

    In some security sensitive applications it might be a good idea to include autocomplete='off' after the <FORM header. i.e. in your example change...

    "<FORM METHOD=", QUOTE, "GET", QUOTE, ">"
    ...to ...
    "<FORM autocomplete='off' METHOD='GET'>"

    Notice above, you can replace...
    "<FORM METHOD=", QUOTE, "GET", QUOTE, ">"
    ...with...
    "<FORM METHOD='GET'>"

    ...just change the double quotes to single quotes within the main string quotes
Sign In or Register to comment.