Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 13th, 2005, 01:27 PM
Authorized User
 
Join Date: Aug 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default building blocks (page 562)

Hi Imar
Thanks for the very prompt reply, I have solved my connection problem simply by repeating the test.
However I have more trouble.
Re Page 562 I cannot get the pic on this page to appear,re. Live Data View, I get error on line 65. Also the server behaviors keep showing faults. So with your endulgence I have enclosed the complete code for the"buildingBlock.asp page.
Code:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

<%
var Section__MMColParam = "1";



if (String(Request.QueryString("sectionID")) != "undefined" && 
    String(Request.QueryString("sectionID")) != "") { 
  Section__MMColParam = String(Request.QueryString("sectionID"));
}
%>
<%
var Section = Server.CreateObject("ADODB.Recordset");
Section.ActiveConnection = MM_MediaEdge_STRING;
Section.Source = "SELECT * FROM Sections WHERE ID = "+ Section__MMColParam.replace(/'/g, "''") + "";
Section.CursorType = 0;
Section.CursorLocation = 2;
Section.LockType = 1;
Section.Open();
var Section_numRows = 0;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
    background-color: #FFFFFF;
}
-->
</style>
<link href="blockStyles.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('<%=Section.Fields.Item("Top_Rollover").Value%>')">
<table width="190" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="10" height="190" rowspan="3"><img name="" src="<%=(Section.Item("Left_Graphic").Value)  %>"width="<%=(Section.Item("Left_Width").Value) %>" height="<% =(Section.Item("Left_Height").Vlaue) %>" alt=""></td>
    <td><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Title')'<%=(Section.Fields.Item("Top_Rollover").Value%>',1)"><img width="<%=(Section.Item("Top_Width").Value) %>" height="<% =(Section.Item("Top_height").Vlaue) %>" name="Title" border="0" src="<%=(Section.Item("Top_Graphic").Value)  %>"></a></td>
    <td width="10" height="190" rowspan="3"><img name="" src="<%=(Section.Item("Right_Graphic").Value)  %>" width="<%=(Section.Item("Right_Width").Value) %>" height="<% =(Section.Item("Right_Graphic").Vlaue) %>" alt=""></td>
  </tr>
  <tr>
    <td height="170"> </td>
  </tr>
  <tr>
    <td><img name="" src="<%=(Section.Item("Bottom_Graphic").Value)  %>" width="<%=(Section.Item("Bottom_Width").Value) %>" height="<% =(Section.Item("Bottom_Height").Vlaue) %>" alt=""></td>
  </tr>
</table>
</body>
</html>
<%
Section.Close();
%>
I'm getting desperate, I've now scrapped the page 4 times.



 
Old January 13th, 2005, 02:10 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What error do you get??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning Dreamweaver/ Building Blocks terry s Forum and Wrox.com Feedback 2 September 8th, 2005 11:16 AM
Building Blocks terry s Dreamweaver (all versions) 1 August 16th, 2005 02:42 PM
building blocks "Content creation page" terry s Dreamweaver (all versions) 0 February 15th, 2005 02:01 PM
Building Blocks terry s Dreamweaver (all versions) 1 January 12th, 2005 02:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.