How to use javascript without dialog boxes?

0

I want to ask for information to the user only without using those dialog boxes and yes leave it printed on the site, with the use of the input. Is it with the javascript that does this? I tried searching something on google and I did not find anything. I really want to be able to program my site, but I have no idea where to start learning, or anything. If you have a tip, I appreciate it.

Note: This is an example of what I'm trying to do, since I did not explain it so well ... Obs2 .: I read what you put, only to ask for information like this, where I will store the answer, I do not know otherwise without using the prompt ... But if I use it I will have to use the javascript , which consequently it will appear in a dialog box.

    
asked by anonymous 01.09.2015 / 13:14

2 answers

0

I do not know if I understand what you want, but from what I've read you want to give the user a message somewhere on your page other than alert() or something like that. You can use InnerHtml's javascript for this, if that's what I'm understanding. With it you give the message in a certain position, such as <div> , or input text and etc ..., it would look something like this: Define an area with a preference id. That area is where you're going to give the message. Let's assume it is id="txt_msg" . Then you do:

function ExibeMensagem(pNomeParametroQualquer) {
    document.getElementById('txt_msg').innerHTML = 'Minha Mensagem';
}

In your Form (web), in any event, type click or change of textbox , you call the function:

<input button id="ffff" onclick="ExibeMensagem(qualquer_coisa)" />

I think that's what I understood what you want.

    
01.09.2015 / 19:43
1

Let's see, you can do an input and a submit button, which when clicked (onClick) will call a javascript function that will pick up the data entered in the input and do what you want. Remember that using JavaScript the user will be able to see the code of his script, so he can know the entire process involving the input.

    
01.09.2015 / 13:34