|
Post by aristarkos on Jan 25, 2009 18:42:34 GMT -5
I'm trying to disable autocomplete, but my attempts caused my program to stop working normally ... as if every value was zero ... perhaps.
I used...
head "<meta http-equiv=""cache-control"" content=""no-cache,no-store,must-revalidate,max-age=0""> <meta http-equiv=""pragma"" content=""no-cache"">"
html "<form autocomplete=""off""></form>"
I also used that last html line by itself. I don't know much about this. I just found something at another forum and tried to adapt it. I would like to disable autocomplete when Input is used, but still be able to carry values throughout the running of the program (assuming that's where the problem is).
Any tips?
|
|
|
Post by StefanPendl on Jan 26, 2009 2:36:59 GMT -5
The RB application is already inside a form, I do not know if nesting forms is good and I think to remember a similar problem. How about using autocomplete='off' without the form tags
|
|
|
Post by aristarkos on Jan 26, 2009 20:36:53 GMT -5
Thanks. Still not working. In fact now I can't get the autocomplete to stop at all ... like I did before ... whether the programs works right or not. Strange.
Maybe I'll have more luck with JS (which I don't know much about).
|
|
|
Post by StefanPendl on Jan 27, 2009 1:40:45 GMT -5
Could you prevent auto-complete with a DIV
|
|
|
Post by aristarkos on Jan 27, 2009 3:01:19 GMT -5
I don't know. How would that work?
|
|
|
Post by StefanPendl on Jan 28, 2009 4:19:28 GMT -5
Below find a working example. The key to success is using HTML input boxes, the name property is mandatory and will be used with #request to get the contents of the text field. This is tested as a published application with FF3 and IE7. head "<meta http-equiv='cache-control' content='no-cache,no-store,must-revalidate,max-age=0'> <meta http-equiv='pragma' content='no-cache'>"
[restart] cls text$ = "Hello world!" print 'RB command 'textbox #box, text$
'HTML 5 Info at www.w3schools.com/tags/html5_input.asp 'HTML replacement for text box without auto complete html "<input type='text' class='text' id='#box' name='#box' value='"; text$; _ "' autocomplete='off' autofocus='true' />" print print link #action, "Accept", [accept] print wait
[accept] text$ = #request get$("#box") print print text$ print link #reload, "Reload", [restart] print wait
|
|
|
Post by aristarkos on Jan 29, 2009 16:25:24 GMT -5
Thank you!
I need to input numbers but I can use: val(mid$(text$, 1, 1))
Do you know if the HTML INPUT can be used so that I can just hit the Enter key ... instead of clicking on a link or button?
-----------------------------------
head "<meta http-equiv='cache-control' content='no-cache,no-store,must-revalidate,max-age=0'> <meta http-equiv='pragma' content='no-cache'>" [restart] cls print text$="1234" html "<input type='text' class='text' id='#box' name='#box' value='"; text$; "' autocomplete='off' autofocus='true' />" print print link #action, "Accept", [accept] print wait
[accept] text$ = #request get$("#box") print text$ print print "1st char multiplied by 100 = "; val(mid$(text$, 1, 1))*100 print "2nd char multiplied by 100 = "; val(mid$(text$, 2, 1))*100 print "3rd char multiplied by 100 = "; val(mid$(text$, 3, 1))*100 print "4th char multiplied by 100 = "; val(mid$(text$, 4, 1))*100 print link #reload, "Reload", [restart] print wait
|
|
|
Post by aristarkos on Jan 30, 2009 0:27:13 GMT -5
Or is it possible to use some kind of BUTTON that can be engaged by hitting the Enter key ... a BUTTON that would take the place of the LINK but serve the same function ... in this HTML INPUT situation?
|
|
|
Post by StefanPendl on Jan 30, 2009 2:17:39 GMT -5
I need to input numbers but I can use: val(mid$(text$, 1, 1)) Add the attribute inputmode='latin digits' to only allow numbers. I don't know, I haven't had a need for such, but you can try to add a button of type submit. An example can be found on the page I included in the code.
|
|
|
Post by aristarkos on Jan 30, 2009 2:36:54 GMT -5
Thanks. What I really need is for the cursor to be in the field from the start ... so I don't have to click on it every time. Apparently, this can be done with javascript. So I'm trying to learn enough about JS to create an input that includes... - autocomplete off
- auto cursor placement
- use of enter key (not click on link)
I'll be inputting four numbers together and then the program will act on each individual digit.
|
|