Click here to Skip to main content
16,011,743 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: FLASH 5 Pin
Mario_Young20-Apr-03 18:11
Mario_Young20-Apr-03 18:11 
GeneralFrame Contents Toggle Pin
DEWright_CA15-Apr-03 13:25
DEWright_CA15-Apr-03 13:25 
QuestionHow to transfer an array of data (retrived from database at server side) to client side variables? Pin
mkashifkkj15-Apr-03 10:40
mkashifkkj15-Apr-03 10:40 
AnswerRe: How to transfer an array of data (retrived from database at server side) to client side variables? Pin
Johan de Koning15-Apr-03 11:27
Johan de Koning15-Apr-03 11:27 
GeneralFor ASP 3.0 NOT ASP.NET Pin
mkashifkkj15-Apr-03 12:13
mkashifkkj15-Apr-03 12:13 
GeneralRe: For ASP 3.0 NOT ASP.NET Pin
Sarvesvara (BVKS) Dasa15-Apr-03 19:53
Sarvesvara (BVKS) Dasa15-Apr-03 19:53 
Generalyes Pin
mkashifkkj16-Apr-03 7:36
mkashifkkj16-Apr-03 7:36 
Generalthe code - it may help u Pin
Sarvesvara (BVKS) Dasa16-Apr-03 19:57
Sarvesvara (BVKS) Dasa16-Apr-03 19:57 
The following is the code for the dropdownlist... written in ASP to pump the html code. The first drop down is for the CITY, and the other for the CATEGOREY.


<br />
<%<br />
      Response.Write "<Select  name='City' onClick='redirect(this.options.selectedIndex)' onFocus='redirect(this.options.selectedIndex)' onChange='redirect(this.options.selectedIndex)'>"<br />
      Response.Write "<option value='Select'>Select City</option>"<br />
<br />
			for ii=1 to temp_rs.RecordCount<br />
      	if (Request ("srchCat") = temp_rs ("City")) then<br />
         	selOpt = "selected"<br />
         else<br />
         	selOpt = ""<br />
         end if<br />
         Response.Write "<option " & selOpt & " value='" & temp_rs ("City") & "'>" & temp_rs ("City") & "</option>"<br />
         temp_rs.MoveNext<br />
      next<br />
      <br />
      Response.Write "</select>"<br />
<br />
        Response.Write "<Select name='Category' size='1'>"<br />
        Response.Write "<option value='Select'>Select Category</option>"<br />
        Response.Write "</select>"<br />
<br />
%><br />


The following is the JSCRIPT and ASP combined stuff......

<br />
<br />
<script><br />
<!--<br />
	var groups = document.drsrchform.City.options.length<br />
	var group = new Array(groups)<br />
//  alert ("Hai");<br />
<br />
	for (i=0; i<groups; i++)<br />
		group[i]=new Array()<br />
<%<br />
	Dim curVal, cityCnt, catCnt, curCity<br />
	cityCnt = 1<br />
	catCnt = 0<br />
<br />
	set conn = Server.CreateObject("ADODB.Connection")<br />
	conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security Info=False;" & "Data Source=" &Server.MapPath(drDatabase)<br />
	Set temp_rs = Server.CreateObject("ADODB.RecordSet")<br />
	SqlStr= "SELECT distinct Category, City FROM DocDetails where Country='XXX' order by City"<br />
<br />
	temp_rs.Open SqlStr, conn, 1,3<br />
	curCity = temp_rs ("City")<br />
<br />
	Do While not temp_rs.EOF<br />
		curVal = temp_rs ("Category")<br />
		if (curCity <> temp_rs("City")) then<br />
			cityCnt = cityCnt + 1<br />
			catCnt = 0<br />
			curCity = temp_rs ("City")<br />
		end if<br />
%><br />
//		alert ("<%=curVal%>" + " <%=cityCnt%>" + " <%=catCnt%>");<br />
		group[<%=cityCnt%>][<%=catCnt%>] = new Option ("<%=curVal%>","<%=curVal%>");<br />
<%<br />
		catCnt = catCnt + 1<br />
		temp_rs.MoveNext<br />
	loop<br />
	set temp_rs=nothing<br />
	set Conn=nothing<br />
%><br />
	var temp=document.drsrchform.Category<br />
	function redirect(x)<br />
	{<br />
		for (m=temp.options.length-1;m>0;m--)<br />
			temp.options[m]=null<br />
		for (i=0;i<group[x].length;i++)<br />
		{<br />
			temp.options[i]=new Option(group[x][i].text,group[x][i].value)<br />
		}<br />
		temp.options[0].selected=true<br />
	}<br />
//--><br />
</script><br />
<br />


Please notice that... if there is ANY change in the name of the vars/anything... this wont wont work.

Have fun...

I was born intelligent
Education ruined me!.

GeneralBig decision... Pin
OmniGod010115-Apr-03 9:04
OmniGod010115-Apr-03 9:04 
GeneralRe: Big decision... Pin
Paul Watson15-Apr-03 21:53
sitebuilderPaul Watson15-Apr-03 21:53 
GeneralRe: Big decision... Pin
OmniGod010116-Apr-03 3:11
OmniGod010116-Apr-03 3:11 
GeneralRe: Big decision... Pin
alex.barylski23-Apr-03 19:24
alex.barylski23-Apr-03 19:24 
GeneralMusic in web page Pin
rosen15-Apr-03 7:48
rosen15-Apr-03 7:48 
GeneralRe: Music in web page Pin
perlmunger16-Apr-03 7:24
perlmunger16-Apr-03 7:24 
GeneralRe: Music in web page Pin
phaed021-Apr-03 7:15
phaed021-Apr-03 7:15 
GeneralProblem in Downloading file Pin
summo14-Apr-03 20:44
summo14-Apr-03 20:44 
Generalloading page from memory... Pin
Smoker14-Apr-03 10:51
Smoker14-Apr-03 10:51 
GeneralRe: loading page from memory... Pin
alex.barylski14-Apr-03 11:41
alex.barylski14-Apr-03 11:41 
QuestionHow to link to a ip address Pin
ballyduff14-Apr-03 7:35
ballyduff14-Apr-03 7:35 
AnswerRe: How to link to a ip address Pin
David Wulff14-Apr-03 7:46
David Wulff14-Apr-03 7:46 
GeneralRe: How to link to a ip address Pin
ballyduff14-Apr-03 8:14
ballyduff14-Apr-03 8:14 
AnswerRe: How to link to a ip address Pin
vishal S.21-Apr-03 1:10
vishal S.21-Apr-03 1:10 
QuestionCan I design a webserivce with c#,now I want use it with c++ and webservice have session state Pin
wxdwxd13-Apr-03 19:17
wxdwxd13-Apr-03 19:17 
GeneralASP - PHP Pin
Sarvesvara (BVKS) Dasa12-Apr-03 0:58
Sarvesvara (BVKS) Dasa12-Apr-03 0:58 
GeneralRe: ASP - PHP Pin
Paul Watson12-Apr-03 1:17
sitebuilderPaul Watson12-Apr-03 1:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.