Jump to content

dropdown list box and a close button inside


sayedsohail

Recommended Posts

Hi everyone,

 

I am able to populate data in a dropdown list box using php and mysql.

 

However, I a wondering if i can add inside some icons such as close or More records,  where the drop down acts to the specified request, ie., closing the drop down or fetching  some more data from backend.

 

Any advise would be greatly appreciated.

 

Thanks,

 

here is code, which i wish to populate right at the bottom of the input field coordinates.

 

<?php
session_start();
require_once("db.php");
?>
<html>
<head>
<script type="text/JavaScript">
// script for popup window

function doStuff()
{
   /* If you use this to open a popup window and want to refer the value from
   parent window.
   
   var tb1=window.opener.document.getElementById('tb1'); */
   
   
   var tb1=document.getElementById('tb1');

   var s=document.getElementById('sel1');
   tb1.value=s.options[s.selectedIndex].value;
   
   
   // if you want to close the popup window window.close();
}
</script>
</head>
<select id="sel1">
   <option value="option1">Option 1</option>
   <option value="option2">Option 2</option>
   <option value="option3">Option 3</option>
</select>
...
<input type="button" value="Close" onClick="doStuff();" />

<input type="text" id="tb1" />
</html>

<?
mysql_close($conn); 
require_once("footer.php");
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.