submit a form and get json response
Posted
by
ruhit
on Stack Overflow
See other posts from Stack Overflow
or by ruhit
Published on 2010-12-24T07:44:59Z
Indexed on
2010/12/30
14:54 UTC
Read the original article
Hit count: 192
php5
I have made an application to convert text to image formate and its workingout well. Now I want json response when i fill the form of the html page, my html page is given below...Please help me to do this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>kandarpa</title>
</head>
<div>
<form action="img.php" method="get"><b>enter your text here:</b><br/>
<textarea id="text" name="text" style=" background-color:inherit" cols="50" rows="10"></textarea><br/><br/>
<input type="submit" value="Text to Image" name="submit">
</div><br/>
<div>
<tr>
<td>Font Size</td>
<td><select name="size">
<option value="8">8</option>
<option value="12">12</option>
<option value="18">18</option>
<option value="24">24</option>
<option value="32" selected="selected">32</option>
<option value="48">48</option>
<option value="64">64</option>
</select></td>
</tr>
</div><br/>
<div>
<td>Font </td>
<td><select name="font" id="font">
<option value="Fonts/arial.ttf">Arial</option>
<option value="Fonts/times.ttf">Times New Roman</option>
<option value="Fonts/tahoma.ttf">Tahoma</option>
<option value="Fonts/Grand Stylus.ttf">Grand Stylus</option>
<option value="Fonts/GARAIT.ttf">G</option>
</select></td>
</tr>
</div><br/>
<div>
<td>Choose your Color </td>
<td><select name="color" id="color">
<option value="white">white</option>
<option value="black">black</option>
<option value="grey">grey</option>
<option value="red">red</option>
</select></td>
</tr>
</div>
<br/>
<div>
<td>Height </td>
<input type="text" id="height" name="height">
</td><br/><br/>
<td>Width</td>
<input type="text" id="width" name="width">
</div>
</form>
</body>
</html>
© Stack Overflow or respective owner