Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #51 (permalink)  
Old March 1st, 2006, 07:07 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On the recordset I clicked the test option and it points to the right area, or it seems to. information does come up with regards to the test value.

mike


Reply With Quote
  #52 (permalink)  
Old March 1st, 2006, 07:09 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

And how does the HTML look like in the browser for the code you just posted?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #53 (permalink)  
Old March 1st, 2006, 07:12 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To me it looks fine, I'll post it but I think I'm Putting alot onto you, to which I apoligise.

<tr>
    <td width="10" height="190" rowspan="3"><img name="" img src="<%=(Section.Fields.Item("Left_Graphic").Value )%>" width="<%=(Section.Fields.Item("Left_Width").Value )%>" height="<%=(Section.Fields.Item("Left_Height").Val ue)%>" alt=""></td>
    <td width="170" height="10"><a href="<%=(Section.Fields.Item("Link").Value)%>" target="navigation" onMouseOver="MM_swapImage('Title','','<%=(Section. Fields.Item("Top_RollOver").Value)%>',1)" onMouseOut="MM_swapImageRestore()"><img src="<%=(Section.Fields.Item("Top_Graphic").Value) %>" name="Title" width="<%=(Section.Fields.Item("Top_Width").Value) %>" height="<%=(Section.Fields.Item("Top_Height").Valu e)%>" border="0"></a></td>
   <td width="10" height="190" rowspan="3"><img name="" src="<%=(Section.Fields.Item("Right_Graphic").Valu e)%>"width="<%=(Section.Fields.Item("Right_Width") .Value)%>" height="<%=(Section.Fields.Item("Right_Height").Va lue)%>" alt=""></td>
  </tr>
  <tr>
    <td width="<%=(Section.Fields.Item("Top_Width").Value - Section.Fields.Item("Padding_Left").Value - Section.Fields.Item("Padding_Right").Value)%>" height="<%=(Section.Fields.Item("Left_Height").Val ue - Section.Fields.Item("Top_Height").Value - Section.Fields.Item("Bottom_Height").Value - Section.Fields.Item("Padding_Top").Value - Section.fields.Item("Padding_Bottom").Value)%>" class="rfelement">
    <iframe name="list" scrolling = "auto" marginwidth="0" marginheight="0" src="<%=Section.Fields.Item("Content_Page").Value% >?sectionID=<%=(Section.Fields.Item("ID").Value)%> &list=true&width=<%=(Section.Fields.Item("Top_Widt h").Value - Section.Fields.Item("Padding_Left").Value - Section.Fields.Item("Padding_Right").Value)%>" frameborder="0" height="<%=(Section.Fields.Item("Left_Height").Val ue - Section.Fields.Item("Top_Height").Value - Section.Fields.Item("Bottom_Height").Value - Section.Fields.Item("Padding_Top").Value - Section.Fields.Item("Padding_Bottom").Value)%>" width="100%">Please upgrade your browser</iframe>
    </td>
  </tr>
  <tr>
    <td width="170" height="10"><img name="" src="<%=(Section.Fields.Item("Bottom_Graphic").Val ue)%>" width="<%=(Section.Fields.Item("Bottom_Width").Val ue)%>" height="<%=(Section.Fields.Item("Bottom_Height").V alue)%>" alt=""></td>
  </tr>
</table>
</body>
</html>
<%
Section.Close();
%>

Reply With Quote
  #54 (permalink)  
Old March 1st, 2006, 08:05 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Earlier you posted the <body> with the onload attribute.

Now you post an HTML table that seems unrelated. Can you please post the code for the <body> tag you posted earlier?

