Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 16-09-2009
Member
 
Join Date: Sep 2009
Posts: 1
dynamic form with java & php

All,

I'm new @ programming with JavaScript. I have a form where a box must appear with the value of the select-field. I've had a script in html-format and it worked.
Now I want it to make dynamic with php and it doesn't work anymore.

Can anyone help me?

here's the code in the php-form:

<?
session_start();
?>
<head>
<title>Geschenk leden</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script language="Javascript">
<!--
function GetValue(ViewId,FillId,Field,SelectId)
{
x = document.lidgeschenk.elements[Field].selectedIndex;
y = document.lidgeschenk.elements[Field].options[x].text
z = document.getElementById(SelectId).value
if (y > waarde){
document.getElementById(ViewId).style.display = 'block';
document.getElementById(FillId).value = z;
}
else{
document.getElementById(id).style.display = 'none';
}
}
-->
</script>

<style type="text/css">
.verborgen{
display:none;
font-size:11px;
padding:4px;
}
</style>

</head>

<body>
<form id="lidgeschenk" name="lidgeschenk" method="post" action="geschenk.php">
<table><tr><td>Lid</td><td><select name="lid" id="lid" onChange="GetValue('View','Keuze',this.name,'')">
<option></option>

<?php
include('connect.inc.php');
$lidid="SELECT * FROM leden ORDER BY anaam, vnaam";
$lidres=mysql_query($lidid) or die(mysql_error());
while ($rij=mysql_fetch_array($lidres)){
$idlid=$rij['id'];
$anaam=$rij['anaam'];
$vnaam=$rij['vnaam'];
echo"<option value=$idlid>$anaam $vnaam</option>";
}
?>
</select></td></tr>
<div id="View" class="verborgen"><tr><td></td><td><input type="text" id="Keuze" ></input></td></tr>
<tr><td colspan=2><input name="sublid" type="submit" id="sublid" value="Kies lid" /></td></tr>
</div></table></from>
</body></html>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "dynamic form with java & php"
Thread Thread Starter Forum Replies Last Post
Dynamic and Static Polymorphism in Java Ardent Software Development 4 19-08-2010 03:37 PM
Java dynamic proxy Efigenio Software Development 4 27-02-2010 12:27 AM
Dynamic table in java New ID Software Development 5 21-02-2010 04:54 AM
Canvas Form in java Adrina_g Software Development 3 09-12-2009 09:29 AM
Add, Edit, Delete from one Form in SQL with ASP & JAVA Kanan Software Development 3 19-05-2009 09:53 AM


All times are GMT +5.5. The time now is 01:40 AM.