Can I enter data into a PROMPT and have it open a window based on the value entered?

T

Tom Jenkins

I have looked at many JavaScripts and I cannot seem to find exactly
what I am looking for. It might be so simple that it went right over
my head but on the other hand, I am not sure if this can be done using
JavaScript.

I currently have a photo restoration/retouching website. I normally
send my customers an email containing a proof of the retouched
photograph for their approval. Instead of emailing them the proof, I
would like them to be able to access their proof from my website. When
the photo is ready for approval, I would create an html page based on
the customer's telephone number and send them an email cotaining a
link to my website.
The customer would then access my web page called "customer proofs"
(for example). On that page, they would enter their telephone number
and after pressing enter, the popup window that I created previoulsy
will open, displaying the retouched photograph.
Is this possible to do with JavaScript or would I need to create some
type of database on my web server?

Thanks
Tom
 
R

Randy Webb

Tom said:
I have looked at many JavaScripts and I cannot seem to find exactly
what I am looking for. It might be so simple that it went right over
my head but on the other hand, I am not sure if this can be done using
JavaScript.

phoneNumber=prompt('Whats your phone number?','###-###-####');
document.location.href= 'http://pathToFiles/' + phoneNumber + '.html';
 
E

Evertjan.

Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:
phoneNumber=prompt('Whats your phone number?','###-###-####');
document.location.href= 'http://pathToFiles/' + phoneNumber + '.html';

Why do I get the feeling you think this is not an multinational NG ?
 
F

Fred Oz

Tom Jenkins wrote:
[snip]
... Instead of emailing them the proof, I
would like them to be able to access their proof from my website. When
the photo is ready for approval, I would create an html page based on
the customer's telephone number and send them an email cotaining a
link to my website.
The customer would then access my web page called "customer proofs"
(for example). On that page, they would enter their telephone number
and after pressing enter, the popup window that I created previoulsy
will open, displaying the retouched photograph.
[snip]

Why not use some randomly generated string to make the URL unique?
Something like "pageZX76jiX.hmtl" then include the link in the e-mail.
Your users then click on the link in the email (or copy and paste it)
to view the page.

Other issues this approach addresses:

1. How will you create multiple pages for a single customer that has
only one phone number?

2. How do you stop clients from entering other clients' phone numbers
to access their images?

To make your site much more secure, have you considered adding
usernames & passwords?

Cheers, Fred.
 
T

Tom Jenkins

Randy Webb said:
phoneNumber=prompt('Whats your phone number?','###-###-####');
document.location.href= 'http://pathToFiles/' + phoneNumber + '.html';


Thanks Randy - that is what I was looking for.
Fred: I know I can send an email with a link to a web page but I
wanted to set it up as described. As far as other users accessing
other photos that is not a problem and setting up a userid/password
system is not necessary at this time.

Thanks again.

Tom
 
R

Randy Webb

Evertjan. said:
Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:




Why do I get the feeling you think this is not an multinational NG ?

Of course, you are correct that ###-###-#### is not a uniquely
multinational format, but to date, I do not know of a multinational
format that is recognizable. I do assume that when people see "Whats
your phone number?" that they can reasonably assume I wanted a phone
number, even if the preexisting text is of a format that is foreign to them.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Wed, 29 Sep
2004 12:28:46, seen in Randy Webb
Of course, you are correct that ###-###-#### is not a uniquely
multinational format, but to date, I do not know of a multinational
format that is recognizable. I do assume that when people see "Whats
your phone number?" that they can reasonably assume I wanted a phone
number, even if the preexisting text is of a format that is foreign to them.

That display implies that the number is required to be ###-###-####, and
that the page has been written either purely for NA landline numbers, or
by a NAian who does not know any better. Or, of course, that the author
supposes that apart from NA landliners everyone will understand "Whats
your phone number?" (in spite of the missing apostrophe), but NA
landliners need further assistance.


Whenever a phone number is asked for, there should be an indication of
whether a local, national, or international number is expected. My
landline number could be +44 020 #### ####, or 020 #### ####, or just
#### ####, depending on context; and I have no idea what variation there
may be in mobile number formats.
 
L

Lee

Evertjan. said:
Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:


Why do I get the feeling you think this is not an multinational NG ?

This group is multinational, but relatively few web sites created
within the US are intended for multinational use. OP posted from
the US.
 
E

Evertjan.

Lee wrote on 30 sep 2004 in comp.lang.javascript:
This group is multinational, but relatively few web sites created
within the US are intended for multinational use. OP posted from
the US.

That is not why I get the feeling ;-}
 
T

Thomas 'PointedEars' Lahn

Tom said:
Randy Webb [...] wrote [...]:

Please do not post attribution novels.
Thanks Randy - that is what I was looking for.

However, document.location is deprecated, use window.location or just
location instead.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top