Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
 
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old May 18th, 2004, 08:06 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

If you can't figure it out, can you send me a zipped version of the site?

Please remove as many unnecessary pages as possible, so it's easier to reproduce the problem and focus on a solution. Also, don't forget to include the database.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #12 (permalink)  
Old May 18th, 2004, 08:59 AM
Authorized User
 
Join Date: Sep 2003
Location: Dubai, Dubai, United Arab Emirates.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yeah, I will send it to your email address.

Thanks a lot.

Shubhada.

  #13 (permalink)  
Old May 18th, 2004, 09:46 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I am not sure whether this is a book problem, or a code problem, but here's the situation.

The pages with links, like Item One, etc live in a page called blockContent.asp. This page, in turn is added to the site by using an IFrame inside the page buildingBlock.asp. So, when you talk to the "parent" of the Item One link, you're talking about buildingBlock.asp, and not Index.asp. Index.asp, in turn, is the parent of buildingBlock.asp. So, to talk to Index.asp from blockContent.asp, you'll need to use parent.parent. instead of parent.

To fix this, open blockNav.asp and locate this line:
Code:
eval("parent."+args[i]+".location.replace
    ('buildingBlock.asp?sectionID="+args[i+1]+"')");
    and replace it with this line:
Code:
eval("parent.parent."+args[i]+".location.replace
Code:
    ('buildingBlock.asp?sectionID="+args[i+1]+"')");
    This way, the links will open up correctly.

Be careful with solution: I am not sure if this is the proper way to fix it. It seems to work, but I don't know if it is breaking something else somewhere down the road.....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #14 (permalink)  
Old May 19th, 2004, 12:13 AM
Authorized User
 
Join Date: Sep 2003
Location: Dubai, Dubai, United Arab Emirates.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar!

Thanks for taking time out to look at the files I sent you.

This solution seems to work for the structure in its entirity, but for the single blockNav.asp file, the similar error message comes.

That is - when I open index.asp and click on Item One, Item Two etc.., the approriate item opens in the mainFrame. So far its fine. No error message is shown on the taskbar also. But at the same time the subsections should open in the four navigation frames below. That is not happening. The related frame (from which the item was clicked) becomes blank - and remains blank.

This problem is more evident when I open the blockNav.asp page directly in the browser. The page shows blank and the error message comes. This time the message is:

Error: ‘parent.parent.frameMain.location’ is null or not an object
----------------------------------------------------------------------

I think that till the blockNav.asp works correctly independantly, the related frames in the main structure will not show any content.

What could be done now?

Shubhada.


  #15 (permalink)  
Old May 19th, 2004, 02:23 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Right, I was already afraid it would break something somewhere else.

I think the quickest way to fix this, is to contact Wrox Tech Support and tell them about the problem. Maybe they can contact Todd for a solution.

I can also take another look at the code, but since I haven't written it, it may take a while before I can see what's going on....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #16 (permalink)  
Old May 19th, 2004, 05:09 AM
Authorized User
 
Join Date: Sep 2003
Location: Dubai, Dubai, United Arab Emirates.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar!

The first part of the problem seems to be solved i.e. the navigation frame becoming blank after Item One, Item Two etc. are clicked and displayed in the main frame. When I filled up the Sections_Nav table with the IDS of the sections to be displayed in different frames, it started showing the relevant content in different frames.

For the second part of the problem, - i.e. the error message being displayed if blockNav.asp is opened directly in the browser - on second thoughts, I feel that blockNav.asp is not supposed to be opened on its own, since it is a hidden navigation file. If in spite of this we try to open it, it will display the error message, because it does not have any 'parent' in this situation (since index.asp is absent).

Am I right in thinking so? If so, then the problem is solved.

Shubhada.


  #17 (permalink)  
Old May 19th, 2004, 05:20 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

OK, that's great.

You're correct that you're not supposed to open those pages directly. They are designed to run inside frames (iframes, in this case), so you'll get into troubles when they are not loaded inside a frame (e.g. you'll get messages like parent is null or not an object)

It also seems to make sense to me that adding stuff to the database fixes the initial problem. Apparently, there is a relation between the section and the section_nav.....

Glad it's working now.....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: This Protector by The White Stripes (Track 16 from the album: White Blood Cells)
  #18 (permalink)  
Old May 19th, 2004, 06:08 AM
Authorized User
 
Join Date: Sep 2003
Location: Dubai, Dubai, United Arab Emirates.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot Imar!

With this final web site I have finished the entire book with all the three web sites. Now all of them are working fine.

I am happy to have bought this book. I did not have any previous experience in web designing and Dreamweaver. This book is a great way to learn. Especially with the help extended by you was invaluable. Now I am confident that I will be able to design the web sites on my own.

Thanks again for all the support.

Shubhada.

  #19 (permalink)  
Old May 19th, 2004, 06:40 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You're more than welcome. Glad everything is working as expected.

All that is left to do now is write an honest review at Amazon.com..... ;)

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Irony Of It All by The Streets (Track 11 from the album: Original Pirate Material)
  #20 (permalink)  
Old May 19th, 2004, 06:56 AM
Authorized User
 
Join Date: Sep 2003
Location: Dubai, Dubai, United Arab Emirates.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

jokes apart, I have already decided to do that..

Shubhada.

 


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




All times are GMT -4. The time now is 11:04 AM.


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