473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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

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
Jul 23 '05 #1
10 1421
Tom Jenkins wrote:
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';

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:
Tom Jenkins wrote:
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';


Why do I get the feeling you think this is not an multinational NG ?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 23 '05 #3
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.
Jul 23 '05 #4
Randy Webb <Hi************@aol.com> wrote in message news:<Y5********************@comcast.com>...
Tom Jenkins wrote:
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';

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
Jul 23 '05 #5
Evertjan. wrote:
Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:

Tom Jenkins wrote:

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';

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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #6
JRS: In article <f-********************@comcast.com>, dated Wed, 29 Sep
2004 12:28:46, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
Evertjan. wrote:
Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:
Tom Jenkins wrote:

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';

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.


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.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
Jul 23 '05 #7
Lee
Evertjan. said:

Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:
Tom Jenkins wrote:
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';


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.

Jul 23 '05 #8
Dr John Stockton wrote on 30 sep 2004 in comp.lang.javascript:
landline number could be +44 020 #### ####, or 020 #### ####,


+44 20

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 23 '05 #9
Lee wrote on 30 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.


That is not why I get the feeling ;-}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 23 '05 #10
Tom Jenkins wrote:
Randy Webb [...] wrote [...]:


Please do not post attribution novels.
phoneNumber=prompt('Whats your phone number?','###-###-####');
document.location.href= 'http://pathToFiles/' + phoneNumber + '.html';


Thanks Randy - that is what I was looking for.


However, document.location is deprecated, use window.location or just
location instead.
PointedEars
Jul 23 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: trpplayer | last post by:
Dear, I want to create an page where they have to enter ther name in an prompt. by the name they entered i want to open different html page's example: <SCRIPT LANGUAGE="JAVASCRIPT"...
3
by: Stuart E. Wugalter | last post by:
Hello All! I have a button on a form that is tied to the following query: UPDATE tblSEQTAQ AS A SET A.taqcall = WHERE (((A.taqcall)="Allele 1")); The user looks at the form and decides to...
2
by: ambersaria420 | last post by:
I need to prompt the user to enter ID. I can open up prompt fine using javascript code below. However I am not sure how to get value that user entered in user prompt window. I have to check this...
2
by: roz | last post by:
Hello, I'm fairly new to VB programming and I've been going round the bend with this problem, so any nudges or shoves in the right direction would be greatly appreciated. I have a template...
5
by: hcross | last post by:
This project is a web based html and Javascript site. I am working on mac at the moment. This script works except for attempting to open new window once complete. As you can see, i am new to...
2
by: samriti | last post by:
I have a text box in a page after entering some value and pressing enter a Pop-up window has to open and the Entered value in Main screen should be passed to a the Pop-up window. Also the Pop-up...
15
by: Mr.Tom.Willems | last post by:
Hello people, I am ussing an MS access database to enter and manage data from lab tests. until now i was the only one handeling the data so i had no need for a controle on how missing data was...
1
by: haelly | last post by:
write a program that prompts the user to enter three different positive integer values.If the values are not different, the program prints a message"equal value" and terminates(hint:use the return...
14
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor. I have one crosstab query (Query1) which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.