Little request |
Little request |
Rajatapaus |
Mar 14 2012, 07:32 AM
Post
#1
|
Group: Members Posts: 6 Joined: 14-March 12 Member No.: 16,701 |
I need just a small text box and a submit button, when the text is written in the box, and submit pressed, it would change a code value. For example, if my code is:
<input type="hidden" name="return_url_target" value="1"> I type in the text box 3, and press submit, then code is: <input type="hidden" name="return_url_target" value="3"> Lastly, it would need to be pre defined values (but not visibly), so for example, it would change target code value to 3, but not 4 even if you tried. If it is not too much trouble, i would love to have a version without a pre defined value, and one with a visible pre determined values (for example, shows all possible values when clicked, if you can just tell me the code, i can change it myself). Is this doable? This is the only thing that I need for my website, and I dont want to spend hours to learn a language, that I'm only going to use once. I would be truly grateful if someone would help me just a bit |
Christian J |
Mar 14 2012, 02:28 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
For example, if my code is: <input type="hidden" name="return_url_target" value="1"> I type in the text box 3, and press submit, then code is: <input type="hidden" name="return_url_target" value="3"> What is the purpose of the hidden field? Why not use a textfield with the same name instead: CODE <input type="text" name="return_url_target" value="3"> ? QUOTE Lastly, it would need to be pre defined values (but not visibly) Why not visibly? Any user can view HTML source and see the permitted values. In a server-side script the values can be hidden, though. Are you able to edit the server-side script? QUOTE Is this doable? Probably, but I don't understand exactly what you want/need. |
Rajatapaus |
Mar 14 2012, 03:57 PM
Post
#3
|
Group: Members Posts: 6 Joined: 14-March 12 Member No.: 16,701 |
For example, if my code is: <input type="hidden" name="return_url_target" value="1"> I type in the text box 3, and press submit, then code is: <input type="hidden" name="return_url_target" value="3"> What is the purpose of the hidden field? Why not use a textfield with the same name instead: CODE <input type="text" name="return_url_target" value="3"> ? QUOTE Lastly, it would need to be pre defined values (but not visibly) Why not visibly? Any user can view HTML source and see the permitted values. In a server-side script the values can be hidden, though. Are you able to edit the server-side script? QUOTE Is this doable? Probably, but I don't understand exactly what you want/need. Hello Christian! As you can see, I'm a total novice. It seems to work fine when i change that hidden code to visible, so there is no problem there anymore, I feel dumb for not noticing that earlier I'm not 100% sure what you mean about server-side scripts, I can access my webpage server with ftp, but thats it. The only problem anymore is to make a list of permitted values. It is not a huge problem if they can be seen in the source code, except that the values are other peoples e-mails, so I think it would be best to hide them (it would be also embarrassing to see only few e-mails in the list ), but again, I dont think that is a huge problem. Thank you for your time! |
Christian J |
Mar 14 2012, 05:37 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
I'm not 100% sure what you mean about server-side scripts A server-side script normally handles the form data after you submitted it (the URL of the script is specified in the form's ACTION attribute). But form elements can also be used with client-side script javascript without submitting anything to the server. QUOTE The only problem anymore is to make a list of permitted values. It is not a huge problem if they can be seen in the source code, except that the values are other peoples e-mails, So you want the user to write an email address in the textfield? Assuming it's a permitted address, what's supposed to happen after that? QUOTE I think it would be best to hide them Note that spambots will find email addresses even they are hidden in the HTML source. But if you don't care about spambots, why not display them as ordinary email links? Seems more user-friendly to me. QUOTE (it would be also embarrassing to see only few e-mails in the list ) Not sure I understood that part... |
Lo-Fi Version | Time is now: 26th April 2024 - 08:25 PM |