Results 1 to 1 of 1

Thread: [RESOLVED]insert a value thru another form

  1. #1

    Thread Starter
    Lively Member illebille's Avatar
    Join Date
    Sep 2003
    Posts
    77

    [RESOLVED]insert a value thru another form

    Hi,

    I have a html-file which contains several text-fields.
    Those fields must be filled in thru a "numeric keyboard"-form (i'm using a device with touch-screen, but without keyboard)

    I found out how to open this "keyboard"-form, and how to enter a value,
    but now I'm stuck on how to get the value in the proper text-field.

    some help would really be great !!

    thnx





    grr,

    I can't seem to add an attechment, so here's the code

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    	<head>
    		<title>VISION - test</title>
    		<script language="jscript">
    		<!--
    			var DOCNAME = "test.htm";
    			
    			/*************/
    			/*     GO    */
    			/*************/
    			function go()
    			{
    				var locatie = location.search;		
    				var undoCompress, path;
    				
    				var x = locatie.indexOf("+");
    				if (x == -1) 
    				{
    					path = locatie.substring(1, locatie.length);
    					if (path.length > 1)
    					{
    						//URL = 'DOCNAME?path'
    						Tekenen(1, path)
    					}
    					else
    					{
    						//URL = ''
    						//alert("ok");
    					}
    				}
    				else
    				{
    					//URL = 'DOCNAME?undoCompress+path'
    					undoCompress = locatie.substring(1, x);
    					path = locatie.substring(x + 1, locatie.length);
    				}
    				if (undoCompress == 1)
    				{
    					//not compressed
    					Tekenen(0, path)
    				}
    			}
    			
    			/*************/
    			/*	 DO-IT   */
    			/*************/
    			function doIt()
    			{
    				var fileName = document.Form1.filStops.value;
    				
    				//tandnummer
    				var MINDENTS = document.Form1.txtDentMin.value;
    				var MAXDENTS = document.Form1.txtDentMax.value;
    				
    				//filter
    				var UsedFilter, MINFILTER, MAXFILTER;
    				if (document.Form1.rdSpeed.checked == true)
    				{
    					UsedFilter = "speed";
    					MINFILTER = document.Form1.txtSpeedMin.value;
    					MAXFILTER = document.Form1.txtSpeedMax.value;
    				}
    				if (document.Form1.rdPos.checked == true)
    				{
    					UsedFilter = "pos";
    					MINFILTER = document.Form1.txtPosMin.value;
    					MAXFILTER = document.Form1.txtPosMax.value;
    				}
    				if (document.Form1.rdTime.checked == true)
    				{
    					UsedFilter = "time";
    					MINFILTER = document.Form1.txtTimeMin.value;
    					MAXFILTER = document.Form1.txtTimeMax.value;
    				}
    				if (document.Form1.rdPick.checked == true)
    				{
    					UsedFilter = "pick";
    					MINFILTER = document.Form1.txtPickMin.value;
    					MAXFILTER = document.Form1.txtPickMax.value;
    				}
    
    				//compressed
    				Tekenen(1, fileName, MINDENTS, MAXDENTS, UsedFilter, MINFILTER, MAXFILTER)
    			}
    			
    			/********************/
    			/* INGAVE-FORMULIER */
    			/********************/
    			function IngaveForm()
    			{
    				document.writeln("<html><head><title>Enter a value</title></head>");
    				document.writeln("<body>");
    				document.writeln("<form id='myForm' name='myForm'>");
    				document.writeln("<input id='txtIngave' type='text' style='font-size: large' disabled='true' size='21' /><br><br>");
    				document.writeln("<button style='width: 50px; height: 50px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 1'>1</button>");
    				document.writeln("<button style='width: 50px; height: 50px; margin-left: 10px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 2'>2</button>");
    				document.writeln("<button style='width: 50px; height: 50px; margin-left: 10px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 3'>3</button>");
    				document.writeln("<button style='width: 100px; height: 50px; margin-left: 20px' onclick='document.myForm.txtIngave.value = \"\" '>CLEAR</button>");
    				document.writeln("<br>");
    				document.writeln("<br>");
    				document.writeln("<button style='width: 50px; height: 50px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 4'>4</button>");
    				document.writeln("<button style='width: 50px; height: 50px; margin-left: 10px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 5'>5</button>");
    				document.writeln("<button style='width: 50px; height: 50px; margin-left: 10px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 6'>6</button>");
    				document.writeln("<br>");
    				document.writeln("<br>");
    				document.writeln("<button style='width: 50px; height: 50px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 7'>7</button>");
    				document.writeln("<button style='width: 50px; height: 50px; margin-left: 10px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 8'>8</button>");
    				document.writeln("<button style='width: 50px; height: 50px; margin-left: 10px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 9'>9</button>");
    				document.writeln("<br>");
    				document.writeln("<br>");
    				document.writeln("<button style='width: 50px; height: 50px' onclick='document.myForm.txtIngave.value = document.myForm.txtIngave.value + 0'>0</button>");
    				//send value to txtDentsMin : HOW ????
    				document.writeln("<input type='submit' style='width: 100px; height: 50px; margin-left: 140px' value='OK' />");
    				
    				document.writeln("</form>");
    				document.writeln("</body></html>");
    			}
    			
    			/*************/
    			/*  TEKENEN  */
    			/*************/
    			function Tekenen(compressFig, pathFile, minDents, maxDents, myFilter, minFilt, maxFilt)
    			{
    			}
    		//-->
    		</script>
    	</head>
    	
    	<body onload="go()">
    		<form id="Form1" name="Form1">
    			<div style="FONT-WEIGHT: bold; FONT-SIZE: x-large; COLOR: blue; TEXT-DECORATION: underline">INFO</div>
    			<br>
    			<b>Dents :</b>
    			<br>
    			min : <INPUT id="txtDentMin" type="text" name="txtDentMin" size="7" onclick="IngaveForm()">
    			&nbsp
    			max : <INPUT id="txtDentMax" type="text" name="txtDentMax" size="7">
    			<br><br><br>
    			
    			<INPUT id="rdSpeed" type="radio" value="rdSpeed" name="rdFilter"><b>Speed :</b>
    			<br>
    			min : <INPUT id="txtSpeedMin" type="text" name="txtSpeedMin" size="7">
    			&nbsp
    			max : <INPUT id="txtSpeedMax" type="text" name="txtSpeedMax" size="7">
    			<br>
    			<INPUT id="rdPos" type="radio" value="rdPos" name="rdFilter"><b>Position :</b>
    			<br>
    			min : <INPUT id="txtPosMin" type="text" name="txtPosMin" size="7">
    			&nbsp
    			max : <INPUT id="txtPosMax" type="text" name="txtPosMax" size="7">
    			<br>
    			<INPUT id="rdTime" type="radio" value="rdTime" name="rdFilter"><b>Time :</b>
    			<br>
    			min : <INPUT id="txtTimeMin" type="text" name="txtTimeMin" size="7">
    			&nbsp
    			max : <INPUT id="txtTimeMax" type="text" name="txtTimeMax" size="7">
    			<br>
    			<INPUT id="rdPick" type="radio" value="rdPick" name="rdFilter"><b>Pick :</b>
    			<br>
    			min : <INPUT id="txtPickMin" type="text" name="txtPickMin" size="7">
    			&nbsp
    			max : <INPUT id="txtPickMax" type="text" name="txtPickMax" size="7">
    			<br>
    			
    			<br><br>
    			<INPUT id="filStops" type="file" name="filStops" onchange="doIt()">
    		</form>
    	</body>
    </html>
    Last edited by illebille; Oct 24th, 2005 at 03:31 AM. Reason: attachment

Posting Permissions

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



Click Here to Expand Forum to Full Width