473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

related to combox

Hi,iright now i am facing one problem i.e...
in my asp page i have two combo on selection of first combo it is going filter data in second combo which is pick form database.my problem is that when select any item in both combo it not able to show selected item in combo...i am sending my code..any one help me...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Zafesoft-Acceptable Use Policy</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">

// This function used for selection of page combo selection.
function callme() {

alert("call1");
document.form1.action="EditCMS310507.asp";

document.form1.submit();

}
// This function used for selection of sub heading combo selection.
function callme1(form) {


// document.form1.action="EditCMS310507.asp";
alert("call2");
document.form1.action="EditCMS310507.asp";
document.form1.submit();



}
//Calling when update button is clicked...

function callother() {
//alert('call other called') ;
document.form1.action="UpdateCms310507.asp" ;
document.form1.submit();
}


function trim(strText)
{
// this will get rid of leading spaces
while (strText.substring(0,1) == ' ')
strText = strText.substring(1, strText.length);
// this will get rid of trailing spaces
while (strText.substring(strText.length-1,strText.length) == ' ')
strText = strText.substring(0, strText.length-1);
return strText;

while (strText.substring(strText.length-1,strText.length) == ' ')
strText = strText.substring(0, strText.length-1);
return strText;
}
function disagree()
{
input_box=confirm("Are you sure you want to cancel the update");
if (input_box==true)
{

window.location="EditCMS.aspx";
return false;
}
else
{
return false;
}
}


tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "table,save,advhr,advimage,advlink,emotions,iespel l,insertdatetime,preview,zoom,flash,searchreplace, print,contextmenu",
theme_advanced_buttons1_add_before : "save,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,sepa rator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator ",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print" ,
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|h eight|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
external_link_list_url : "example_data/example_link_list.js",
external_image_list_url : "example_data/example_image_list.js",
flash_external_list_url : "example_data/example_flash_list.js",
width:"460"
});
</script>


<%
''''''''''''''''''''''''Page header''''''''''''''''''''''''''''''''''
'Fill combo for pagename and with page name combo
Dim pagename ,SQL2 ,pagecombo ,getvaluetest
Set db = Server.CreateObject("ADODB.Connection")
db.Open Session("ConnectionString")
SQL2="select pageid,pagename from pagedetails"
set rs1=db.execute(SQL2)
''''''''''''''''''''''''Subheading Header....''''''''''''''''''''''''''''''''''
Dim pageheaderid ,Subheader ,SQl4
Combovalue=request("page_id")
Set db = Server.CreateObject("ADODB.Connection")
db.Open Session("ConnectionString")
SQl4="select Cmsid,subheading from CMSMst where pageid='"& Combovalue &"'"
set rs2=db.execute(SQl4)
''''''''''''''''''''''''Data fetch on selection of Combo''''''''''''''''''''''''''''''''''
Dim Combovalue ,getvalue,subheaderid,sql,subCombovalue ,sql6
session("Combovalue")=request("page_id")
Combovalue=session("Combovalue")
subCombovalue=request("AddSubHeader")
Set db = Server.CreateObject("ADODB.Connection")
db.Open Session("ConnectionString")
If (subCombovalue) <> "" Then
SQL6="select Contents from CMSMst where Cmsid='"& subCombovalue &"' "
set rs=db.execute(SQL6)
If Not rs.EOF Then
getvalue=rs("Contents")
End If
Else
set rs=db.execute("select pagecontent from pagedetails where pageid='"& Combovalue &"'")
If Not rs.EOF Then
getvalue=rs("pagecontent")
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''
%>

</head>
<body>
<form name="form1" method="post" action="UpdateCms310507.asp">
<table width="760" class="main" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><table width="750" class="inner" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" class="logo"><a href="index.html"><img src="images/Logo.jpg" width="159" height="115" border="0" title="Logo"/></a></td>
<td class="logo_text"><img src="images/logo_text.jpg" width="527" height="27" align="left" /></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" class="top_nav_bg"><table width="80%" class="top_nav" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="nav_circle_02">&nbsp;</td>
<td class="nav_text"><a href="index.html" class="two">Home</a></td>
<td class="nav_circle_02">&nbsp;</td>
<td class="nav_text"><a href="product.html" class="two">Product</a></td>
<td class="nav_circle_02">&nbsp;</td>
<td class="nav_text"><a href="solutions.html" class="two">Solutions</a></td>
<td class="nav_circle_02">&nbsp;</td>
<td class="nav_text"><a href="partnership.html" class="two">Partnership</a></td>
<td class="nav_circle_02">&nbsp;</td>
<td class="nav_text"><a href="about_us.html" class="two">About</a></td>
<td class="nav_circle_02">&nbsp;</td>
<td class="nav_text"><a href="http://74.52.134.18:8080/zafesoft/" class="two">Login</a></td>
<td class="nav_circle_02">&nbsp;</td>
<td class="nav_text"><a href="contact_us.html" class="two">Contact</a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"><table width="750" class="maincontent_box" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="top_curve">&nbsp;</td>
</tr>


<tr>
<td align="center" class="mid_bg"><table class="inner_contentbox" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table class="inner_contentbox" border="0" cellspacing="0" cellpadding="0">

<tr>
<td><table width="92%" border="0" align="center" cellpadding="0" cellspacing="0" class="form">
<tr>
<td colspan="2"><h2 class="header">Content Management System </h2></td>
</tr>
<tr>
<td width="13%">&nbsp;</td>
<td width="87%">&nbsp;</td>
</tr>
<tr>
<td align="left"> Page name:<span>*</span></td>


<td align="left"><select name="page_id" onchange="callme(this.form.page_id.value);" mandatory='true' class="text">
<option value="">--Select Page--</option>
<%
do while not rs1.eof%>
<option value="<%=rs1("pageid")%>" <%if request.Form("page_id") =rs1("pageid") then response.Write(" selected")%>><%=rs1("pagename")%></option>
<%rs1.moveNext
loop%>


</select> </td>
</tr>
<tr>
<td align="left">Add SubHeader: </td>
<td align="left">
<select name="AddSubHeader" onchange="callme1(this.form);">

<option value="">Add SubHeader</option>
<option value="">=============</option>
<%
do while not rs2.eof%>
<%session("Subcombovalue")=rs2("Cmsid")
abc=session("Subcombovalue")%>
<option value="<%=rs2("Cmsid")%>" <%if request.Form("AddSubHeader") =rs2("Cmsid") then response.Write(" selected")%>><%=rs2("subheading")%></option>
<%rs2.moveNext
loop%>

</select> </td>
</tr>
<tr>
<td>Sub Heading Title:</td>
<td><input name="SubHeadingTitle" class="instyle" type="text" id="SubHeadingTitle" value=""/></td>
</tr>
<tr>
<td>Description:<span>*</span></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2"><textarea name="txtDescription" style="width: 406px; height: 346px"><%=getvalue %></textarea></td>
</tr>

<input type = "hidden" value ="<%=Combovalue %>" name="pageid">
<input type = "hidden" value ="<%=getvalue %>" name="cmsid">

<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%"><input name="Update" type="submit" id="Update" value="Update" onclick="callother();"/></td>
<td width="90%"><input name="Cancel" type="submit" id="Cancel" value="Cancel" /></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>

</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bottom_curve">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="center"><table width="80%" class="footer" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.html" class="one">Home</a> | <a href="solutions.html" class="one">Solutions</a> | <a href="Support.html" class="one">Support</a> | <a href="request_product_information.html" class="one">Request Info</a> | <a href="careers.html" class="one">Careers</a> | Acceptable Use Policy |<a href="privacy_policy.html" class="one"> Privacy Policy</a> | <a href="terms_of_use.html" class="one">Terms Of Use</a> | <a href="#" class="one">FAQ</a> | <a href="#" class="one">News</a></td>
</tr>
<tr>
<td class="footer_copyright">2007-ZafeSoft. All rights reserved</td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
Jun 4 '07 #1
0 1180

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: VIJAY KUMAR | last post by:
Hi all, I have a problem with combobox. I have 2 comboxes cmbcategory and cmbsubcategory. I intialized cmbcategory with sum values from database on Form_Load. when i select a vlue from the...
0
by: raj | last post by:
Please Help with the combox DisplayValue property private void cboClient_SelectionChangeCommitted(object sender, System.EventArgs e) { String strSQL; strSQL = "SELECT F.FollowUpPerson FROM...
4
by: Charles A. Lackman | last post by:
Hello, I have a combox that I am trying to get to work in the following fashion. As you type in the combox that the item that matches what you are type is selected. as you type a last name:...
3
by: Alpha | last post by:
This is a Window based application. How do I get my combox listing to display in sorted order by DataMember? I inserted a blank row to the dataset table which is the datasrouce for the comboBox...
2
by: Bob | last post by:
The scenario is that of the employees table wherein there's an EmployeeId and a ReportsTo field in the same table. The combobox is one in a datagrid view that lets you select an employee from the...
0
by: kolalakitty | last post by:
Hopefully someone here can help me/point me in the right direction. I've found tons of references towards making relations, creating rows, saving said rows, using datagrids, databinding objects,...
1
by: neo1ra | last post by:
Hi, I'm doing a search combox to pop up and specific record. Everything is working fine until I make a change to the record that I'm working on and try to move to other record. A error message...
2
by: summiyashaheen | last post by:
how to read the valuemember of the combox whose data source is a detaset. i have assigned the properties of displaymember and valuemember . display member cis visible but i cant get the value member...
1
by: dewgan | last post by:
I have a form with a combox box where the list is populated via a linked table. This works fine. I have a text box that is filled with the name selected in the combox box. That name is then added...
2
by: kolik | last post by:
Hello. Is there anybody who can give me an explanation, why the actual width of the textboxes in my two examples is different? (Second example is missing a DocType declaration.) After that, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.