Forum Moderators: mack

Message Too Old, No Replies

populate html form on mouse click

all ideas welcome!

         

baldrook

12:15 am on Jan 22, 2007 (gmt 0)

10+ Year Member



The problem is how to populate an html form from different hotspots on an image. I don't know any code but I can alter javascript a bit and would give PHP a try. I know nothing about databases like mySQL but whatever is simplest and best would be much appreciated. I use Dreamweaver for making my sites.

oscar

9:47 am on Jan 22, 2007 (gmt 0)

10+ Year Member



I'm not sure what you're after. Is this kinda doing what yout wanted?
(copy, paste, save as .htm-file, open in browser..)


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>my form</title>
</head>
<body>
<br /><br />
<form name="myform">
<input type="text" name="mytext">
</form>
<a href="#" onclick="document.myform.mytext.value='hello'; return false;">hello</a>
<a href="#" onclick="document.myform.mytext.value='bye'; return false;">bye</a>
</body>
</html>

baldrook

10:02 pm on Jan 22, 2007 (gmt 0)

10+ Year Member



Thanks oscar! That's just what I was looking for. The client wants to have customers click parts from an exploded diagram and have the order form fill automatically with part-numbers etc.