i just write code for select option in combo box which i m select but when i press search button and then click on back button then there in no option selected. and that same code working in ie7 and firefox so plz any 1 suggest me soluction quickly..
3 1948 acoder 16,027
Recognized Expert Moderator MVP
Can you post your code please.
Can you post your code please.
- <%
-
set dataConnection = Server.CreateObject("ADODB.Connection")
-
dataConnection.Open MAIN_DSN
-
-
sqlQuery = "EXEC sp_getCategories NULL"
-
set categoriesRS = dataConnection.Execute(sqlQuery)
-
-
if (not(categoriesRS.BOF and categoriesRS.EOF)) then
-
arrCategoriesDB = categoriesRS.GetRows()
-
-
arrcount = 0
-
for each fieldValue in categoriesRS.fields
-
fieldName = fieldValue.Name
-
Execute("fld_" & fieldName & " = arrcount")
-
arrcount = arrcount + 1
-
next
-
-
numCategoriesRows=ubound(arrCategoriesDB,2)
-
end if
-
-
set categoriesRS = nothing
-
-
firstCat1 = ""
-
if (thisCategoryID <> "") then
-
sqlQuery = "EXEC sp_getCategories " & thisCategoryID
-
set pathRS = dataConnection.Execute(sqlQuery)
-
-
index=0
-
for x=1 to 4
-
if (pathRS("CategoryID" & x) <> 0) then
-
index = index + 1
-
Execute("firstCat" & index & " = pathRS(""CategoryID" & x & """)")
-
end if
-
next
-
-
set pathRS = nothing
-
end if
-
-
' Function to create the a list of code for dynamic drop down javascript
-
function javaArray()
-
-
prevCat = ""
-
for rowcounter = 0 to numCategoriesRows
-
if (arrCategoriesDB(fld_CategoryID3,rowcounter) <> prevCat) then
-
prevCat = arrCategoriesDB(fld_CategoryID3,rowcounter)
-
strQuery = strQuery & "arrCat[" & prevCat & "] = """
-
-
for rowcounter2 = 0 to numCategoriesRows
-
if (arrCategoriesDB(fld_CategoryID3,rowcounter2) = prevCat) then
-
strQuery = strQuery & arrCategoriesDB(fld_CategoryName4,rowcounter2) & "#" & arrCategoriesDB(fld_CategoryID4,rowcounter2) & "||"
-
end if
-
next
-
-
strQuery = strQuery & """;"
-
end if
-
next
-
-
javaArray = strQuery
-
end function
-
-
%>
-
<script language="javascript">
-
var arrCat = new Array();
-
<%= javaArray() %>
-
function mmChangeContact(objFldParent,objFldChild, contact_caption)
-
{
-
var ContactList = arrCat[<%= firstCat1 %>];
-
clearList(objFldChild);
-
addElement(objFldChild, contact_caption, "");
-
-
if(ContactList)
-
{
-
-
var rgContacts = ContactList.split('||');
-
-
addElement(objFldChild, "Select All", "ALL");
-
for (var i = 0; i < rgContacts.length; i++)
-
{
-
if (rgContacts[i])
-
{
-
var rgContact = rgContacts[i].split('#');
-
addElement(objFldChild, rgContact[0], rgContact[1]);
-
}
-
}
-
-
objFldChild.disabled = false;
-
}
-
else
-
{
-
objFldChild.disabled = true;
-
}
-
-
//objFldChild.selectedIndex = 0;
-
-
}
-
-
function clearList(list)
-
{
-
var i = 0;
-
var o = list.options;
-
-
for (i = o.length; i >= 0; --i)
-
o[i] = null;
-
list.disabled = true;
-
}
-
-
function addElement(list, text_in, value_in)
-
{
-
var o = list.options;
-
var nIdx;
-
-
if (o.length < 0) //IE for Mac 4.5 sets length to -1 if list is empty
-
nIdx = 0;
-
else
-
-
nIdx = o.length;
-
-
o[nIdx] = new Option(text_in, value_in);
-
list.disabled = false;
-
}
-
-
function setDefaultByText(list, text_in)
-
{
-
with (list)
-
{
-
for (var i = 0; i < (options.length); i++)
-
{
-
if (options[i].text == text_in)
-
{
-
selectedIndex = i;
-
return;
-
}
-
}
-
}
-
}
-
-
function setDefaultByValue(list, value_in)
-
{
-
with (list)
-
{
-
for (var i = 0; i < (options.length); i++)
-
{
-
if (options[i].value == value_in)
-
{
-
selectedIndex = i;
-
return;
-
}
-
}
-
}
-
}
-
-
function validate(){
-
var objFld = document.EDITPRODUCT
-
var flagAffiliate = 0
-
-
if (objFld.Parent1.value != "")
-
{
-
objFld.CategoryID.value = objFld.Parent1.value
-
flagAffiliate = 1
-
}
-
-
if (objFld.Parent1.value == "")
-
{
-
alert("Please Select a Make");
-
return false;
-
}
-
/*if (objFld.Child.value == "")
-
{
-
alert("Please Choose a Vehicle Model");
-
return false;
-
}
-
if (objFld.GrandChild.value == "")
-
{
-
alert("Please Choose a Vehicle Model");
-
return false;
-
}*/
-
-
return true;
-
}
-
</script>
-
<%
-
if (Cint(catID) = CARS) then
-
MakeImage = "/auto_classifieds_images/sh_make.gif"
-
elseif (Cint(catID) = TRUCKS) then
-
MakeImage = "/auto_classifieds_images/sh_make.gif"
-
elseif (Cint(catID) = MOTORCYCLES) then
-
MakeImage = "/auto_classifieds_images/sh_make.gif"
-
elseif (Cint(catID) = BOATS) then
-
MakeImage = "/auto_classifieds_images/sh_boat.gif"
-
elseif (Cint(catID) = RVS) then
-
MakeImage = "/auto_classifieds_images/sh_make.gif"
-
elseif (Cint(catID) = SPECIALTY) then
-
MakeImage = "/auto_classifieds_images/sh_specialty.gif"
-
end if
-
%>
-
<input type="hidden" name="CategoryID" value="">
-
<tr>
-
<td width="100" align="right"><img src="<%= MakeImage %>" width="90" height="28" border="0"></td>
-
<td width="200"><select name="Parent1">
-
<option value="">----------- Select One -----------</option>
-
<option value="ALL">Select ALL</option>
-
<%
-
for rowcounter = 0 to numCategoriesRows
-
if (arrCategoriesDB(fld_CatParent4,rowcounter) = 0) then
-
selectThis = ""
-
if ( arrCategoriesDB(fld_CategoryID4,rowcounter) = firstCat1) then
-
selectThis = "selected"
-
end if
-
-
if arrCategoriesDB(fld_CategoryID4,rowcounter) <> 0 then
-
%>
-
<option value="<%= arrCategoriesDB(fld_CategoryID4,rowcounter) %>" <%=selectThis%>><%= arrCategoriesDB(fld_CategoryName4,rowcounter) %></option>
-
<%
-
end if
-
end if
-
next
-
%>
-
</select></td>
-
</tr>
-
<script language="javascript">
- <%
-
if (firstCat1 <> "") then
-
%>
-
mmChangeContact(document.EDITPRODUCT.Parent1,document.EDITPRODUCT.Parent1, '----------- Select One -----------');
-
setDefaultByValue(document.EDITPRODUCT.Parent1,'<%= firstCat1 %>')
-
<%
-
end if
-
-
if (firstCat2 <> "") then
-
%>
-
mmChangeContact(document.EDITPRODUCT.Parent1,document.EDITPRODUCT.Child, '----------- Select One -----------');
-
setDefaultByValue(document.EDITPRODUCT.Child,'<%= firstCat2 %>')
-
<%
-
end if
-
-
if (firstCat3 <> "") then
-
%>
-
mmChangeContact(document.EDITPRODUCT.Child,document.EDITPRODUCT.GrandChild, '----------- Select One -----------');
-
setDefaultByValue(document.EDITPRODUCT.GrandChild,'<%= firstCat3 %>')
-
<%
-
end if
-
-
if (firstCat4 <> "") then
-
%>
-
mmChangeContact(document.EDITPRODUCT.GrandChild,document.EDITPRODUCT.GreatGrandChild, '----------- Select One -----------');
-
setDefaultByValue(document.EDITPRODUCT.GreatGrandChild,'<%= firstCat4 %>')
-
<%
-
end if
-
%>
-
-
</script>
acoder 16,027
Recognized Expert Moderator MVP
Can you post the generated client-side source code instead (using code tags please).
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Gregory Piñero |
last post by:
Hi guys,
I'm trying to run this statement:
os.system(r'"C:\Program Files\Mozilla Firefox\firefox.exe"' + '
"www.blendedtechnologies.com"')
The goal is to have firefox open to that website.
When I type r'"C:\Program Files\Mozilla Firefox\firefox.exe"' + '
|
by: The Bicycling Guitarist |
last post by:
http://www.TheBicyclingGuitarist.net/css/index.css
I have red nav buttons that turn blue when hovered over and turn purple
after being visited. The red and blue work in FireFox, but not the visited
color. How can I fix this? It's always worked in MSIE cough cough.
It's for my index page http://www.TheBicyclingGuitarist.net/index.htm
|
by: Mark Olbert |
last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an
autopostback checkbox, for that matter).
I'm aware of a problem with Netscape browsers and the postback code, but I have a workaround for
that installed (and it looks like the code generated by ASP.NET when it renders the page does the
same thing, namely, setting document<). However, the
problem still exists under firefox.
Has anyone come...
|
by: Coder |
last post by:
Hi I have the following code in java script, it is not giving proper
output in FIREFOX but running fine in IE... can anybody help me out to
make this run in FIREFOX .
<script language="JavaScript">
var cntlName;
var eleTarget = document.getElementById('hiding');
function showOrHide(){
|
by: ajaysoniji |
last post by:
Hi,
I am using this code to read the option values from a select option. I am getting the reference of that select option in arg1. Its working fine with mozilla firefox but not with Internet Explorer. It gives the lenth but failing to read the arguments(Shown in bold). It gives the alert Internet Explorer 4 for IE and Netscape 5 for Mozilla firefox for the alert in line 4. Please Suggest as soon as possible how I can read the values of the...
| |
by: javakid |
last post by:
Hi
Following form validatioin code is working fine on IE but not working on Mozilla Firefox V2.
Can any body suggest?
Regards
<script ="JAVASCRIPT" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
|
by: CoolForU |
last post by:
this is my code and i call this code from code behinde file on page load
like this
useragree.Attributes.Add("onclick", "CheckSelection();")
this is working fine with IE but not working with fire fox.
in firefox i got error :
Error: CheckSelection is not defined
|
by: rajasree |
last post by:
Hi all,
am doing a project in PHP. my javascript code is working properly in ie. But its not working in firefox. Please help me
my code is as follows;
<script language="javascript" type="text/javascript">
function call()
{
var box=new Array(50);
|
by: Sura |
last post by:
Hi
I have a flash interactive window which has html links and this
appears on an html page. This window can be moved with the mouse on
the html page. The html page has an iFrame too. When the flash window
comes above the iframe area the html links stop working. Yet the links
remain active when the flash window is outside the iFrame area. This
problem is coming in Firefox, but running fine in IE.
If anybody has any solution, please...
|
by: Jenitha S |
last post by:
Hi,
I am working in JSP code.A Menubar is displayed in JSP page.It's working fine in IE. But in case of firefox the very first menuitem is not working.If i move that menu item as second means it's working fine.Can anyone help me on this.
XML code used:
<menubar key="menubar_home" url="Home.do"/>Home
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |