hallo,
hab mir ein newsscoller gezogen, der's wirklich in sich hat.
klasse teil mit doku, aber für einen js-laien nicht nachvollziebar!
das problem:
möchte gerne html in diesem scroller verwenden,
leider bleibt das "wie" ein offenes geheimnis. die doku sagt folgendes, wie man's machen sollte:
Images and other HTML in news items
Open the source file newsscroller.js. Change the NewsScroller_RenderChildren() function, replacing the part that calls document.createTextNode(this.itemsText[nItem]) with code that modifies the innerHTML property of the elmA object, which is the anchor (A) element for the news item.
die entsprechenden zeilen:
	
demo:
http://www.sharepointcustomization.c...er_example.htm
doku:
http://www.sharepointcustomization.c...#Customization
kann mir jemand, der das versteht weiterhelfen?
danke, gruss
b.
					hab mir ein newsscoller gezogen, der's wirklich in sich hat.
klasse teil mit doku, aber für einen js-laien nicht nachvollziebar!
das problem:
möchte gerne html in diesem scroller verwenden,
leider bleibt das "wie" ein offenes geheimnis. die doku sagt folgendes, wie man's machen sollte:
Images and other HTML in news items
Open the source file newsscroller.js. Change the NewsScroller_RenderChildren() function, replacing the part that calls document.createTextNode(this.itemsText[nItem]) with code that modifies the innerHTML property of the elmA object, which is the anchor (A) element for the news item.
die entsprechenden zeilen:
PHP Code:
	
	
// Supporting functions
function NewsScroller_RenderChildren()
{
    var sControlID = this.renderedControl;
    elmControl = document.getElementById(sControlID);
    
    // <DIV>
    elmDiv = document.createElement("div");
    elmDiv.style.position = "absolute";
    elmDiv.style.left = "0px";
    elmDiv.style.width = "100%";
    elmDiv.style.height = "100%";
    elmDiv.style.overflow = "hidden";
    elmControl.appendChild(elmDiv);
    
    for (var nItem = 0; nItem < this.itemCount; nItem++)
        {
        var sItemName = sControlID + nItem.toString();
        
        var elmP = document.createElement("p");
        elmP.id = sItemName;
        elmP.style.position = "relative";
        elmP.style.top = "0px";
        elmP.style.width = "100%";
        elmP.className = this.itemNormalClassName;
        elmDiv.appendChild(elmP);
        
        var elmA = document.createElement("a");
        elmA.className = this.itemNormalClassName;
        elmA.href = this.itemsLink[nItem];
        elmP.appendChild(elmA);
        
        var tn = document.createTextNode(this.itemsText[nItem]);
        elmA.appendChild(tn);
        
        }
} 
demo:
http://www.sharepointcustomization.c...er_example.htm
doku:
http://www.sharepointcustomization.c...#Customization
kann mir jemand, der das versteht weiterhelfen?
danke, gruss
b.
 
          

 
 
							
						 
  
							
						
Comment