472,353 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 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 1149

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...
0
by: raj | last post by:
Please Help with the combox DisplayValue property private void cboClient_SelectionChangeCommitted(object sender, System.EventArgs e) { String...
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...
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...
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...
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...
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...
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...
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...
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...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.