Also, the code you posted is NOT the code from the browser; it's the original, raw ASP source. You need the parsed end result that is sent to the browser....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #55 (permalink)  
Old March 1st, 2006, 08:16 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm Not sure what you mean by the parsed end result! you aked how the html looked so I posted it... In one way or another you have had the full page, this marries up with the Document page on the download from MEdiaEdge... As i said earlier this has me totally lost I'm getting into things here that I dont quite understand, the browser fault code is what I advised on Monday thats all I'm getting. The Html follows directly from the onload part I sent...
Mike :-(

Reply With Quote
  #56 (permalink)  
Old March 1st, 2006, 08:34 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar
This is the full page of data

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<meta name="robots" content="buildingBlock nofollow">

<%
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_mysite_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;
%>
<html>
<head>
<title><%=(Section.Fields.Item("Section_Name").Val ue)%></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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 bgcolor="#cccccc" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" onLoad=
"MM_preloadImages('<%=(Section.Fields.Item("Top_Ro llOver").Value)%>')">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="10" height="190" rowspan="3"><img name="" img src="<%=(Section.Fields.Item("Left_Graphic").Value )%>" width="<%=(Section.Fields.Item("Left_Width").Value )%>" height="<%=(Section.Fields.Item("Left_Height").Val ue)%>" alt=""></td>
    <td width="170" height="10"><a href="<%=(Section.Fields.Item("Link").Value)%>" target="navigation" onMouseOver="MM_swapImage('Title','','<%=(Section. Fields.Item("Top_RollOver").Value)%>',1)" onMouseOut="MM_swapImageRestore()"><img src="<%=(Section.Fields.Item("Top_Graphic").Value) %>" name="Title" width="<%=(Section.Fields.Item("Top_Width").Value) %>" height="<%=(Section.Fields.Item("Top_Height").Valu e)%>" border="0"></a></td>
   <td width="10" height="190" rowspan="3"><img name="" src="<%=(Section.Fields.Item("Right_Graphic").Valu e)%>"width="<%=(Section.Fields.Item("Right_Width") .Value)%>" height="<%=(Section.Fields.Item("Right_Height").Va lue)%>" alt=""></td>
  </tr>
  <tr>
    <td width="<%=(Section.Fields.Item("Top_Width").Value - Section.Fields.Item("Padding_Left").Value - Section.Fields.Item("Padding_Right").Value)%>" height="<%=(Section.Fields.Item("Left_Height").Val ue - Section.Fields.Item("Top_Height").Value - Section.Fields.Item("Bottom_Height").Value - Section.Fields.Item("Padding_Top").Value - Section.Fields.Item("Padding_Bottom").Value)%>" class="rfelement">
    <iframe name="list" scrolling = "auto" marginwidth="0" marginheight="0" src="<%=Section.Fields.Item("Content_Page").Value% >?sectionID=<%=(Section.Fields.Item("ID").Value)%> &list=true&width=<%=(Section.Fields.Item("Top_Widt h").Value - Section.Fields.Item("Padding_Left").Value - Section.Fields.Item("Padding_Right").Value)%>" frameborder="0" height="<%=(Section.Fields.Item("Left_Height").Val ue - Section.Fields.Item("Top_Height").Value - Section.Fields.Item("Bottom_Height").Value - Section.Fields.Item("Padding_Top").Value - Section.Fields.Item("Padding_Bottom").Value)%>" width="100%">Please upgrade your browser</iframe>
    </td>
  </tr>
  <tr>
    <td width="170" height="10"><img name="" src="<%=(Section.Fields.Item("Bottom_Graphic").Val ue)%>" width="<%=(Section.Fields.Item("Bottom_Width").Val ue)%>" height="<%=(Section.Fields.Item("Bottom_Height").V alue)%>" alt=""></td>
  </tr>
</table>
</body>
</html>
<%
Section.Close();
%>
as you can see the last data follows on from the onload info

mike

Reply With Quote
  #57 (permalink)  
Old March 1st, 2006, 09:00 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

What I am trying to say is that there is a difference between the ASP source (accessible by looking at the ASP file in Dreamweaver) and the final code in the browser (accessible by right-clicking in the browser and choosing View Source)

So, for example, if you have this ASP page:

<%
  Response.Write("<h1>Hello World, the time is " & Now() & "</h1>)
%>

You'll end up with the following in the browser:

<h1>Hello World, the time is 2006/03/01 13:58</h1>

The latter example is the final result in the browser / the "parsed result" from the original ASP page.

Where does the code you posted come from? From the ASP page or from the browser?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #58 (permalink)  
Old March 1st, 2006, 09:06 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar

well you learn something every day I have done as you asked, and here it is
<meta name="robots" content="buildingBlock nofollow">

<html>
<head>
<title>Building_Block</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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 bgcolor="#cccccc" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" onLoad=
"MM_preloadImages('images/title_rollOver.gif')">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="10" height="190" rowspan="3"><img name="" img src="images/lft.gif" width="10" height="170" alt=""></td>
    <td width="170" height="10"><a href="blockNav.asp?sectionID=2" target="navigation" onMouseOver="MM_swapImage('Title','','images/title_rollOver.gif',1)" onMouseOut="MM_swapImageRestore()"><img src="images/tp.gif" name="Title" width="170" height="10" border="0"></a></td>
   <td width="10" height="190" rowspan="3"><img name="" src="images/rgt.gif"width="10" height="170" alt=""></td>
  </tr>
  <tr>
    <td width="166" height="140" class="rfelement">
    <iframe name="list" scrolling = "auto" marginwidth="0" marginheight="0" src="blockContent.asp?sectionID=1&list=true&width= 166" frameborder="0" height="140" width="100%">Please upgrade your browser</iframe>
    </td>
  </tr>
  <tr>
    <td width="170" height="10"><img name="" src="images/bott.gif" width="170" height="10" alt=""></td>
  </tr>
</table>
</body>
</html>

Mike

Reply With Quote
  #59 (permalink)  
Old March 1st, 2006, 03:31 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:Originally posted by mikec2well you learn something every day
What I described is fundamental knowledge in client-server based web applications. At the server, you have an ASP page with ASP code that when executed results in HTML being generated that in turn is sent to the client.

Maybe this is the root cause of the confusion you've had over the past couple of weeks, trying to figure out how all this works. Chapter 6, pages 211 to 215 (of the MX 2004 edition) introduce this concept, which is then used and expanded on in the remainder of the book.

That said, the error you get is probably caused by a mismatch in the swap image function. In the declaration of the function you have this:

MM_swapImgRestore

However, in the onmouseout you use this:

MM_swapImageRestore

Whenever you however over an image, and then "mouse out" you'll get a JavaScript error because MM_swapImageRestore is not defined...

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Frontier by Dead Can Dance (Track 1 from the album: Dead Can Dance 1981-1998 (Limited Edition) [CD1]) What's This?
Reply With Quote
  #60 (permalink)  
Old March 1st, 2006, 05:01 PM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar I am not using the book MX2004 so i cant see what your telling me, I'm using Dw Mx and as this site i'm using is from that book as i said at the outset this is not explained, and again my code is identical to that as on the downloads you told me to check...And yes I do learn something every day as in this world there is a lot to learn and if you think you know it all then you are fooling yourself...

Mike

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Pop-Up Menu in DW MX 2004 Maverick Dreamweaver (all versions) 5 November 20th, 2004 12:08 PM
Reading XML in DW MX 2004 bommi_k Dreamweaver (all versions) 1 August 19th, 2004 01:07 PM



All times are GMT -4. The time now is 08:45 AM.


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