HighDots Forums  

Problem with Multiple Javascrips in One Page

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Problem with Multiple Javascrips in One Page in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
gwalt
 
Posts: n/a

Default Problem with Multiple Javascrips in One Page - 07-29-2004 , 12:59 AM






I have an ASP page with two Javascript functions: 1) image swaps and 2) an open
window using a free Mapquest DW extension (it's basically an open window with
some simple javascript).

Here's the problem. When I open the page in a browser, the image swaps work
fine, that is until I click the open window and then close it. Then the image
swaps no longer work. It's like the javascript to open the window makes the
page forget where the images are located.

Any ideas?
Thx,
Mark


Reply With Quote
  #2  
Old   
gwalt
 
Posts: n/a

Default Re: Problem with Multiple Javascrips in One Page - 07-29-2004 , 01:11 AM






Here is a link to my code:

http://www.gulfcoastfsbo.com/gulfcoastfsbo/listdetail.txt

Reply With Quote
  #3  
Old   
udayms
 
Posts: n/a

Default Re: Problem with Multiple Javascrips in One Page - 07-29-2004 , 02:10 AM



Hey.. would be helpful, if you can post a link to the page.So, that we can see
it working. Your code seems to be ok. But, to understand the exact problem, it
would be better if you can post a link to the page.


Reply With Quote
  #4  
Old   
gwalt
 
Posts: n/a

Default Re: Problem with Multiple Javascrips in One Page - 07-29-2004 , 09:19 AM



Thanks.

Here's a link to the page. Click the thumbs to see a larger image (they work
fine). Then check out the MapQuest window. Then try the thumbs again. The
2nd time the image swaps will not work. I think it may have something to do
with the image preload script.

Any input is greatly appreciated.

http://www.gulfcoastfsbo.com/Sitepages/listing_detail.asp?srchlistnum=147

Thx,
Mark


Reply With Quote
  #5  
Old   
cmbergin
 
Posts: n/a

Default Re: Problem with Multiple Javascrips in One Page - 07-29-2004 , 10:33 AM



Interesting. But it's only sort of broken.

The image swaps are still working after I tried the map quest window-- the
page still re-sized itself for the taller images. But, for whatever reason,
the image wasn't displayed. For the page to resize, though, it had to be able
to find the image to get the size information.

In addition, I was only able to reproduce this behavior in IE6, and when I
refreshed the page, it behaved normally again. When I tested your page under
Opera and Mozilla, the image swaps were unaffected. This may be related to the
IE6 bug that causes a page to not redraw properly under certain situations. I
don't remember any of the other situations. But I have a page where I use
the "max-width" hack. You specify max-width:800px (or whatever) for the other
browsers, then use width:expression(document.body.clientWidth > 800? "800px" :
"auto") to make IE6 behave as though it supported max-width. (IE is the only
browser that recognizes "expression".) When using this workaround, if you have
the page maximized in IE, then reduce the size of your browser window, the page
will become blank until you refresh. Then it behaves normally.

So, it's a render bug of some sort. There might be a script alteration to fix
it, but I don't know of any.


Reply With Quote
  #6  
Old   
gwalt
 
Posts: n/a

Default Re: Problem with Multiple Javascrips in One Page - 07-29-2004 , 11:03 AM



Thanks for the information.

I'm using IE6 and reproduce exactly what you are experiencing. It's like the
image is present, but transparent. Refresh clears it up. However, I don't
want my users to have to refresh to use the image swaps.

I have experienced this same problem when I use the image swap javascript with
any other javascript code (popup windown for example). I think you are on to
something with the page render / redraw issue.

Is there anyone else out there that has experienced this and found a
workaround? It'll be a shame if I have to ditch my image swaps for popup
images.

Thx,
Mark


Reply With Quote
  #7  
Old   
udayms
 
Posts: n/a

Default Re: Problem with Multiple Javascrips in One Page - 08-03-2004 , 04:37 AM



Hi,
Your probs is solved? I was out of town, so couldnt check it till now. If you are still having tghe probs. It should be some small probs. Lets work on it. Do let us know.

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.