zoukankan      html  css  js  c++  java
  • Rating投票控件点击后页面上跳的问题的解决

    From: "Marco, Esther, Janne en Cas Vervoort"
    To: "fhmsha@163.com" <fhmsha@163.com>
    Date: Sun, 29 Jul 2007 02:55:15 +0800 (CST)
    Subject: Re: Bug in Toolkit's rating control

    Hi
     
    Thanks for the solution. Everybody can download, alter and compile the sourcecode of the Toolkit. I've added an onclick="return false;".
     
    In version 1.0.10618 you change file Rating.cs near line 309 and insert the middle line:

    writer.AddAttribute("href", "#");
    writer.AddAttribute("onclick", "return false;");
    writer.AddAttribute("style", "text-decoration:none");

    Regards,
    Maro Vervoort 



     

    2007/7/28, fhmsha@163.com <fhmsha@163.com>:

    i have no time to deal with that yet,but i can give you something:

    in the link;http://www.youtube.com/watch?v=rp2hQd7mRS0
    the Code of Rating is:

     <a href="#" onclick="ratingComponent.setStars(1); return false;" onmouseover="ratingComponent.showStars(1);" onmouseout="ratingComponent.clearStars();"><img src="/img/icn_star_empty_19x20.gif" id="star__1" class="rating" style="border: 0px"></a>


    and in ASP.NET AJAX's Rating, http://asp.net/AJAX/Control-Toolkit/Live/Rating/Rating.aspx
    the Code of Rating is:

    <a href="#" id="ctl00_SampleContent_ThaiRating_A" title="2" style="text-decoration:none"><span id="ctl00_SampleContent_ThaiRating_Star_1" class="ratingStar filledRatingStar" style="float:left;">&nbsp;</span><span id="ctl00_SampleContent_ThaiRating_Star_2" class="ratingStar filledRatingStar" style="float:left;">&nbsp;</span><span id="ctl00_SampleContent_ThaiRating_Star_3" class="ratingStar emptyRatingStar" style="float:left;">&nbsp;</span><span id="ctl00_SampleContent_ThaiRating_Star_4" class="ratingStar emptyRatingStar" style="float:left;">&nbsp;</span><span id="ctl00_SampleContent_ThaiRating_Star_5" class="ratingStar emptyRatingStar" style="float:left;">&nbsp;</span></a>

    you can compare these codes and you will find that:the ASP.NET AJAX's code miss the "return false;" in "onclick" event.
    so you can modify the source code of ASP.NET AJAX,or just wait...

    if i have good news i will tell you.

    hope it can help you

    thanks

    fhmsha 


    From: mpj.vervoort
    To: fhmsha@163.com
    Date: Sat, 28 Jul 2007 03:31:06 +0800 (CST)
    Subject: [博客园留言通知]Bug in Toolkit's rating control(来自Marco Vervoort)


    Hi,

    I saw you wrote on Scot's blog a reply with:
    there is something NOT good for UI with Rating Control.
    the control of this release add a tag "<a href=#></a>".
    when i click the star to rate,if i stay in the bottom of the page,the page will go to the top.i think it is realy bad.

    I'm having the same problem. Do you perhaps have a solution to the problem? I'm planning to implement it on my personal self written blog: www.kobuz.net (sorry its in Dutch)

    Regards,
    Marco Vervoort


    发送者:Marco Vervoort
    Email:mpj.vervoort
    发送时间:2007-07-28 03:31
    消息来自: http://www.cnblogs.com/fhmsha/



  • 相关阅读:
    合格的PM的SkillSet
    SharePoint 客户端对象模型 (一) ECMA Script
    SharePoint 2010的学习-概览
    IT专业人士以及开发者眼中的SharePoint2010搜索
    某跨国公司Web2.0战略架构详解
    Extending your MOSS site with ASP.NET AJAX 1.0
    SliverLight Web part
    SHAREPOINT CAML列表查询
    SharePoint 2010 沙盒开发
    JS Bin 在线编辑代码,所见所得
  • 原文地址:https://www.cnblogs.com/fhmsha/p/838595.html
Copyright © 2011-2022 走看看