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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom Jenkins

    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

    #2
    Re: Can I enter data into a PROMPT and have it open a window basedon the value entered?

    Tom Jenkins wrote:
    [color=blue]
    > 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.[/color]

    phoneNumber=pro mpt('Whats your phone number?','###-###-####');
    document.locati on.href= 'http://pathToFiles/' + phoneNumber + '.html';



    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Evertjan.

      #3
      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.javas cript:
      [color=blue]
      > Tom Jenkins wrote:
      >[color=green]
      >> 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.[/color]
      >
      > phoneNumber=pro mpt('Whats your phone number?','###-###-####');
      > document.locati on.href= 'http://pathToFiles/' + phoneNumber + '.html';[/color]

      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)

      Comment

      • Fred Oz

        #4
        Re: Can I enter data into a PROMPT and have it open a window basedon the value entered?

        Tom Jenkins wrote:
        [snip][color=blue]
        > ... 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.[/color]
        [snip]

        Why not use some randomly generated string to make the URL unique?
        Something like "pageZX76jiX.hm tl" 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.

        Comment

        • Tom Jenkins

          #5
          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:<Y5OdnZKyd ssugMrcRVn-pw@comcast.com> ...[color=blue]
          > Tom Jenkins wrote:
          >[color=green]
          > > 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.[/color]
          >
          > phoneNumber=pro mpt('Whats your phone number?','###-###-####');
          > document.locati on.href= 'http://pathToFiles/' + phoneNumber + '.html';[/color]


          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

          Comment

          • Randy Webb

            #6
            Re: Can I enter data into a PROMPT and have it open a window basedon the value entered?

            Evertjan. wrote:
            [color=blue]
            > Randy Webb wrote on 26 sep 2004 in comp.lang.javas cript:
            >
            >[color=green]
            >>Tom Jenkins wrote:
            >>
            >>[color=darkred]
            >>>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 .[/color]
            >>
            >>phoneNumber=p rompt('Whats your phone number?','###-###-####');
            >>document.loca tion.href= 'http://pathToFiles/' + phoneNumber + '.html';[/color]
            >
            >
            > Why do I get the feeling you think this is not an multinational NG ?[/color]

            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.javas cript FAQ - http://jibbering.com/faq

            Comment

            • Dr John Stockton

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

              JRS: In article <f-OdnccADbItf8fcR Vn-hw@comcast.com> , dated Wed, 29 Sep
              2004 12:28:46, seen in news:comp.lang. javascript, Randy Webb
              <HikksNotAtHome @aol.com> posted :[color=blue]
              >Evertjan. wrote:[color=green]
              >> Randy Webb wrote on 26 sep 2004 in comp.lang.javas cript:[color=darkred]
              >>>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
              >>>>JavaScrip t.
              >>>
              >>>phoneNumber= prompt('Whats your phone number?','###-###-####');
              >>>document.loc ation.href= 'http://pathToFiles/' + phoneNumber + '.html';[/color]
              >>
              >>
              >> Why do I get the feeling you think this is not an multinational NG ?[/color]
              >
              >Of course, you are correct that ###-###-#### is not a uniquely
              >multinationa l 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.[/color]

              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.demo n.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)

              Comment

              • Lee

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

                Evertjan. said:[color=blue]
                >
                >Randy Webb wrote on 26 sep 2004 in comp.lang.javas cript:
                >[color=green]
                >> Tom Jenkins wrote:
                >>[color=darkred]
                >>> 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.[/color]
                >>
                >> phoneNumber=pro mpt('Whats your phone number?','###-###-####');
                >> document.locati on.href= 'http://pathToFiles/' + phoneNumber + '.html';[/color]
                >
                >Why do I get the feeling you think this is not an multinational NG ?[/color]

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

                Comment

                • Evertjan.

                  #9
                  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.javas cript:[color=blue]
                  > landline number could be +44 020 #### ####, or 020 #### ####,[/color]

                  +44 20

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

                  Comment

                  • Evertjan.

                    #10
                    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.javas cript:[color=blue][color=green]
                    >>Why do I get the feeling you think this is not an multinational NG ?[/color]
                    >
                    > This group is multinational, but relatively few web sites created
                    > within the US are intended for multinational use. OP posted from
                    > the US.[/color]

                    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)

                    Comment

                    • Thomas 'PointedEars' Lahn

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

                      Tom Jenkins wrote:
                      [color=blue]
                      > Randy Webb [...] wrote [...]:[/color]

                      Please do not post attribution novels.
                      [color=blue][color=green]
                      >> phoneNumber=pro mpt('Whats your phone number?','###-###-####');
                      >> document.locati on.href= 'http://pathToFiles/' + phoneNumber + '.html';[/color]
                      >
                      > Thanks Randy - that is what I was looking for.[/color]

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


                      PointedEars

                      Comment

                      Working...