469,950 Members | 2,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

prompting 2 values

uoL
Hello,

I'd like to know how to prompt two values with prompt(); function.
I need to get things like 'pass' and 'user, 'article' and 'value', etc
... in a document and I dont want to make a whole html in a pop up to
do it ..

Thanks !

Nov 3 '06 #1
11 1371
uoL wrote:
Hello,

I'd like to know how to prompt two values with prompt(); function.
I need to get things like 'pass' and 'user, 'article' and 'value', etc
.. in a document and I dont want to make a whole html in a pop up to
do it ..

Thanks !
Hi,

Prompt just gives 1 inputfield. Period.
So you'll have to make 2 prompts, giving the values in sequence.
Or let the user use some character as a seperator, eg:
article;value

Regards,
Erwin Moller
Nov 3 '06 #2
You can't. So you'll have to make a whole html page.
Unless you require the user to type in a "somecharacter" delimited
string and then parse it. Like: "user, pass, article, value". Tho this
ain't an elegant solution.

On Nov 3, 3:05 pm, "uoL" <wmar...@gmail.comwrote:
Hello,

I'd like to know how to prompt two values with prompt(); function.
I need to get things like 'pass' and 'user, 'article' and 'value', etc
.. in a document and I dont want to make a whole html in a pop up to
do it ..

Thanks !
Nov 3 '06 #3
uoL
thank you all !

I've made an html form, but i wonder how ftp access form work ..
because i've seen they prompt two values user and pass.
i'll try to research a little more if smb knows plz let me know

Thanks!

whiskey wrote:
You can't. So you'll have to make a whole html page.
Unless you require the user to type in a "somecharacter" delimited
string and then parse it. Like: "user, pass, article, value". Tho this
ain't an elegant solution.

On Nov 3, 3:05 pm, "uoL" <wmar...@gmail.comwrote:
Hello,

I'd like to know how to prompt two values with prompt(); function.
I need to get things like 'pass' and 'user, 'article' and 'value', etc
.. in a document and I dont want to make a whole html in a pop up to
do it ..

Thanks !
Nov 3 '06 #4
ASM
uoL a écrit :
Hello,

I'd like to know how to prompt two values with prompt(); function.
I need to get things like 'pass' and 'user, 'article' and 'value', etc
function quest() {
if( art=prompt('Article subject')) {
if(val=prompt('Search value')) {
{ alert(art+'\n'+val); return; }
}
alert('not correctly filled');
}

Nov 3 '06 #5
uoL wrote:
thank you all !

I've made an html form, but i wonder how ftp access form work ..
because i've seen they prompt two values user and pass.
i'll try to research a little more if smb knows plz let me know
Your ftp-program is not written in JavaScript.

Regards,
Erwin Moller
Nov 3 '06 #6
uoL
Erwin,

I ment when you enter a ftp site via web browser. the web browser
display some kind of prompt but with two value inputs.

Regards,
uoL
Erwin Moller wrote:
uoL wrote:
thank you all !

I've made an html form, but i wonder how ftp access form work ..
because i've seen they prompt two values user and pass.
i'll try to research a little more if smb knows plz let me know

Your ftp-program is not written in JavaScript.

Regards,
Erwin Moller
Nov 3 '06 #7
uoL
Thanks ! that might help ..

ASM wrote:
uoL a écrit :
Hello,

I'd like to know how to prompt two values with prompt(); function.
I need to get things like 'pass' and 'user, 'article' and 'value', etc

function quest() {
if( art=prompt('Article subject')) {
if(val=prompt('Search value')) {
{ alert(art+'\n'+val); return; }
}
alert('not correctly filled');
}
Nov 3 '06 #8
uoL wrote:
Erwin,

I ment when you enter a ftp site via web browser. the web browser
display some kind of prompt but with two value inputs.
Same answer: Your webbrowser is not written in JavaScript, but C(++).

So the ftp-dialog is not created by JavaScript, but it is created by some
build-in function.

Regards,
Erwin Moller
>
Regards,
uoL
Erwin Moller wrote:
>uoL wrote:
thank you all !

I've made an html form, but i wonder how ftp access form work ..
because i've seen they prompt two values user and pass.
i'll try to research a little more if smb knows plz let me know

Your ftp-program is not written in JavaScript.

Regards,
Erwin Moller
Nov 6 '06 #9
That prompt isn't accessible from JavaScript. Those things ar generated
by the browser when a page requires authentication (http
authentication, for instance).

On Nov 6, 11:20 am, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
uoL wrote:
Erwin,
I ment when you enter a ftp site via web browser. the web browser
display some kind of prompt but with two value inputs.Same answer: Your webbrowser is not written in JavaScript, but C(++).

So the ftp-dialog is not created by JavaScript, but it is created by some
build-in function.

Regards,
Erwin Moller
Regards,
uoL
Erwin Moller wrote:
uoL wrote:
thank you all !
I've made an html form, but i wonder how ftp access form work ..
because i've seen they prompt two values user and pass.
i'll try to research a little more if smb knows plz let me know
Your ftp-program is not written in JavaScript.
Regards,
Erwin Moller
Nov 6 '06 #10
uoL
Thank you all .. but i tell you I think javascript should give
programmers this feature of prompting more than one value .. It seems
is obviously usefull.. but I'm also sure there's a good reason for not
implementing such a thing.
Thanks again !
Regards,
uoL

Erwin Moller wrote:
uoL wrote:
Erwin,

I ment when you enter a ftp site via web browser. the web browser
display some kind of prompt but with two value inputs.

Same answer: Your webbrowser is not written in JavaScript, but C(++).

So the ftp-dialog is not created by JavaScript, but it is created by some
build-in function.

Regards,
Erwin Moller

Regards,
uoL
Erwin Moller wrote:
uoL wrote:

thank you all !

I've made an html form, but i wonder how ftp access form work ..
because i've seen they prompt two values user and pass.
i'll try to research a little more if smb knows plz let me know

Your ftp-program is not written in JavaScript.

Regards,
Erwin Moller
Nov 6 '06 #11
I'm also sure there's a good reason for not implementing such a thing.
I wouldn't be so sure about that, however I'm sure there aren't good
reasons to implement such things :-)

Nov 6 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Steve Hall | last post: by
3 posts views Thread by =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.