Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Honorary 'Adroit' Mechanic
Picture of BruceM
Posted
Hi,

I'm thinking that with your knowledge of WebEngine construct you may be able to speed my debug as I think it might be a WE conflict.

Basically, I'm using DHTML to change iframe sizes from within the iframe whose size will change so as to accommadate different document sizes.

The method works (more about that later Roll Eyes).

Between the <head> tags I have:

<script src="DOMFrameHeader.js"></script>
<script>
onload=function(){changeObjectHeight('mainframe','starterframe',800);}
</script>

Both the include and the function are of my own construct.

As an fyi the function is passed the name of the iframe ('mainframe'), the name of the frame the iframe is in ('starterframe'), a new height; and then it goes off, looks up the DOM and changes the height.

All pretty cool Cool.

I'm running WebEngine in HTML Auto mode.

Now the problem. .

  • Pages that do not include automation resize fine.

  • Pages that do include automation do not resize.

  • If I set the WebEngine mode to 'HTML Javascript' which I guess removes all automation routines, all pages resize fine.

    So I'm guessing a conflict with WE somewhere - maybe in function or variable names. Besides the include, key function names I've used are

  • findDOMFrame()
  • changeObjectHeight()

    and key global variables are
  • isDHTML
  • isLayers
  • isAll
  • isID

    Before I spend hours of digging, I reckoned it was worth bouncing passed you guys in case you spotted an obvious conflict with WE. Smile

    Thanks

    Bruce
  •  
    Posts: 302 | Location: London - UK | Registered: May 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    VM Staff
    Picture of Harpo
    Posted Hide Post
    My first guess is that the the body onload ="startVM()" is overiding your onload(). StartVM needs to be called to start the engine. There is probably a way to get yours code start without the onload but I don't know what it is off the top of my head.

    I don't think any of the name you listed are used in VM at this time.

    Let us know if you still have problems.
     
    Posts: 3215 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Honorary 'Adroit' Mechanic
    Picture of BruceM
    Posted Hide Post
    Thanks Harpo - you've saved me a lot of effort tracking down the source of the problem. By touching the published code and adding my onload to the one in the body tag I was able to prove that combining the two produces a fix.

    The reason I was using onload was that to activate the dhtml a trigger is required.

    It strikes me that I could use WE to create an object that would trigger immediately and would have an action to run the javascript function.

    Is it possible to use javascript as an action within the event editor somehow?

    -Bruce
     
    Posts: 302 | Location: London - UK | Registered: May 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Honorary 'Adroit' Mechanic
    Picture of BruceM
    Posted Hide Post
    It's Ok - I've figured out a solution for myself.

    I've inserted

    setTimeout("changeObjectHeight('mainframe','starterframe',800, 1);");

    between the <head> tags - it works a treat! Smile

    -Bruce
     
    Posts: 302 | Location: London - UK | Registered: May 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    VM Staff
    Picture of Harpo
    Posted Hide Post
    That's what I like to hear Wink

    Events that trigger scripts would be a good thing.
     
    Posts: 3215 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
      Powered by Eve Community  
     


    ™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.