Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-17-2013, 09:44 PM   PM User | #1
stevemilw
New to the CF scene

 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
stevemilw is an unknown quantity at this point
Adding textbox value into href image link

Hello

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;

Code:
<body>

<table width="200" border="1">
  <tr>
    <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>
  </tr>
<td><form id="form3" name="form3" method="post" action="">
      <label for="ip"></label>
      <input name="ip" type="text" id="ip" value="192.168.0.2" />
    </form></td>
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.
stevemilw is offline   Reply With Quote
Old 02-17-2013, 11:46 PM   PM User | #2
stevemilw
New to the CF scene

 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
stevemilw is an unknown quantity at this point
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
stevemilw is offline   Reply With Quote
Old 02-18-2013, 01:41 PM   PM User | #3
Rowsdower!
Senior Coder

 
Rowsdower!'s Avatar
 
Join Date: Oct 2008
Location: Some say it's everything.
Posts: 2,007
Thanks: 5
Thanked 395 Times in 388 Posts
Rowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura about
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
Rowsdower! is offline   Reply With Quote
Old 02-18-2013, 08:48 PM   PM User | #4
stevemilw
New to the CF scene

 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
stevemilw is an unknown quantity at this point
I want it to load up the webpage in the background without displaying anything.

For example, the link will be 192.168.0.2/?forwards
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
stevemilw is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:28 PM.


Advertisement
Log in to turn off these ads.