SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: best behavior

  1. #1
    SitePoint Member
    Join Date
    Oct 2001
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    best behavior

    Hi all

    Does anyone here have knowledge of behaviors with especial reference to the "viewlink" components feature?
    Cheers,

    Keith

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please explain further. There is alot to advanced event handling and I am unsure as to exactly what you wish to do.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Member
    Join Date
    Oct 2001
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Maelstrom,

    Thanks for replying, my first task was to find someone that new what I was talking about as I have searched high & low!

    Ok, basically I have two different components that I have built that are utilized on the same page and I want them to "talk" to each other.

    At the moment all that I am getting is the equivalent of the divorce court discussion, - say nothing unless it's a row

    It does not seem to be the normal route that behaviors take as these are components.
    Code:
    from the main page:
      elementId.propertyName = blah
    or
      elementId.methodName = blah
    I know there must be a way, I just haven't found it yet.

    At the moment, it is just bouncing.
    Cheers,

    Keith

  4. #4
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by diades
    Hi Maelstrom,

    Thanks for replying, my first task was to find someone that new what I was talking about as I have searched high & low!

    Ok, basically I have two different components that I have built that are utilized on the same page and I want them to "talk" to each other.

    At the moment all that I am getting is the equivalent of the divorce court discussion, - say nothing unless it's a row

    It does not seem to be the normal route that behaviors take as these are components.
    Code:
    from the main page:
      elementId.propertyName = blah
    or
      elementId.methodName = blah
    I know there must be a way, I just haven't found it yet.

    At the moment, it is just bouncing.
    What you are trying to do is navigate the Dom. If you are focusing on just ie5.5+ and netscape 6+ I can easily help you. Otherwise it gets more difficult

    You are close. Your explanation was still a little hard to figure out without a proper example so I will show you what I interpretted.(sp)

    Lets say you have a form element that is labelled with name

    <form name="bob">
    <input type="text" name="field1">
    <input type="text" name="field2">
    </form>

    I am just trying to guess what you wish to do but I will explain how to reference either of these and then you should read through those articals as I think that is what you are looking for.

    To reference the first field simply

    var a=document.bob.field1.value

    if you wish to make the second field equal to the first I would usually do this on the fly instead of on the submission with an onchange or an onblur event so the code would change like so

    <form name="bob">
    <input type="text" name="field1" onblur="changeField()">
    <input type="text" name="field2">
    </form>

    the in the head have this function ready

    function changeField(){
    var original=document.bob.field1.value
    //this next section will change the second field into the value of the first
    document.bob.field2.value=original
    }

    I hope that helps. There are many variations to do this and I showed you only one. I would recommend reading the following articals about the DOM.

    If I misunderstood (very possible at 3:30 am) I will try to help you again .

    (I cannot go into depth on the use of the dom as it would be a huge set of articals) for really detailed info on the dom try

    http://www.webreference.com/js/
    <!-- There are around 6 articals in that age alone which will help you become better with the dom -->

    http://www.webmasterbase.com/article/452
    <!-- Thats the first of three articals - the second artical is specific to the dom -->

    http://www.devshed.com/Client_Side/DHTML
    <!-- Many more dhtml dom manipulation articals -->
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  5. #5
    SitePoint Member
    Join Date
    Oct 2001
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Maelstrom,

    Yes, as far as i can see, you have misunderstood.
    Firstly, this is purely for IE5.5 + as no other browsers support the technology that is being utilised.

    The components that I am discussing are constructed elsewhere and merely referenced on the mainpage thus:
    Code:
    <!--create a namespace -->
    <html xmlns:magii>
      <head>
    <!--import the attribute component -->
        <?import namespace="magii" implementation="attribs.htc" />
    <!--import the frameset component -->
        <?import namespace="magii" implementation="frameset.htc" />
    ...
    blah
    ...
      <body scroll="no" onload="init(true);" onresize="init(false)">
    <!--use the attribute component -->
        <magii:attributes id="att" class="attrib" ddCols="" ddRows=""/>
    <!--use the frameset component -->
        <magii:frameset id="frm" class="fram" />
      </body>
    </html>
    As component, they have there own events, methods, properties and css just as behaviors do but these, being components, utilize there own namespace.
    I need to have a method within magii:attributes (attribs.htc) "talk" to one in magii:frameset (frameset.htc) an visa versa either directly or via the main page. I dont mind which, just so long as they do.
    Cheers,

    Keith

  6. #6
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I was way off. I am sorry but don't know anything (except theory) about xml. So I really can't help you.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  7. #7
    SitePoint Member
    Join Date
    Oct 2001
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Maelstrom,

    Hey, no problem!

    It looks like there are not many avenues of research on this anyway as it seems little known and/or used.

    Its a great pity as they are very powerful. I believe that Mozilla has an equivalent called "xbl" which I also want to look into.

    Thanks for the reply.
    Cheers,

    Keith

  8. #8
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by diades
    Hi Maelstrom,

    Hey, no problem!

    It looks like there are not many avenues of research on this anyway as it seems little known and/or used.

    Its a great pity as they are very powerful. I believe that Mozilla has an equivalent called "xbl" which I also want to look into.

    Thanks for the reply.
    Have you tried www.devshed.com They have a lot of articals on xml and also have a forum dedicated to xml. You might find more xml experts there.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  9. #9
    SitePoint Member
    Join Date
    Oct 2001
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Maelstrom

    Funnily enough, I belong to devshed, just did'nt think of them. I have posted on wrox p2p xml though. Thanks.
    Cheers,

    Keith

  10. #10
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Keith,

    I know I might have given you this link before, but it might be what you want. Also, you might wanna try e-mail the guy who owns that site...very smart and might be able to help with whatever you need.

    http://www.pbwizard.com/Articles/DownloadDoc.htm

    aDog

  11. #11
    SitePoint Member
    Join Date
    Oct 2001
    Location
    UK
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Little Dog!

    Good to hear from you!

    Yes, I have that link. But it is basically about downloading which is, now at least, a "built-in" behavior if I remember correctly. I must admit though, I did'nt think of mailing him. He is a buddy of MMI isn't he?
    Cheers,

    Keith

  12. #12
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by diades
    He is a buddy of MMI isn't he?
    Hmmm, not that I know of. You always might wanna try just some newsgroups; there a few probably good ones in which someone will prolly answer you.

    aDog


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •