Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

javascript - sharepoint breadcrum trail editing on the fly -


i have been searching hours , have found code claims able want however...it doesn't.

i trying remove pages , .aspx off end of page name in breadcrumb trail in sharepoint. like.... mysite > myarea > pages >mypage.aspx

i have tried changing sitemapprovider , takes away pages link current page. looked like.. mysite > myarea.

i have mysite > myarea >mypage have tried using snippet of code...i not claim own or have developed code.

var breadcrumbs = document.getelementbyid('ctl00_placeholdertitlebreadcrumb_contentmap') if (breadcrumbs != null) {     if (breadcrumbs.childnodes.length >= 3) {         if (breadcrumbs.childnodes[2].innerhtml.indexof('pages') > 0) {             breadcrumbs.childnodes[1].innerhtml = "";             breadcrumbs.childnodes[2].innerhtml = "";         }     } } 

i put document.writes in see code getting , breadcrums variable seems null therefore code never gets juicy part :p

any ideas hints tips hugely appreciated

truez

i have run code on sharepoint site , able breadcrumbs element fine. have verified that correct id of breadcrumbs object. id use default, should check. view source on page , quick ctrl-f , search "breadcrumb".

too see if matter of placement, this: on target sharepoint page using ie, open web developer tool (tools > developer tools). switch script tab , press multi line mode button @ bottom of script pane. paste code:

var breadcrumbs = document.getelementbyid('ctl00_placeholdertitlebreadcrumb_contentmap') if (breadcrumbs != null) {     if (breadcrumbs.childnodes.length >= 3) {         if (breadcrumbs.childnodes[2].innerhtml.indexof('pages') > 0) {             breadcrumbs.childnodes[1].innerhtml = "";             breadcrumbs.childnodes[2].innerhtml = "";         } else {             alert('pages node not found!');         }     } else {         alert('breadcrumbs has ' + breadcrumbs.childnodes.length + ' children!');     } } else {     alert('breadcrumbs not found!'); } 

then press run script button. code yours alerts added see if/where fails. if no alerts , breadcrumbs element changes expect yes placement. otherwise, depends on alert get. let me know results , can correct issue.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -