Member Avatar

Getting an empty drop-down list by the following code. Trying to fetch names from the department table. Using an oracle Database... <label for="department">Department</label> <select class="form-control" name="deptname" id="deptname"> <option selected disabled></option> <?php $dbUser = "..."; $dbPass = "..."; $dbConn = "(DESCRIPTION = (ADDRESS = (PROTOCOL=TCP)(HOST=...)(PORT=1521))(CONNECT_DATA=(SID=...)))"; $conn = oci_connect($dbUser, $dbPass, $dbConn); $sql = oci_parse($conn,"SELECT Department1.NAME FROM Department1"); oci_execute($sql, OCI_DEFAULT); ?> <?php while (oci_fetch($sql)) { ?> echo '<option value="<?php echo oci_result($sql, 'NAME')?>"></option> <?php }?> </select>

+0 forum 0
Member Avatar

I am using easyUI datagrid component and I'm trying to add bootstrap dropdown menu in a datagrid cell. The problem is when I click the dropdown button, the menu doesn't show. When moving the menu outside the cell, or remove the cell 'datagrid-cell' class, it works fine. No console errors shown. Here is the current HTML: <div style="height:auto;" class="datagrid-cell undefined"> <div class="select-grid-item-container"> <div class="select-grid-row select-grid-row-item options-active"> <div class="select-grid-options-dropdown"> <span class="select-grid-options" data-toggle="dropdown">Options</span> <ul class="dropdown-menu" role="menu"> <li role="presentation"> <a role="menuitem" tabindex="-1" href="#" class="send-email">Send Email</a> </li> </ul> </div> </div> </div> </div> Not sure if you any other details/code. Please do let me know …

+0 forum 0
Member Avatar

How can a table be updated in HTML with Dreamweaver using ASP on a dropdown functionality? I can only have the table bring in a table with the pageID of 1 and will not change when dropdown changes. How do I start the programming of getting every record with a specific pageID

+0 forum 0
Member Avatar

Dear forum , i am facing a problem when i try to populate my combobox item from a dropdownlist in html. my code is the following which executes witount errors: Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim I As Integer = 0 Dim NAME As String For I = 0 To 10 NAME = WebBrowser1.Document.GetElementById("dropdownlistid").GetAttribute("value") MessageBox.Show(NAME) ComboBox1.Items.Add(NAME) Next End Sub It doesnt display anything from the dropdownlist but it gives an error that index was out of range.

+0 forum 0
Member Avatar

Hi, I want to run php function using jquery ajax, Task is i have two dropdown(html select) **Filter_by_class.php** <form action="filter.php" method="POST" id="filter_students_form"> <div class="field"> <label for="stud_class_filter" class="cbx-lbl lbl-width">Select Class</label> <span class="dbl-dote">:</span> <select name="studclass_filter" id="stud_class_filter"> <option value="">-- SELECT STUDENT CLASS --</option> <?php if ($getStudentClass = $db->query("SELECT * FROM classes")) { if ($getStudentClass->num_rows) { while ($row = $getStudentClass->fetch_object()) { ?> <option value="<?php echo $row->classkey; ?>"><?php echo $row->standard; ?></option> <?php } } } ?> </select> </div> <div class="field"> <label for="stud_section_filter" class="cbx-lbl lbl-width">Select Section</label> <span class="dbl-dote">:</span> <select name="studsection_filter" id="stud_section_filter"></select> </div> <div class="textalignCenter"> <input type="submit" value="Submit" name="class_select" id="class_select" class="btn"> </div> </form> When i choose the …

+0 forum 0
Member Avatar

how can I select project from dropdown then execute query catching the value of the project selected I have the follow code using AJAX and JSP pages admin.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>index</title> <script> function showState(str){ var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("domain").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getProjects.jsp?q="+str,true); xmlhttp.send(); } </script> </head> <body> Domain : <select onchange="showState(this.value)"> <% …

+0 forum 0
Member Avatar

https://jsfiddle.net/chintu/wmv1jkh9/ Here is the link of code in jsfiddle. I want to add dropdown menu to the furniture and fumehood section in this dropdown menu.

+0 forum 0
Member Avatar

Do you know if it's possible to retrieve data from a dropdown list using bootbox? I'm at home so I don't have my code to post. Thanks.

+0 forum 0
Member Avatar

This is not my code/script all hardwork came from Codelair Full script located [here](http://doheth.co.uk/codelair/php-mysql/scoreboard) I really hope i posted this in the correct section because im unsure which code will work best for this. As the name for the script gives this away it is a scoreboard. allows admin to create questions and users to answer them with write in text field. so i was just messing around with this and am trying to have dropdown value to text field. as i can get this to work with the first question by asigning an id to the input type $HTML …

+0 forum 0
Member Avatar

In this each member has 3 type of project selection. if one member has selected "regular Project" then remaining types should be displayed in dropdown for each member. But here i tried with this code.. example i have 6 members, then 6 members can have 3 type of selections.. if i select "Regular Project" for 1'st member its selecting 6'th (last) member selection(FSA Project) is inserting into tables... i have a multiple member selection... i added image.. How to solve this issue? $sql1 = "SELECT Select_Type,Prj_Id,Status FROM PROJECT_ACTIVE WHERE Memr_Id='$q2[0]'"; $test = mysql_query($sql1); $s=0; while($test1 = mysql_fetch_array($test)) { if ( …

+0 forum 0
Member Avatar

Hello, I am using Yii framwork. What I want to do is, I have a dropdown and one button. on button click, i want to send selected value of dropdown in url. <div class='box'> Change to another Skill Type<br> // IT IS DROPDOWN WITH VALUES AND ID of this input ype is 'change_skill_type_name' <?php $form=$this->beginWidget('CActiveForm', array( 'htmlOptions'=>array( ), )); $selectedOptions= CHtml::listData(SkillType::model()->findAll(array('order' => 'skill_type')),'skill_type','skill_type'); echo $form->dropDownList(SkillType::model(),'skill_type',$selectedOptions, $htmlOptions=array('id'=>'change_skill_type_name','style'=>"width: 180px") ); $this->endWidget(); ?> </div> <!-- IN BELOW, I WANT VALUE OF b as VALUE FROM ABOVE DROPDOWN--> <a href='index.php?r=Manager_team/EditSkill&sk=<?php echo $skills_id;?>&b='> <? echo CHtml::button('Change', array('id'=>'change','confirm' => 'Change skill type?','onclick'=>'')); ?> </a> </div> what …

+0 forum 0
Member Avatar

I have one zend form.In this form i have on dropdown and blank div. In view page on dropdown change blank div fill another dropdown. I want to validate div's dropdown so that without selecting second dropdown form could not submit. Plz suggesssst any help

+0 forum 0
Member Avatar

me have 5 columns and one of them i wand to bind with dropdown list and one with chek box .how it is possible plz

+0 forum 0
Member Avatar

function makeSelection(icon, id) { if(!icon || !id) return; var elem = icon.elements[id]; if(!elem) return; var val = elem.options[elem.selectedIndex].id; opener.targetElement.value = val; this.close(); } this form used to select from a dropdown but i want to make it select from a click button <td>Icon1 Here<br /><input type="button" value="Select" id="1000" onclick="makeSelection(this.form, 'icon');"></td> here is an example of my site http://www.jamboozah.com/ its the icon feild with the [?] i have it set up with the drop down on the bottom once you fress the [?] button but i want it to use a button to select the id from the button to use …

+0 forum 0
Member Avatar

Hi I have a question with my code. I implemented drop down list populated from my oracle DB. So my question is, I need to populate the rest of the data into my <input type="number" min="currCutting" max="currQty" /> tag that pulled from the database according to the Head_mark selected from the DDL. Please help since I am a beginner in AJAX. Thanks, ?> <!DOCTYPE html> <html> <head> <title>Insert and Show Records using jQuery Ajax and PHP</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script> function OnSelectionChange(str){ // I need help to implement this method and pass them to the <input> tags below } // ===================================== …

+0 forum 0
Member Avatar

hi,,, i need question about populate table based on dropdown this my php file **kecamatan.php** <?php require 'config_db.php'; $self='kelurahan.php'; if (isset($_POST['action'])&&$_POST['action']=='edit'){ $namakelurahan = _post('namakelurahan'); if ($namakelurahan==''){ r2($self,'e','Nama kelurahan tidak boleh kosong'); } $id = _post('id'); $grp = ORM::for_table('kelurahan')->find_one($id); $grp->set('namakelurahan', $namakelurahan); $grp->save(); r2($self,'s','Perubahan data berhasil di lakukan'); } elseif (isset($_POST['action'])&&$_POST['action']=='delete'){ $trid = _post('trid'); $tr = ORM::for_table('kelurahan')->find_one($trid); if (!$tr){ r2($self,'e','Nama kelurahan tidak di temukan'); } $tr->delete(); r2($self,'s','Data berhasil di hapus'); } elseif (isset($_POST['action'])&&$_POST['action']=='add'){ $namakelurahan = _post('kelurahan'); if ($namakelurahan==''){ r2($self,'e','Nama kelurahan wajib diisi'); } $grp = ORM::for_table('kelurahan')->create(); $grp->namakelurahan=$namakelurahan; $grp->save(); r2($self,'s','kelurahan berhasil disimpan'); } else {?> <?php $query ="SELECT * from kecamatan"; $stmt = …

+0 forum 0
Member Avatar

Hello, when i click on option of dropdown box they could not select any option. Its working good in all other browsers.option coming through ajax. I have a problem in dropdown select option in IE11. see attached screenshot .Please help me someone to solve my problem. Thanks & Regards Nits

+0 forum 0
Member Avatar

i am trying to insert values in my dropdown list dynamically onclick of add button such that one row should be added with new dropdown with data. i have tried many logic but didnt work. <html> <head> <script language="javascript"> function addrow(tableID) { var table = document.getElementById(tableID); var rowcount = table.rows.length; var row = table.insertRow(rowcount); var cell1 = row.insertCell(0); var element1 = document.createElement("input"); element1.type = "checkbox"; element1.name = "chkbox[]"; cell1.appendChild(element1); var cell2 = row.insertCell(1); cell2.innerHTML = rowcount + 1; var cell3 = row.insertCell(2); var element2 = document.createElement("select"); element2.name = "Function[1]"; //element2 = init(); cell3.appendChild(element2); document.CountrySelect.Function[1].options[0] = new Option("Please select a Country …

+0 forum 0
Member Avatar

I created two dropdown which is filled with data fetched from mysql database by using the ajax and php function, Second dropdown is dependent on the first one and show relevant data. I placed both dropdown in adjacent to one another in table cell format. For the first row the dropdown elements fetched and it also shows relevant option to adjacent cells but while <HTML> <HEAD> <TITLE> Add/Remove dynamic rows in HTML table </TITLE> <script src="js/jquery.min.js"></script> <script src="js/add_table.js"></script> <script src="js/jquery.autocomplete.js"></script> <script src="js/jquery.min.js"></script> <SCRIPT language="javascript"> var xmlhttp; function ajaxFunction(url,myReadyStateFunc) { if (window.XMLHttpRequest) { // For IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new …

+0 forum 0
Member Avatar

Update form is working perfectly, but the value of $magentname variable changing to blank without selecting drop down box value. code: <?php require 'include/database.php'; require 'include/settings.php'; $id = null; if ( !empty($_GET['id'])) { $id = $_REQUEST['id']; } if ( null==$id ) { header("Location: sub-agents-list.php"); } $mainagentid = $_POST["mainagentid"]; $pdo = Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT * FROM agentreg where agentid = ?"; $q = $pdo->prepare($sql); $q->execute(array($mainagentid)); $data = $q->fetch(PDO::FETCH_ASSOC); $magentid=$data['agentid']; $magentname=$data['firstname']." ".$data['lastname']; Database::disconnect(); if ( !empty($_POST)) { // keep track validation errors $firstnameError = null; $lastnameError = null; $cityError = null; $mobno1Error = null; $mainagentidError = null; // keep …

+0 forum 0
Member Avatar

Hi, I've been working with Ruby on Rails to make a web application, but I've found something that I really cannot work out how to do with it, so it may be best if I do it manually. Basically, I've got a dropdown menu, that is populated with a list of projects. I want users to be able to select a project from that list, and then all the details appear below it in a table (2 rows, the headers and the info). How would I acheive this with AJAX? Any help anyone could give would be great, thanks!

+0 forum 0
Member Avatar

Hello, I am trying to create dynamic dropdown lists with PHP MySQL and AJAX. When a user selects a category from the first dropdown, the subcategory dropdown should populate with all the sub categories that belong to the selected category. I am using Fuel CMS as my framework. In my controller I have this code: $options = $this->sub_categories_model->find_all(array('cat_id'=>$catId), 'title asc'); $arr = array(); foreach($options as $opt): $arr[] = array('id'=>$opt->id, 'title'=>$opt->title); endforeach; In my view my html select: <select name="category" id="category"> <option value="6" label="Community">Community</option> <option value="1" label="For Sale">For Sale</option> <option value="2" label="Need a Lift">Need a Lift</option> <option value="3" label="Property">Property</option> <option value="5" …

+0 forum 0
Member Avatar

Hi All, Hope your all well Im really new to the world of JSP & AJAX, my question is, I need to retrive names from a database and present them to a user on a JSP form, but I shouldnt show any database interaction on the client end, So as far as Ive managed to work out so far, ill need a AJAX HTTP send request to initiate the collection of names, this send request should call a JSP function to connect and gather the names and store them in an array. then the JSP page should return the array …

+0 forum 0
Member Avatar

I want to list helpful instructions on my website for customers, specifically designed for them. I'd like for one of 16 images to appear below the 3 dropdown boxes, dependent on the values selected. The process can be instant or initiated with a submit button, but I'd like for the image space below to either be blank or defaulted as one image until all 3 options are selected. Is this possible? Any help would be great. Thanks! [CODE] <table border=3><tr><td> <table width=500><tr><td align="center"> I am <select name="players"> <option value="0">- select an entity -</option> <option value="1">a coach or team representative</option> <option …

+0 forum 0
Member Avatar

Hi, I have some difficulty with my 'select' In my select/menu, I display all the options come from a table (table_db_email) in my database In this table ([B]tb_code_prmtn11_email[/B]) I have two field : [B]fld_email_id fld_name_email[/B] It works here is a code [CODE]<select name="email_adress_menu" id="email_adress_menu" class="valid" onchange="submit()"> <?php echo "<option selected=\"selected\" value=''>Choose your name</option>"; $req_email_adress_menu = " select DISTINCT id_email, fld_name_email, fld_adresse_email FROM $table_db_email ORDER BY fld_name_email "; $rep_email_adress_menu = mysql_query($req_email_adress_menu, $cnx) or die( mysql_error() ) ; while($show_email_adress_menu = mysql_fetch_assoc($rep_email_adress_menu)) { echo '<option value="'.$show_email_adress_menu['id_email'].'"'; //if($primes==$show_email_adress_menu['fld_name_email']){echo " selected";} //display to select an option!!!!!!!!!!!!!!!! echo '>'.$show_email_adress_menu['fld_name_email'].' - '.$show_email_adress_menu['fld_adresse_email'].'</option>'; } ?> </select>[/CODE] I have …

+0 forum 0
Member Avatar

HI! I'm trying to make a form where a dropdown menu is populated from mysql. My code: [CODE=php]<? $link = mysql_connect('localhost', '****', '****'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('****'); mysql_set_charset("utf8"); $query="SELECT distinct first_name FROM names_table"; $result=mysql_query($query); ?> <select name="first_name" onChange=""> <option>Choose!</option> <? while($row=mysql_fetch_array($result)) { ?> <option value=<? echo($row['first_name'])?>><? echo($row['first_name'])?></option> <? } ?> </select> </select><br/>[/CODE] now what i'm trying to do is using the onChange property of select i want to populate a second drop down box (without reloading the page,i heard this is achieved with ajax) depending on the value from the first box now …

+0 forum 0
Member Avatar

Hey, Were I am stuck is with the jquery I have a form that is done in a form class and when an option is selected from the dynamically populated drop down menu I would like it to fill in the text boxes so they can be edited. I currently have: getfeed.php - the page that is connected to the javascript [CODE] <?php include('class/class.form.php'); include('class/class.users.php'); $iID = trim($_GET['extension']); if(!$iID) die('No User Data found.'); $getValues = new Extension(); $user_info = $getValues->getUsersInformation($iID); $sip_info = $getValues->getSipInformation($iID); //print_r($user_info); //print_r($sip_info); $array = $getValues->getUsersInformation($iID); echo '<br /><br />-- end of query --'; [/CODE] The Javascript [CODE]if(document.id('LoadExtension') …

+0 forum 0
Member Avatar

So I got help from here earlier with one problem and a few more have arisen, the biggest is for some reason my checkbox and dropdown array won't store the data and when it's supposed to check to verify there is at least 1 selected of each nothing happens... To be honest the ideal thing would be to have it check to see if the drop down size selection below the checkbox was selected, but I'll do whatever as long as it works. Thanks ahead of time for the help. Here's my page code: [code] <html> <HEAD> </head> <body> <?php …

+0 forum 0
Member Avatar

Hello, I am currently creating my first web program using Visual Studio 2008 (asp.net with c#) so am probably going about many things the wrong way, but it is to be expected! The issue in question: -I have a dropdownlist(ddl), which is populated from a SQLDataSource. -The text in the ddl is "ID : Firstname : Surname" (ie. concatenated fields from the db) -I would like to display the ddl at a set width on the page 'normally' (110px wide for example) and when the user selects (opens) the ddl it will increase in width to accomodate the longest item …

+0 forum 0
Member Avatar

I have a complex UI with little screen real estate, so I'm trying to allow users to manage contents of a combo box using a right-click context menu. But I'm having trouble getting the combo box's drop down list to appear at the same time as the pop-up menu. I've created a small program with just the relevant code to show where I've gotten so far. If anyone knows how to get the pop-up menu to appear on top of the combo box's drop-down list, I'd sure appreciate the help. [CODE] import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import …

+0 forum 0

The End.