Jump to content

sorex

Members
  • Posts

    34
  • Joined

  • Last visited

Posts posted by sorex

  1. I don't have your database but adapted your code with data coming from an array and here it works fine.<%regions=array("reg1","reg2","reg3","reg4","reg5","reg6","reg7")REGN_NM=Trim(request("regn_nm"))%><form method="get">Region <select name="regn_nm" onchange="submit();"><% for x=0 to ubound(regions) response.Write("<option") If regions(x) = regn_nm then response.write(" selected") end if response.Write(">") response.Write(regions(x))next%></select>

  2. it should work like that tho, atleast this one does at my side...<%randomize()r=rnd()if r>0.5 then%><!-- #include file="inc1.asp" --><%else%><!-- #include file="inc2.asp" --><%end if%> inc1.asp = <%=1%>inc2.asp = <%=2%>it prints 1 or 2 as supposed to be.

  3. that doesn't work due to the way it parses the code and include files the only way to deal with this is....<%randomize()r=rnd()if r>0.5 then%><!--#include file="include/file1.asp" --><%else%><!-- #include file="include/file2.asp" --><%end if%>

  4. It depends what games you're trying to do, but online flash games should be possible it's just a matter of sending/receiving data to/from the server. (combine flash with asp for example)

  5. It refers to the point, 'don't re invent the wheel every program you write'.
    Well, you lose a lot of challenges into programming.I've come a long way from several basic's (2.0/Q/...) > several assembler's (6502/8086/80x86) > TP/BP and kind of gave up when the Visual stuff came up due to the lack of challenges.I'm now stuck to messing around in asp/html/css/sql/actionscript etcalthough I'm seriously thinking of jumping onto the .net train but I just can't find a decent site that explains how that visual stuff works :)
  6. The problem I am having is, when you select the first dropdown box and the second dropdown populates from depending first selection, the first dropdown doesn't keep the selection that was made it goes back to the first option in the dropdown.  I am looking for a way to keep each selection that is made.

    that's because you didn't supply the value to the option so the result will always be nothing/empty, try the fix below<% do until object.EOF  response.Write("<option value='"&object.fields("regn_nm")&"'")  If object.fields("regn_nm") = regn_nm then  response.write(" selected")  end if  response.Write(">")  response.Write(object.fields("Regn_NM"))  object.Movenextloopobject.Closeset object=Nothing%>
×
×
  • Create New...