Results 1 to 4 of 4

Thread: a name ??????????????????

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    8
    Vote Rating
    0
      0  

    Post a name ??????????????????

    ????????????

    Ajax?????html????????Ext.Panel??????Web?????????????????

    ajax01 = function(callback, code){
    Ext.Ajax.request({
    url: 'http://www.foo.bar.jp/sample.html',
    success: function(result, opt){
    var html = result.responseText;
    panel01.update(html);
    },
    failure: function(result, opt){
    window.alert('Request failed');
    }
    });
    };

    ?????HTML?? ?a name="foo"? ??????????????????
    ???? sample.html#foo ??????????????????????

    ??? Ext.Panel ?????????????????????????????
    Ext.Panel ???????????????? scrollTo() ?????????????????
    ??????????? a name ?????????????????

    ?????????????????????????????????????????
    ??????????????????????

    getElementsByName ? getElementById ????????????????????
    ????????????

    ??????????????
    ??????????????????????????
    ???????????

  2. #2
    Sencha User mashiki's Avatar
    Join Date
    Oct 2007
    Location
    Japan
    Posts
    139
    Vote Rating
    0
      0  

    Default

    ??????getTop()?????????????
    ????????????????????????
    aname???????top??????html???????top?????
    ????????????y??????????

    ???extJS?????????????????????????
    ??????senchatouch????????

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    8
    Vote Rating
    0
      0  

    Default

    ???????????
    ???????

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    8
    Vote Rating
    0
      0  

    Default

    ??????????????????????????????????????????????
    JavaScript?????????????????????????????????????
    ?????????????????????????1?2????????????????????????????????????????

    //?????????????????????????
    var offset = 0;
    var parent = webpanel.getEl().dom.getElementsByClassName('x-scroller');
    if(parent.length > 0){
    topoffset = GetTop(toplist.item(0));
    }

    //a name??????????
    var newtop = 0;
    var targettag = 'a name="aaa"';
    var taglist = webpanel.getEl().dom.getElementsByTagname('a');
    if(taglist.length > 0){
    for(var i = 0; i < taglist.length; i++){
    var elmNode = taglist.item(i);
    if(elmNode.outerHTML.indexOf(targettag, 0) > -1){
    newtop = GetTop(elmNode) - topoffset;
    //???????
    Ext.getCmp('webpanel').scroller.scrollTo({x:0, y:newtop}, true);
    }
    }
    }

    ?GetTop???????????????????????
    http://morecavalier.com/index.php?wh...eft+and+GetTop

Posting Permissions

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