Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Can I enter data into a PROMPT and have it open a window based on the value entered? (http://www.velocityreviews.com/forums/t879751-can-i-enter-data-into-a-prompt-and-have-it-open-a-window-based-on-the-value-entered.html)

Tom Jenkins 09-26-2004 07:40 PM

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

Randy Webb 09-26-2004 07:51 PM

Re: Can I enter data into a PROMPT and have it open a window basedon the value entered?
 
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

Evertjan. 09-26-2004 07:55 PM

Re: Can I enter data into a PROMPT and have it open a window based on the value entered?
 
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)


Fred Oz 09-26-2004 10:49 PM

Re: Can I enter data into a PROMPT and have it open a window basedon the value entered?
 
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.

Tom Jenkins 09-27-2004 11:44 AM

Re: Can I enter data into a PROMPT and have it open a window based on the value entered?
 
Randy Webb <HikksNotAtHome@aol.com> wrote in message news:<Y5OdnZKydssugMrcRVn-pw@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

Randy Webb 09-29-2004 04:28 PM

Re: Can I enter data into a PROMPT and have it open a window basedon the value entered?
 
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

Dr John Stockton 09-30-2004 11:19 AM

Re: Can I enter data into a PROMPT and have it open a window based on the value entered?
 
JRS: In article <f-OdnccADbItf8fcRVn-hw@comcast.com>, dated Wed, 29 Sep
2004 12:28:46, seen in news:comp.lang.javascript, Randy Webb
<HikksNotAtHome@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)

Lee 09-30-2004 06:16 PM

Re: Can I enter data into a PROMPT and have it open a window based on the value entered?
 
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.


Evertjan. 09-30-2004 06:55 PM

Re: Can I enter data into a PROMPT and have it open a window based on the value entered?
 
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)


Evertjan. 09-30-2004 06:56 PM

Re: Can I enter data into a PROMPT and have it open a window based on the value entered?
 
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)



All times are GMT. The time now is 04:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.