2006年04月28日

AJAX越来越多的应用到网页交互上,但是用AJAX做交互也有一些问题,比如传统网页的浏览是一个一个页面切换,所以可以用浏览器的后退按钮和前进按钮切换到指定的浏览过的页面,也就是浏览器的history.
但是用AJAX做交互的时候,是通过js+xmlhttp来获取其他页面信息,对于浏览用户来说,是一个隐性的UE,感觉不到浏览器地址栏的URL的变化,对浏览器来说,地址栏的URL没发变化,产生不了HISTORY。
不是说在用AJAX做交互的时候,BACK按钮的问题就解决不了,对于AJAX应用很成熟的网站比如google等,这些都已经解决。有热心的老外已经提供了解决方法,粗粗看了看,原理是用了iframe,有兴趣的自己去研究吧
老外管这个叫:Really Simple History framework,还有专门的AJAX history libraries

原文介绍:点击这里浏览
先看一个演示吧:
http://www.donotremove.co.uk/extra/ajax-nav/index.html

这个演示的下载地址,是PHP的
http://www.contentwithstyle.co.uk/resources/ajax-nav/ajax-nav.zip

另一篇文章介绍:点击这里浏览

这篇文章例子的下载:点击这里下载


Browser Bookmarking Back button
IE6/PC Yes Yes
IE5.5/PC Yes Yes
IE5/PC Yes Yes
IE5/Mac No No
Firefox/PC Yes Yes
Firefox/Mac Yes Yes
Safari1.2/Mac Yes No


2006年04月25日

代码:

<script type="text/javascript">
function addBookmark(title,url) {
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}
</script>

页面使用:<a href=javascript:addBookmark(‘dodoblog’,'http://blog.donews.com/dodo’)>
  添加到收藏</a>



试用一下下


添加到收藏



2006年04月21日

原文链接 http://www.sacredcowdung.com/archives/2006/03/all_things_web.html


Everything Web 2.0

AUDIO 2.0

 

BLOG2POD 2.0

 

BLOGGING 2.0

 

BOOKMARKING 2.0

 

BROWSER 2.0

 

CALENDAR 2.0

 

CHAT 2.0

 

COLLABORATION 2.0

 

COLLECT 2.0

 

COMIX 2.0

 

COMMUNICATION 2.0

 

COMMUNITY 2.0

 

CRM 2.0

 

DBASE 2.0

 

DESIGN 2.0

 

DICTIONARY 2.0

 

ECOMMERCE 2.0

 

ECONOMY 2.0

 

E-LEARNING 2.0

 

EMAIL 2.0

 

FILESHARING 2.0

 

FINANCIALS 2.0

 

FUN 2.0

 

GAMBLING 2.0

 

GAMES 2.0

 

HOSTING 2.0

 

IDENTITY 2.0

 

IMAGES 2.0

IMAGING 2.0

 

 

JOBS 2.0

 

KNOWLEDGE 2.0

LISTS 2.0

 

MAPPING 2.0

 

MARKETING 2.0

MEMO 2.0

 

MULTIMEDIA 2.0

 

NEWS 2.0

 

OFFICE 2.0

 

OS 2.0

 

OUTLOOK 2.0

 

PERSONAL MANUFACTURING 2.0

 

POLLS 2.0

 

PORN 2.0

 

PORTAL 2.0

 

POWERPOINT 2.0

 

PROJECTS 2.0

 

PUBLISHING 2.0

 

READ 2.0

 

RSS 2.0

 

SCHEDULING 2.0

 

SEARCH 2.0

 

SOFTWARE 2.0

 

STATS 2.0

 

TAGGING 2.0

 

TASK MANAGER 2.0

 

TEXT 2.0

 

TEXT2SPEECH 2.0

 

TIME MANAGEMENT 2.0

 

TRACK & TRACE 2.0

 

VIDEO 2.0

 

VOICE2MAIL

 

VOICEMAIL 2.0

 

WEB2FEED

 

WI-FI 2.0

  • Fon – Share, buy, sell wi-fi connections. www.fon.com

 

WIKI 2.0

 

WISHLIST 2.0

 

WORD 2.0

 

WRITE 2.0

2006年04月04日

Jscript有些属性其实挺好的,可惜就是只是IE支持,比如复制和粘贴的属性
下面这段复制和粘贴的JAVASCRIPT的代码倒是可以支持IE/FireFox/mozilla/ns,,老外站点上看来的
只是在firefox下需要修改一下about:config的一个属性

<script language="javascript" type="text/javascript">
<!–
function copy_clip(meintext)
{
 if (window.clipboardData)
   {
  
   // the IE-manier
   window.clipboardData.setData("Text", meintext);
  
   // waarschijnlijk niet de beste manier om Moz/NS te detecteren;
   // het is mij echter onbekend vanaf welke versie dit precies werkt:
   }
   else if (window.netscape)
   {
  
   // dit is belangrijk maar staat nergens duidelijk vermeld:
   // you have to sign the code to enable this, or see notes below
   netscape.security.PrivilegeManager.enablePrivilege(‘UniversalXPConnect’);
  
   // maak een interface naar het clipboard
   var clip = Components.classes['@mozilla.org/widget/clipboard;1']
                 .createInstance(Components.interfaces.nsIClipboard);
   if (!clip) return;
  
   // maak een transferable
   var trans = Components.classes['@mozilla.org/widget/transferable;1']
                  .createInstance(Components.interfaces.nsITransferable);
   if (!trans) return;
  
   // specificeer wat voor soort data we op willen halen; text in dit geval
   trans.addDataFlavor(‘text/unicode’);
  
   // om de data uit de transferable te halen hebben we 2 nieuwe objecten
   // nodig om het in op te slaan
   var str = new Object();
   var len = new Object();
  
   var str = Components.classes["@mozilla.org/supports-string;1"]
                .createInstance(Components.interfaces.nsISupportsString);
  
   var copytext=meintext;
  
   str.data=copytext;
  
   trans.setTransferData("text/unicode",str,copytext.length*2);
  
   var clipid=Components.interfaces.nsIClipboard;
  
   if (!clip) return false;
  
   clip.setData(trans,null,clipid.kGlobalClipboard);
  
   }
   alert("Following info was copied to your clipboard:\n\n" + meintext);
   return false;
}
//–>
</script>


notes about security:

a cause of the tight security settings in mozilla you have to sign the
javascript to make it work another way is to change your
firefox/mozilla settings



to do this add this line to your prefs.js file in your firefox/mozilla user profile directory



user_pref("signed.applets.codebase_principal_support", true);



or change it from within the browser with calling the "about:config" page

原文链接;:http://www.krikkit.net/howto_javascript_copy_clipboard.html

2006年04月01日

It uses an anchor link for the effect, because that is the only thing that Internet Explorer allows the :hover psuedo-class to work with. While my example page only has #
linked to, this could easily be pointed to a full version of the
respective images, or a website if you decide to use it for a design
portfolio. For now, it uses photos taken by family / friends (not pros)……………….

演示地址;:http://host.sonspring.com/hoverbox/
DEMO下载