Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2013
    Thanked 0 Times in 0 Posts

    Adding textbox value into href image link


    I have tried looking this up on the internet but i havent been able to find an exact answer.

    I would like the value from my text box to appear in the href link of a clickable image.
    The value from the textbox entry will be the IP address i want to browse to when clicking on the image.

    Here is my code so far;

    <table width="200" border="1">
        <td width="9">&nbsp;</td>
        <td width="104"><a href='index.php?ip='+form3.ip.value><img src="up.png" width="97" height="104" align="middle" /></a></td>
        <td width="65">&nbsp;</td>
    <td><form id="form3" name="form3" method="post" action="">
          <label for="ip"></label>
          <input name="ip" type="text" id="ip" value="" />
    When i click on the link it simply refreshes the current page and changes the url to localhost/index.php?ip=

    I also need this link not to open. In other words, once i have click on the image, i want to silently browse to the textbox value (ip address) in the background.

    All help would be appreciated. Im in mech engineering, and i need this to control a robot over wifi

    Thanks alot.

  2. AdSlot6
  3. #2
    New to the CF scene
    Join Date
    Feb 2013
    Thanked 0 Times in 0 Posts
    okay i have figured out how to open a link from a textbox.

    Although i still dont know how to open a webpage silently without a window opening.
    Any ideas? thanks

  4. #3
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Some say it's everything.
    Thanked 397 Times in 390 Posts
    When you say "silently" are you referring to something like AJAX?

    You could "silently" visit the page that way (and just discard the result) if your only goal is to essentially "ping" the server (or your robot's IP).
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  5. #4
    New to the CF scene
    Join Date
    Feb 2013
    Thanked 0 Times in 0 Posts
    I want it to load up the webpage in the background without displaying anything.

    For example, the link will be
    Where the forwards part will make the robot move forwards.
    I dont want to open a separate window every time i send a command to the robot.
    Im not sure if pinging the address would send the command. I could try though.
    How could this be implemented?
    thanks for the help


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts