Announcement

Collapse
No announcement yet.

Help with a form post, and redirect.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with a form post, and redirect.

    In this post here I have a way to dial with just a simple link. I have added this to my internal phone book pages allowing you to dial the number on a simple button click.

    Here is the code:
    PHP Code:
    <form action='https://secure.click2callu.com/tpcc/makecall' method='POST'>
    <
    input type='hidden' name='username' value='USERNAMEl'>
    <
    input type='hidden' name='password' value='PASSWORD'>
    <
    input type='hidden' name='fromnumber' value='19165551212'>
    <
    input type='hidden' name='tonumber' value='19165551212'>
    <
    input type='submit' value='Dial'>
    </
    form
    The problem I have is this navigates away from the current web page, which I don't want/see.

    My question is: Is there anyway to just do the URL without having the web user go there or see that page?

  • #2
    try target="_self"

    PHP Code:
    <form action='https://secure.click2callu.com/tpcc/makecall' method='POST' target="_self"
    <
    input type='hidden' name='username' value='USERNAMEl'
    <
    input type='hidden' name='password' value='PASSWORD'
    <
    input type='hidden' name='fromnumber' value='19165551212'
    <
    input type='hidden' name='tonumber' value='19165551212'
    <
    input type='submit' value='Dial'
    </
    form

    Comment


    • #3
      nope, _self made no difference. Still navigates to secure.click2callu.com page...

      Comment


      • #4
        Are you using and .asp page. I think the _Self only works for Server side scripts. Here is where i found that information http://www.4guysfromrolla.com/webtech/041399-1.shtml

        Comment


        • #5
          Try using an IFRAME

          Scott,

          Try submitting your form to hidden frame within your page. Here's an example:

          PHP Code:
           
          <iframe id="hiddenIFrame"
            
          name="hiddenIFrame"
            
          style="width:0px; height:0px; border: 0px"
            
          src="blank.html"></iframe>
           
          <
          form action='https://secure.click2callu.com/tpcc/makecall' method='POST' target="hiddenIFrame"
          <
          input type='hidden' name='username' value='USERNAMEl'
          <
          input type='hidden' name='password' value='PASSWORD'
          <
          input type='hidden' name='fromnumber' value='19165551212'
          <
          input type='hidden' name='tonumber' value='19165551212'
          <
          input type='submit' value='Dial'
          </
          form

          Comment


          • #6
            If you are using the homeseer, the hidden/I frame workaround would need to be used. If you are using IIS or Apache, then you can use the status: 204 HTTP spec to keep the page from updating. Search on the board for 204 to pick up the relevant info.
            Why I like my 2005 rio yellow Honda S2000 with the top down, and more!

            Comment


            • #7
              Originally posted by Will McQueen
              Scott,

              Try submitting your form to hidden frame within your page. Here's an example:
              This is the exact method I was looking for... it works perfectly... I knew someone here knew how to do this...

              Thanks a million!

              Comment


              • #8
                Excellent just what i was looking for aws well

                Comment

                Working...
                X