Can javascript do this?

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

    Can javascript do this?

    I have a text pager, at http://sbc2way.com/web_instruct.html it sez.


    The send message page will also take inline parameters from the URL that is

    referenced with the page when it is loaded in your browser. You can supply
    1,2 or 3

    parameters in any order, depending on your needs. The parameters that are
    accepted

    are:
    'pager=63055512 12' where the number is the 10 digit pager number
    'from=From Message' where the from message is limited to 16 characters
    'text=body of text message...' where the body + from message is limited to
    800

    characters
    In order to use this feature you need to make a link (shortcut) to the web
    send

    message page. An example link would look like this:


    Me&text=This is

    the text of a test message.

    If you click on the above like you can see how it fills in these values to
    the web

    send message page.

    * * * *

    Is it possable to us javascript on a webpage with forms to make this
    work?

    Wikten


  • Nik Coughin

    #2
    Re: Can javascript do this?

    wikten wrote:[color=blue]
    >An example link would look like this:
    >
    > http://www.sbc2way.com/web_sendmsg.h...1212&from=From
    > Me&text=This is
    >
    > the text of a test message.
    >
    > Is it possable to us javascript on a webpage with forms to make
    > this work?
    >
    > Wikten[/color]

    You don't need JS, just this HTML:

    <form action="http://www.sbc2way.com/web_sendmsg.htm l" method="post">
    pager: <input type="text" id="pager"><br >
    from: <input type="text" id="from"><br>
    text: <input type="text" id="text"><br>
    <input type="submit" value="Send"> <input type="reset">
    </form>


    Comment

    • wikten

      #3
      Re: Can javascript do this?

      I will give that a try. Thank You for your help.

      Wikten

      "Nik Coughin" <nrkn!no-spam!@woosh.co. nz> wrote in message
      news:ljtZc.2067 7$N77.868592@ne ws.xtra.co.nz.. .[color=blue]
      > wikten wrote:[color=green]
      >>An example link would look like this:
      >>
      >> http://www.sbc2way.com/web_sendmsg.h...1212&from=From
      >> Me&text=This is
      >>
      >> the text of a test message.
      >>
      >> Is it possable to us javascript on a webpage with forms to make
      >> this work?
      >>
      >> Wikten[/color]
      >
      > You don't need JS, just this HTML:
      >
      > <form action="http://www.sbc2way.com/web_sendmsg.htm l" method="post">
      > pager: <input type="text" id="pager"><br >
      > from: <input type="text" id="from"><br>
      > text: <input type="text" id="text"><br>
      > <input type="submit" value="Send"> <input type="reset">
      > </form>
      >
      >[/color]


      Comment

      • wikten

        #4
        Re: Can javascript do this?

        I tryed this, here is the page http://home.att.net/~wikten/test.html .
        it failed.



        Method Not Allowed
        The requested method POST is not allowed for the URL /web_sendmsg.htm l.


        --------------------------------------------------------------------------------

        Apache/1.3.22 Server at www.sbc2way.com Port 80


        So what do you think, can javascript do it?
        Wikten
        [color=blue]
        > You don't need JS, just this HTML:
        >
        > <form action="http://www.sbc2way.com/web_sendmsg.htm l" method="post">
        > pager: <input type="text" id="pager"><br >
        > from: <input type="text" id="from"><br>
        > text: <input type="text" id="text"><br>
        > <input type="submit" value="Send"> <input type="reset">
        > </form>
        >
        >[/color]


        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: Can javascript do this?

          Nik Coughin wrote:
          [color=blue]
          > wikten wrote:[color=green]
          >> An example link would look like this:
          >>
          >> http://www.sbc2way.com/web_sendmsg.h...1212&from=From
          >> Me&text=This is the text of a test message.
          >>
          >> Is it possable to us javascript on a webpage with forms to make
          >> this work?[/color]
          >
          > You don't need JS, just this HTML:
          >
          > <form action="http://www.sbc2way.com/web_sendmsg.htm l" method="post">
          > pager: <input type="text" id="pager"><br >
          > from: <input type="text" id="from"><br>
          > text: <input type="text" id="text"><br>
          > <input type="submit" value="Send"> <input type="reset">
          > </form>[/color]

          1. A form element requires a _name_ (attribute value) to be submitted:
          <http://www.w3.org/TR/html4/interact/forms.html#h-17.2>

          2. To result in the above URL, the method must be GET (the default),
          not POST.

          3. Since this is tabular data, it is reasonable to use a table (element)
          here.

          Minimal CSS code:

          th {
          text-align:left;
          }

          Minimal HTML code:

          <form action="http://www.sbc2way.com/web_sendmsg.htm l">
          <table>
          <tr>
          <th>Pager:<th >
          <td><input name="pager"></td>
          </tr>

          <tr>
          <th>From:</th>
          <td><input name="from"></td>
          </tr>

          <tr>
          <th>Text:</th>
          <td><input name="text"></td>
          </tr>
          </table>

          <input type="submit" value="Send">
          <input type="reset" value="Reset">
          </form>


          PointedEars
          --
          Never test the depth of the water with both feet.

          Comment

          • wikten

            #6
            Re: Can javascript do this?

            Mr. Thomas Lahn:
            That WORKED. I got to tweak it a little bit, but I am in the door.
            Thank you for the help kind sir.
            Wikten
            --

            "Thomas 'PointedEars' Lahn" <PointedEars@we b.de> wrote in message
            news:1109741.PT IjNn0rda@Pointe dEars.de...[color=blue]
            >
            > 1. A form element requires a _name_ (attribute value) to be submitted:
            > <http://www.w3.org/TR/html4/interact/forms.html#h-17.2>
            >
            > 2. To result in the above URL, the method must be GET (the default),
            > not POST.
            >
            > 3. Since this is tabular data, it is reasonable to use a table (element)
            > here.
            >
            > Minimal CSS code:
            >
            > th {
            > text-align:left;
            > }
            >
            > Minimal HTML code:
            >
            > <form action="http://www.sbc2way.com/web_sendmsg.htm l">
            > <table>
            > <tr>
            > <th>Pager:<th >
            > <td><input name="pager"></td>
            > </tr>
            >
            > <tr>
            > <th>From:</th>
            > <td><input name="from"></td>
            > </tr>
            >
            > <tr>
            > <th>Text:</th>
            > <td><input name="text"></td>
            > </tr>
            > </table>
            >
            > <input type="submit" value="Send">
            > <input type="reset" value="Reset">
            > </form>
            >
            >
            > PointedEars
            > --
            > Never test the depth of the water with both feet.[/color]


            Comment

            Working...