Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 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 August 22nd, 2006, 01:50 PM
Authorized User
 
Join Date: Jul 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default events asp

Hello Imar In the dreamweaver mx 2004 book, page 286 I printed out the code i had entered. the page seems to work ok and that really got me wondering as I have two </form> statements in a row on line 70. Should I not be surprised that the page functions with two in there? I also do not have the instance end editable statement after the option value statements. this relates to step 4 on 286, the shaded part. whats going on?? it looks like it should not function but it seems to. Also, can I search a pages code for a particular html word or command in some way and if so, how do you do that. I am putting the page in here for your review. thanks as always, skinner
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim iLastCategory
If Request.QueryString("lstCategory") <> "" Then
 'Category has been chosen, so let's save it in a cookie
 iLastCategory = Request.QueryString("lstCategory")
 Response.Cookies("LastCategory") = iLastCategory
 Response.Cookies("LastCategory").Expires = Date() + 10
 End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>GlobalSoccerEvents.com - Your Source for Soccer Events Around the Globe</title>

<style type="text/css">
<!--
td {
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
}
a {
    color: #669933;
}
-->
</style>
</head>

<body><table width="100%"  border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="images/logo.gif" width="257" height="58"></td>
    <td><table width=" %"  border="0" align="right" cellpadding="0" cellspacing="0">
  <tr>
    <td><a href="home.asp">Home</a></td>
    <td>   </td>
    <td><a href="events.asp">Events</a></td>
    <td>   </td>
    <td><a href="mySite.asp">My Site</a></td>
  </tr>
</table>
</td>
  </tr>
</table>
<br>
<script language="JavaScript" type="text/javascript">
 var sPageName = '<%=Request.ServerVariables("SCRIPT_NAME")%>';
 sPageName = sPageName.substr(sPageName.lastIndexOf('/') + 1).toLowerCase();
 sPageName = sPageName.substr(0, sPageName.lastIndexOf('.'));
 if (document.getElementById(sPageName))
 {
 document.getElementById(sPageName).style.fontweight = 'Bold';
 document.getElementById(sPageName).style.fontsize = '14pt';
 }
 </script>    
 
 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h2>Current Events</h2></td>
  </tr>
  <tr>
    <td><form action="events.asp" method="get" name="frmSelectCategory">
    <select name="lstCategory" onChange="document.frmSelectCategory.submit();">
      <option value=" ">Select a Category</option>
      <option value="1">Champions League</option>
      <option value="2">UEFA Cup</option>
      <option value="3">National League</option>
      <option value="4">US Major League Soccer</option>
    </select></form></form>
    <% Select Case iLastCategory
      Case 1 'Champions League
      Response.Write("<h3>Champions League<h3>") %>
      - HTML Content for Champions League here -
    <% Case 2 'UEFA Cup
      Response.Write("<h3>UEFA Cup<h3>") %>
      - HTML Content for UEFA Cup here -
    <% Case 3 'National League
      Response.Write("<h3>National League<h3>") %>
      - HTML Content for National League here -
    <% Case 4 'US Major League Soccer
      Response.Write("<h3>Us Major League Soccer<h3>") %>
      - HTML Content for Us Major League Soccer Events here -
    <% Case Else 'No Category chosen %>
      Please select a category form the drop down list
      <% End Select %>
     </td>
  </tr>
  <tr>
    <td align="center"><br>
    <br>
    <br>
    <br>
    <br>
    </td>
  </tr>
</table>
</body>
</html>
 
Old August 22nd, 2006, 02:45 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Dennis,

Browsers are very forgiving when it comes to invalid markup. So, although </form></form> is incorrect from a standard's perspective (you either have one </form> too many, or you tried to nest forms which is not allowed), the browser will happily display it.

You can use an on-line code validator (or Dreamweaver's internal validator which is not as good as the on-line version) to check your code.

http://validator.w3.org/

Regarding the InstanceEndEditable: in a browser these are seen as comments. This means you can have as many as you want, or none at all, from the browser's perspective.

However, Dreamweaver uses this for its template structure. It's quite picky about them so you'll find that if you have too many of them, or remove one of them, your template falls apart. In that case, reapplying the template might work.

You can use Ctrl+F to find in files. The dialog has a number of options that allows you to search in the current document, or in multiple documents / the entire site.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old August 22nd, 2006, 03:46 PM
Authorized User
 
Join Date: Jul 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar Yes, its a lot of help. i am gong fishing on lake michigan for two weeks. so until then, stay mellow. dls
 
Old August 24th, 2006, 01:35 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Dennis,

Sounds great! Have fun.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fire events of a Active X dll in ASP.NET Brijendra Pandey ASP.NET 3.5 Professionals 1 October 4th, 2008 05:44 PM
events module in Building an asp.net intranet nickm All Other Wrox Books 1 August 25th, 2004 01:07 PM
help with Events egiblock JSP Basics 0 October 6th, 2003 11:39 PM





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