Jump to content

bairdb

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by bairdb

  1. bairdb

    Content-Type problem

    I got this working by adding a second xmlHTTP request to handle the response from the FedEx server and send it as content-type xml.
  2. I am working with FedEx's FSM Api. Basically I have set up an http request with ASP, it sends the content I need fine and it will return data if I use responseText. My problem is that if I try to use responseXML, it won't let me access the returned xml with xmlDom because FedEx's server is retruning their data with a content type of image/gif. Is there any way with asp to get around this, say change the content type of the returned data myself?
  3. bairdb

    Sending Email

    Is is possible to attach a file from a users local hard drive to an email that is being sent from the server?
  4. I guess what I am really asking is if you can connect to a mysql database without having a third party bridge or ODBC.net.
  5. I have been looking around to try and find a how to connect to a mysql database with asp.net but I am not finding any good examples. Can anyone help me with this problem?
  6. If you make a javascript function that changes the visibility of your div you can call that function from inside your flash movie.
  7. I am trying to create a dynamic graph with flash 8. I know how to apply values to my bars in my bar chart so they will resize depending on the value of my variables but I need my variables to be from an external source preferablly an asp page. Can anyone explain how to do this?
  8. bairdb

    Bending Lines

    All you need to do to bend lines is after you create the line, click on the black arrow tool. Put the cursor in the middle of the line until you see a little curve underneath the arrow, then all you have to do is just bend the line as much as you want.
  9. bairdb

    Movie Clip Help

    You will probably have to update the paths to your instanced movie clips inside your mc_nav movie clip.Here is an example, just add mc_nav before the movie clip that you are trying to access. mc_nav.your_mc.gotoAndPlay(1);
  10. bairdb

    flash button

    What you will have to do is make each button you want a different symbol, otherwise you are just editing the same symbol for each button.
  11. bairdb

    Flash Menue

    Are you trying to make a dropdown menu/submenu?
  12. bairdb

    flash

    How Big is you the stage of your flash file? If you want to position your .swf in an html page all you have to do is use a DIV tag and position it where you want.
  13. Make the image that you are using for your button a Button Symbol. All you have to do is click on your image and press F8 and then name it and choose the Button option and hit ok, then your code should work fine.
  14. <%set object = Server.CreateObject("ADODB.Recordset")sql="SELECT DISTINCT Sales_St_Nm FROM SalesStateRetention WHERE subline<>'Grand Total' Order By Sales_St_Nm"object.open sql, connSales_St_Nm=request.QueryString("Sales_St_Nm")%><div style="position:absolute; top:0%; left:0%; font-weight:bold"><form method="get"><table cellspacing="0" width="100%" height="2%" bgcolor="#999999" border="1"><tr style="color:#FFFFFF;; background-color:#2A436C"><td><select name="Sales_St_Nm" onchange="submit();"><option>Select a Type</option><% do until object.EOF response.Write("<option") If object.fields("Sales_St_Nm") = Sales_St_Nm then response.write(" selected") end if response.Write(">") response.Write(object.fields("Sales_St_Nm")) object.Movenextloopset object=Nothing%></select></td></tr></table></form><%if Sales_St_Nm<>"" thenset object = Server.CreateObject("ADODB.Recordset")sql="SELECT * FROM SalesStateRetention WHERE Sales_ST_NM='"& Sales_St_Nm &"' AND subline='total'"object.open sql, conn%><script type="text/javascript">function open_reg(){window.open("http://compass/clfr/Metrics_copy(1)/new%20pages/RetentionV8/<%response.write(object.fields("Sales_St_Nm"))%>.asp?subline=total"),"_blank","toolbar=no, location=no, directories=no, left=100px, top=150 status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000 height=300")}</script> I am trying to create a javascript pop up that has a link that the page that opens is based on a selection from a dynamic dropdown, but when I try to use the link nothing happens. This is the code I have so far, if anyone could help me out it would be appreciated.
  15. Is the site and html site or a flash site?
  16. "Driver={Microsoft Access Driver (*.mdb)}; DBQ=put the path to your file here.mdb" This should give you what you need to connect to an Access database through Dreamweaver.
  17. bairdb

    Select Date

    If you go to the website Dynamic Drivethere is a section that gives you the code to create calendars for forms.
  18. Are you publishing an html file from flash or are you just publishing a .swf file and then inserting that in a page in Dreamweaver?
  19. If you still need help with this. All you have to do to get a vector image from AI to Flash is export your AI file as a .swf file, then when you import that to flash it will be the same as in AI.
  20. bairdb

    Updating a database

    I also tried running this without the on error portion of the code and I get this error. Error Type:Microsoft JET Database Engine (0x80040E14)Syntax error in UPDATE statement.update.asp, line 37
  21. bairdb

    Updating a database

    I am trying to create a form that will update a database. I took the code off of the Update tutorial here and just changed everything to work with my database but I can't get the update to write to the database, I either get the error that is in there or the page just refreshes and nothing happens. Any help would be appreciated.Form <html><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.MapPath("DB/QORSeperated.mdb"))set rs=Server.CreateObject("ADODB.Recordset")rs.open "SELECT * FROM QOR2",conn%><h2>List Database</h2><table border="1" width="100%"><tr><%for each x in rs.Fields response.write("<th>" & (x.name) & "</th>")next%></tr><% do until rs.EOF %><tr><form method="post" action="update.asp"><%for each x in rs.Fields if (x.name)="ID" then%> <td> <input type="submit" name="id" value="<%=x.value%>"> </td> <%else%> <td><%Response.Write(x.value)%></td> <%end ifnext%></form><%rs.MoveNext%></tr><%loopconn.close%></table></body></html> Update Page <html><body><h2>Update Record</h2><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.MapPath("DB/QORSeperated.mdb"))id=Request.Form("ID")if Request.form("Type")<>"" then set rs=Server.CreateObject("ADODB.Recordset") rs.open "SELECT * FROM QOR2 WHERE ID='" & id & "' ORDER BY ID",conn %> <form method="post"> <table> <%for each x in rs.Fields%> <tr> <td><%=x.name%></td> <td><input name="<%=x.name%>" value="<%=x.value%>"></td> <%next%> </tr> </table> <br /><br /> <input type="submit" value="Update record"> </form><%else sql="UPDATE QOR2 SET " sql=sql & "Type='" & Request.Form("Type") & "'," sql=sql & "TotalCLFRDIV='" & Request.Form("TotalCLFRDIV") & "'," sql=sql & "FR='" & Request.Form("FR") & "'," sql=sql & "COMMLINES='" & Request.Form("COMMLINES") & "'," sql=sql & "TimeSlice='" & Request.Form("TimeSlice") & "'," sql=sql & "Quarter='" & Request.Form("Quarter") & "'," sql=sql & " WHERE ID='" & id & "'" on error resume next conn.Execute sql if err<>0 then response.write("No update permissions!") else response.write("Record " & id & " was updated!")end ifend ifconn.close%></body></html>
  22. bairdb

    ASP Help

    <html> <head> <script language="javascript"> function setOptions(o) { var select2 = document.form1.select2; select2.options.length = 0; if (o == "1") { select2.options[select2.options.length] = new Option('Apple'); select2.options[select2.options.length] = new Option('Pear'); } if (o == "2") { select2.options[select2.options.length] = new Option('Carrot'); select2.options[select2.options.length] = new Option('Potatoe'); } if (o == "3") { select2.options[select2.options.length] = new Option('Chicken'); select2.options[select2.options.length] = new Option('Fish'); }if (o == "4") { select2.options[select2.options.length] = new Option('Cheddar'); select2.options[select2.options.length] = new Option('Swiss'); } } </script> </head> <body> <form name="form1"> <select name="select1" size="1" onchange="setOptions(document.form1.select1.options[document.form1.select1.selectedIndex].value);"> <option value="1">Fruit</option> <option value="2">Vegetable</option> <option value="3">Meat</option> </select> <br /> <br /> <select name="select2" size="1"> <option>Apple</option> <option>Pear</option> </select> </form> </body> </html></body> </html> I have this code with some javascript that will change the value of the second drop down box depending on what is selected in the first drop down. Can anyone help me with some asp code to make these options populate dynamically from a database?
  23. I have a little bit of a different question about this now. For each time that a drop down box gets submitted I am creating a table with the results from the selection along with the dependant dropdown box. I have at the moment three dropdown boxes that are dependant on each other and all of them also create a table with the results from the selection. The problem I am having is, each time a table is created the headers from the previous table remains so I end up having three sets of headers on one table by the time I get to the third dropdown box and I only want the most current table and it's header. It looks like anything before do until object.EOF gets left on the screen after the page refreshes but everything after does not. <%set object=Server.CreateObject("ADODB.recordset")sql="SELECT DISTINCT REGN_NM FROM 2005_SSP ORDER BY REGN_NM"object.Open sql,connREGN_NM=request.Form("regn_nm")%><a href="Test.asp">Refresh</a><form method="post"><select name="regn_nm" onchange="submit();"><option>Select a Region</option><% do until object.EOF response.Write("<option") If object.fields("regn_nm") = regn_nm then response.write(" selected") end if response.Write(">") response.Write(object.fields("regn_nm")) object.Movenextloopset object=Nothing%></select></select><%If regn_nm<>"" thensql="SELECT DISTINCT SALES_ST_NM FROM 2005_SSP WHERE REGN_NM='"& regn_nm &"' ORDER BY SALES_ST_NM"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,connsales_st_nm=Trim(request("sales_st_nm"))%><select name="sales_st_nm" onchange="submit()"><option>Select a Sales State</option><% do until object.EOF response.Write("<option") If object.fields("sales_st_nm") = sales_st_nm then response.write(" selected") end if response.Write(">") response.Write(object.fields("sales_st_nm")) object.Movenextloopset object=Nothing%></select><%END IF%><%If sales_st_nm<>"" thensql="SELECT DISTINCT DST_CD FROM 2005_SSP WHERE SALES_ST_NM='"& sales_st_nm &"' ORDER BY DST_CD"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,connDST_CD=request.Form("dst_cd")%><select name="dst_cd" onchange="submit();"><option>Choose a District</option><% do until object.EOF response.Write("<option") If object.fields("dst_cd") = dst_cd then response.write(" selected") end if response.Write(">") response.Write(object.fields("dst_cd")) object.Movenextloopset object=Nothing%></select><%If dst_cd<>"" thensql="TRANSFORM Sum([2005_SSP].PREMIUM_TOTAL) AS SumOfPREMIUM_TOTAL SELECT [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD FROM 2005_SSP WHERE Dst_Cd='"& dst_cd &"' GROUP BY [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD PIVOT [2005_SSP].YR_MO;"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,conn%><table border="1" width="100%"> <tr> <%for each x in object.Fields response.write("<th>" & x.name & "</th>") next%> </tr><%do until object.EOF%> <tr> <%for each x in object.Fields%> <td id="TD"><%Response.Write(x.value)%></td> <%next object.MoveNext%> </tr> <%loop object.close %></table><% end if %><%End IF%><%If sales_st_nm<>"" thensql="TRANSFORM Sum([2005_SSP].PREMIUM_TOTAL) AS SumOfPREMIUM_TOTAL SELECT [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD FROM 2005_SSP WHERE Sales_st_nm='"& Sales_st_nm &"' GROUP BY [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD PIVOT [2005_SSP].YR_MO;"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,conn%><table border="1" width="100%"> <tr> <%for each x in object.Fields response.write("<th>" & x.name & "</th>") next%> </tr><%do until object.EOF%> <tr> <%for each x in object.Fields%> <td id="TD"><%Response.Write(x.value)%></td> <%next object.MoveNext%> </tr> <%loop object.close %></table><% end if %><%If regn_nm<>"" thensql="TRANSFORM Sum([2005_SSP].PREMIUM_TOTAL) AS SumOfPREMIUM_TOTAL SELECT [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD FROM 2005_SSP WHERE Regn_nm='"& Regn_nm &"' GROUP BY [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD PIVOT [2005_SSP].YR_MO;"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,conn%><table border="1" width="100%"> <tr> <%for each x in object.Fields response.write("<th>" & x.name & "</th>") next%> </tr><%do until object.EOF%> <tr> <%for each x in object.Fields%> <td id="TD"><%Response.Write(x.value)%></td> <%next object.MoveNext%> </tr> <%loop object.close %></table><% end if %></form></body></html>
  24. I am having a problem though with the dependancy between the two drop down boxes. When I select the first option every option from the Sales State box loads not just the ones that correspond to the first selection.
  25. Nevermind, I figured it out.
×
×
  • Create New...