![]() |
|
|||||||
| ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
This is my complete page:
<%@LANGUAGE=VBSCRIPT%> <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN> <!--#include virtual=/adovbs.inc --> <title>Panel</title> <style type="text/css"> </style> <head> <% Public x Public y x=0 y=0 MenuItem = Request.QueryString() MenuItem = Replace(MenuItem,"%20"," ") set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:\inetpub\wwwroot\HawksWeb\HawksWeb.mdb" Set ProductData=server.CreateObject("ADODB.RecordSet") ProductData.CursorType = AdOpenStatic ProductData.CursorLocation = AdUseClient ProductData.ActiveConnection = conn ProductData.Sort = "Category Asc, Menu Asc" ProductData.open "Select * from WebData" FilStr = "Menu = '" & MenuItem & "'" SrtStr = "Package, Size, Flavor" ProductData.Filter = FilStr ProductData.Sort = SrtStr ProdInfo = ProductData.GetRows() ImgStr = ProdInfo(y,x) ImgStr = "/Images/Products/" + ImgStr + ".png" ProductData.Close ProductData.ActiveConnection = nothing %> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; } .Heading { font-family: "Arial Black"; font-size: 16px; font-weight: bold; } body { background-image: url(/images/Santa%20Fe%20Stucco.bmp); background-repeat: repeat; } .style3 {font-size: 12px} #Layer1 { position:absolute; width:99px; height:24px; z-index:1; left: 144px; top: 420px; } #Layer2 { position:absolute; width:100%; z-index:1; top: 0; overflow: visible; left: 0; background-color: #FFFFFF; } --> </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <script type="text/vbscript"> Function GetImg(Spin,Dir,x,y,ProdInfo) TestCurr = ProdInfo(y,x) TestNext = ProdInfo(y,x) Do While TestCurr = TestNext Select Case (Dir) Case 0 If x = 0 then x = ubound(ProdInfo(2)) Else x = x - 1 End If Case 1 If x = ubound(ProdInfo(2)) then x = 0 Else x = x +1 End If End Select TestNext = ProdInfo(Spin,x) Loop ImgStr = ProdInfo(y,x) ImgStr = "/Images/Products/" + ImgStr + ".png" Response.write(ImgStr) end Function </Script> <%Response.write("<table width='100%' border='1' BorderColor= '0' cellspacing='0' cellpadding='0' bgcolor='#7575EE'><tr><td align='center'><p class='Heading'>" + MenuItem + "</p></td></tr></table>")%> <td></td> <td style="WIDTH: 302px"></td> <td></td> </tr> <tr> <td height="30"></td> <td height="30" style="WIDTH: 302px"></td> <td height="30"></td> </tr> </table> </p> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" bordercolor="#000000"><form name="form2" method="post" action=""> <div align="center">The product description goes here it should autowrap depending upon the browser window size </div> </form> </td> <td><div align="center" id="ProdImgDiv"> <img src="<%=ImgStr%>" name="ProdImg" border="0" id="ProdImg" /> <label></label> </div></td> <td colspan="2"><form name="form1" method="post" action=""> <div align="center">The product information goes here it should autowrap depending upon the browser window size </div> </form></td> </tr> <tr> <td width="136" rowspan="2"> </td> <td width="243" align="center" valign="middle"> <div align="center"><img name="SpinPkg" src="/images/Spin/SpinPkg.png" width="150" height="74" border="0" id="SpinPkg" usemap="#SpinPkg" alt=""> <map name="SpinPkg"> <area shape="poly" coords="123,35,108,43,108,26,123,35" alt="" OnClick = "ImgStr = GetImg('Package',0,x,y,ProdInfo)"/> <area shape="poly" coords="27,36,42,27,42,45,27,36" alt="" OnClick = "ImgStr = GetImg('Package',1,x,y,ProdInfo)"/> </map> </div></td> <td width="243" align="center" valign="middle"> <div align="center"><img name="SpinSze" src="Images/Spin/SpinSze.png" width="150" height="74" border="0" id="SpinSze" usemap="#SpinSze" alt=""> <map name="SpinSze"> <area shape="poly" coords="123,37,108,45,108,28,123,37" href="vbscript:" alt="" OnClick = "ImgStr = GetImg('Size',0,x,y,ProdInfo)"/> <area shape="poly" coords="28,37,43,28,43,46,28,37" href="vbscript:" alt="" OnClick = "ImgStr = GetImg('Size',1,x,y,ProdInfo)"/> </map> </div></td> <td width="243" align="center" valign="middle"> <div align="center"><img name="SpinFlv" src="Images/Spin/SpinFlv.png" width="150" height="74" border="0" id="SpinFlv" usemap="#SpinFlv" alt=""> <map name="SpinFlv"> <area shape="poly" coords="123,37,108,45,108,28,123,37" href="vbscript:" alt="" OnClick = "ImgStr = GetImg('Flavor',0,x,y,ProdInfo)"/> <area shape="poly" coords="27,37,42,28,42,46,27,37" href="vbscript:" alt="" OnClick = "ImgStr = GetImg('Flavor',1,x,y,ProdInfo)"/> </map> </div></td> <td width="143" rowspan="2"> </td> </tr> <tr> </tr> <tr> <td width="136"> </td> <td width="243"> </td> <td width="243" height="60" align="center" valign="middle"> <img name="Add" src="images/Add/Add.png" width="179" border="0" id="Add" usemap="#Add" alt="" /> <map name="Add" id="Add"> <area shape="rect" coords="40,38,137,56" alt="" /> </map> </td> <td width="243"><label></label></td> <td width="143"> </td> </tr> </table> </body> </html> Problem is that " x, y and ProdInfo are not recognised in the function "GetImg" Debugger values for them is (Empty) |
|
This ad is part of our Revenue Sharing program |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Form Variables | vilen | ASP & VBScript Forum | 0 | 04-02-2008 03:43 PM |
| Declaration of public variables in vbscript | sona90s | ASP & VBScript Forum | 1 | 10-19-2007 07:54 PM |
| Mid Function. Reading of files | peachtea | ASP & VBScript Forum | 1 | 08-01-2007 01:33 AM |
| VBScript Function for Compound Primary Key | wacara | ASP & VBScript Forum | 1 | 05-10-2007 02:29 PM |
| Filter Clean Function not working | KIFIKA | PHP Forum | 1 | 03-15-2007 12:42 AM |