Search Results

Search found 6 results on 1 pages for 'nemiss'.

Page 1/1 | 1 

  • Faster image loading

    - by nemiss
    I want to display about 5-8 images on my page, one by one, but I would like them to pre-load one and not loading them each time i switch to anohter image. I have seen some examples where they have all images (hidden) on the page something like: <a href=""><img id="img1" src="images/image1.png" class="image" alt="" /></a> <a href=""><img id="img2" src="images/image1.png" class="image" alt="" /></a> <a href=""><img id="img3" src="images/image1.png" class="image" alt="" /></a> And the unhide the current image. And what I have is one image that i change it's src attribute for path for new images from th array. SwitchNextImage: function(){ var theimg=document.getElementById("imgContainer"); this.currentIndex = this.currentIndex+ 1 == this.totalImageCount ? 0 : this.currentIndex + 1; theimg.src=this.slideimages[this.currentIndex].src; } The first method is obviously faster loading. But requies static links. My questions is how can I make my method more faster loading?

    Read the article

  • Adding <tr> from repeater's ItemDataBound Event

    - by nemiss
    My repeater's templates generate a table, where each item is a table row. When a very very specific condition is met (itemdata), I want to add an additional row to the table from this event. How can I do that? protected void rptData_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { bool tmp = bool.Parse(DataBinder.Eval(e.Item.DataItem, "somedata").ToString()); if (!tmp && e.Item.ItemIndex != 0) { //Add row after this item } } } I can use e.Item.Controls.Add() and add TableRow but for that I need to locate a table right? How can I solve that? UPDATE I will explain now why I need this: I am creating a sort of message board, where data entries are displayed in a tabled style. The first items in the table are "important" items after those items, i want to add this row. I could solved it using 2 repeaters, where the first repeater will be bounded to pinned items, and the second repeater will be bounded to refular items. But I don't want to have to repeaters nor I want to complex the business logic for separating the fetched data to pinned and not-pinned collection. I think the best opton is to do it "onfly", using one repeater and one datasource.

    Read the article

  • Help with prototype object

    - by nemiss
    Hi, I am mlearning javascript and have some trouble creating an onject via prototype. I have this: <script type="text/javascript"> function myclass(a, b, c) { if (arguments.length) { this.Init(a, b, c); } } myclass.prototype.Init = function(a, b, c) { this.param1 = a; this.param2 = b; this.param3 = c; }; myclass.prototype.Print = function() { alert(this.param1 + '-' + this.param2 + '-' + this.param3); }; var myObject = myclass(3, 5, 6); myObject.Print(); </script> but I get an error on line with this.Init(a, b, c); Error: Object doesn't support this property or method

    Read the article

  • Displaying images in one line inside a shorter div

    - by nemiss
    How can I set all images in one line and display only the first 200px of them inside the div? Without breaking the layout, or moving images to a next line. online demo <div id="thumbsContainer"> <ul> <li><img src="http://img214.imageshack.us/img214/6030/small3.jpg" alt="" /></li> <li><img src="http://img263.imageshack.us/img263/5600/small1ga.jpg" alt="" /></li> <li><img src="http://img638.imageshack.us/img638/3521/small4j.jpg" alt="" /></li> <li><img src="http://img682.imageshack.us/img682/507/small5.jpg" alt="" /></li> <li><img src=" http://img96.imageshack.us/img96/6118/small2o.jpg" alt="" /></li> </ul> </div> #thumbsContainer { width:200px; overflow:hidden; } ul { list-style:none; } li { float:left; }

    Read the article

  • SQL query multi table selection

    - by nemiss
    I have 3 tables, - Section table that defines some general item sections. - Category table - has a "section" column (foreign key). - Product table - has a "category" column (foreign key). I want to get all products that belong to X section. How can I do it? select from select?

    Read the article

1