Jump to content

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");
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.