Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Exclamation Replacing/Generating Code Incrementally

    Ok so here's my code:

    Code:
    <div class="imagelinkbordering">
    
    <a href='../player.swf' class='lightview' title="Bleach::Episode d####:: width:WWWW, height: HHHH, overlayClose: false, flashvars:'file=../video/bleachf####.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&autostart=true&duration=DDDDD'"><img src='../images/bleachi####.jpg' class="imagelinkborder"/></a>
    
    <div class="textbelow">Bleach: e####</div>
    
    </div>
    and these are the variables I want to replace with either incrementally increasing numbers:

    Code:
    i####
    d####
    e####
    f####
    WWWW
    HHHH
    DDDD
    I want to generate this code 209 times. Is there some program I can use that will make this easier then going in and replacing each variable 209 times? I need to figure this out as soon as possible. Thanks!!!

  • #2
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts
    anyone?

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Exclamation

    As I didn't get any other ideas as to how I was going to go about this I generated this by hand. This is only a fifth of what I did. It took me forever around three hours... There must be a better way that I can handle this in the future though. I'm going to have to create one similar to this in a couple days that'll be around a thousand instances. Please if anyone has any better approaches, such as a program where you can fill in the fields that will remain constant and then assign a pattern to the others... If I don't come up with a better way, I'll be forced to do it like I did here... I don't want to even think about how that will turn out...
    Code:
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 001:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach001.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach001.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 001 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 002:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach002.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach002.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 002 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 003:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach003.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach003.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 003 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 004:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach004.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach004.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 004 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 005:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach005.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach005.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 005 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 006:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach006.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach006.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 006 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 007:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach007.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach007.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 007 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 008:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach008.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach008.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 008 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 009:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach009.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach009.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 009 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 010:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach010.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach010.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 010 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 011:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach011.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach011.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 011 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 012:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach012.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach012.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 012 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 013:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach013.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach013.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 013 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 014:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach014.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach014.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 014 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 015:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach015.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach015.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 015 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 016:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach016.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach016.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 016 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 017:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach017.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach017.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 017 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 018:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach018.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach018.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 018 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 019:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach019.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach019.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 019 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 020:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach020.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach020.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 020 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 021:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach021.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach021.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 021 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 022:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach022.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach022.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 022 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 023:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach023.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach023.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 023 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 024:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach024.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach024.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 024 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 025:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach025.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach025.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 025 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 026:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach026.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach026.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 026 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 027:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach027.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach027.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 027 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 028:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach028.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach028.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 028 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 029:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach029.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach029.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 029 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 030:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach030.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach030.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 030 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 031:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach031.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach031.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 031 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 032:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach032.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach032.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 032 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 033:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach033.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach033.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 033 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 034:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach034.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach034.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 034 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 035:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach035.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach035.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 035 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 036:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach036.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach036.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 036 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 037:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach037.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach037.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 037 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 038:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach038.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach038.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 038 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 039:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach039.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach039.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 039 </div>
    </div> 
    <div class="imagelinkbordering">
    <a href="../player.swf" class="lightview" title="Bleach::Episode 040:: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach040.mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'"><img src="../images/bleach040.jpg" class="imagelinkborder"/></a>
    <div class="textbelow">Bleach: 040 </div>
    </div>

  • #4
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    I don't imagine this would be too tough to implement in a javascript. Have you done much googling for this?

    I'd start there and then, worst case, pick up some javascript know-how at w3schools.com and code your own. You could make the javascript barf up the code into a webpage then just copy and paste...
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • Users who have thanked Rowsdower! for this post:

    mwgriffin (03-13-2009)

  • #5
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts
    yeah, I haven't gotten too much into java script. And I'm afraid I won't be able to find something in time. I googled the hell out of this, I dunno... I'll keep looking.

  • #6
    Regular Coder
    Join Date
    Jan 2009
    Posts
    316
    Thanks
    7
    Thanked 92 Times in 91 Posts
    Try this. Just change the variable i for the number of entries you have. Yes I know it's messy.

    One thing though, I'm not sure how to output the number in the form of "001" instead of just "1". Maybe somebody else knows?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <script type="text/javascript">
    var first="&lt;div class=\"imagelinkbordering\"&gt;";
    var second="&lt;a href='../player.swf' class='lightview' title=\"Bleach::Episode ";
    var third=":: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach";
    var fourth=".mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'\"&gt;&lt;img src=\"../images/bleach";
    var fifth=".jpg\" class=\"imagelinkborder\"/&gt;&lt;/a&gt;";
    var sixth="&lt;div class=\"textbelow\"&gt;Bleach: ";
    var seventh=" &lt;/div&gt;&lt;/div&gt;";
    var i=1;
    for (i=1;i<=200;i++)
    {
    document.write(first);
    document.write("<br />");
    document.write(second +i);
    document.write(third +i);
    document.write(fourth +i);
    document.write(fifth);
    document.write("<br />");
    document.write(sixth +i);
    document.write(seventh);
    document.write("<br />");
    }
    </script>
    </body>
    </html>

  • Users who have thanked Fisher for this post:

    mwgriffin (03-13-2009)

  • #7
    Regular Coder
    Join Date
    Mar 2009
    Location
    Portland Oregon
    Posts
    690
    Thanks
    44
    Thanked 63 Times in 62 Posts
    Hope it's right.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <script type="text/javascript">
    var first="&lt;div class=\"imagelinkbordering\"&gt;";
    var second="&lt;a href='../player.swf' class='lightview' title=\"Bleach::Episode ";
    var third=":: width: 848, height: 480, overlayClose: false, flashvars:'file=../video/bleach";
    var fourth=".mp4&backcolor=000000&frontcolor=FFFFFF&lightcolor=FFCC00&logo=../logo64.png&skin=../modieus.swf&controlbar=over&wmode=transparent&autostart=true&duration=1441'\"&gt;&lt;img src=\"../images/bleach";
    var fifth=".jpg\" class=\"imagelinkborder\"/&gt;&lt;/a&gt;";
    var sixth="&lt;div class=\"textbelow\"&gt;Bleach: ";
    var seventh=" &lt;/div&gt;&lt;/div&gt;";
    var i=1;
    for (i=1;i<=200;i++)
    {
    if(i<9){text="00"}
    if(i>9){text="0"}
    if(i>99){text=""}
    document.write(first);
    document.write("<br />");
    document.write(second+text +i);
    document.write(third+text +i);
    document.write(fourth +text+i);
    document.write(fifth);
    document.write("<br />");
    document.write(sixth+text +i);
    document.write(seventh);
    document.write("<br />");
    }
    </script>
    </body>
    </html>

  • Users who have thanked TinyScript for this post:

    mwgriffin (03-13-2009)

  • #8
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Hey thankyou soo much. I'm going to go home right now an test it out. That's completely awesome! I'll let you know how it works out. This really makes me want to learn javascript!!!

  • #9
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Yeah that totally works. Thank you sooo much!

  • #10
    Regular Coder
    Join Date
    Mar 2009
    Location
    Portland Oregon
    Posts
    690
    Thanks
    44
    Thanked 63 Times in 62 Posts
    hey, I made a little mistake. it should beif
    Code:
    (i<=9){text="00"}
    it means less than or equal to.
    right now, 9 will be screwed up.
    Be sure to add it in. Sorry, I wasn't thinking.

  • #11
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts
    lol. yeah I found that out pretty quick. Thanks for noticing it though. Javascript seems really similar to python and mel which I've used extensively. I'm definitely going to learn it as i'm sure it will come in handy. Thanks again!

  • #12
    New Coder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    4
    Thanked 4 Times in 4 Posts
    actually I noticed that funny enough, for the ninth one, even without that change it still works... odd. oh I think I know why. It may be because "text" was still defined as being equal to 00 and it would stay that way until redefined (at i>9 etc). so it still worked. heh heh heh. I'll change it anyway just to avoid any mistakes.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •