HTML - Generating A Positioning Random Images
First off, hello everyone, I would like to start by telling everyone thank you for letting me a part of this forum. Now, as to my topic.
I am looking for a script that generates a random image of four that I have selected and postions it in the lower left hand corner of the screen every time the screen is refreshed. The only thing is, I need this to be compatible with myspace's possibilites. I would tremendously help it if anyone could give me a helping hand on this issue. I have searched google several times for some help, but all the solutions involve either java script or a certain amount of knowledge of html, neither which I have. Thank you for your time, and here are the urls of the images, I would like shown. http://i23.photobucket.com/albums/b3...cience/All.jpg http://i23.photobucket.com/albums/b3...nce/Turkey.jpg http://i23.photobucket.com/albums/b3...ence/Panzy.jpg http://i23.photobucket.com/albums/b3...ce/Curious.jpg Again, thank you a lot. Similar TutorialsHey All, I would like to have a site similar to lol.com, in which the page changes upon every visit. I have been researching and i have found this : http://baremetal.com/gadgets/sequence.html It looks very cool, however i can't implement this, as i NEED to have their hosting, Gay! Anybody know of a random script thing i could use? I would be very gracious, I found a dhtml script, however it was not good enough, somebody could eaisily copy the source, which they wouldn't of been able to had they done the above URL^ Thanks all! I'm positioning an image within a divison that also has a paragraph of text. I've got the image floating right. It has these settings: display: inline; clear:both; float: right; I've added padding on the right side to move the image to the left or to control it's right margin so that it's not tight to the right edge of the page. When I apply a border to the image it also goes around the padding which is goes out away from the image. What is recommend as another way to control the right margin or to move image left without the padding? Think I might have it, making positioning relative and then changing right position. Hi all, Graphic designer here hell bent on learning web design with a question probably asinine for all those viewing but vexing to me for the last week. I have a site beautifully designed (can be seen here as a static jpeg) and seemingly straight forward and basic but making it functional on the web as I designed is proving to be quite the arduous task. I have many questions concerning this project but I'll keep this thread focused on the code for positioning images on the navbar. I have the buttons (67px by 14px) and sidebar (36px by 594px) all measured out and have tried a few different semantics to accomplish this but all for not. The images always end up stacking in the top left corner. HTML Code: <body> <div id="butttons"> </div> <div id="nav"> <img src="images/layout/images/Side_nav.png"/> </div> <div id="butttons"> <div id="nav_Home"> <img src="images/layout/images/Home.png"/> <div id="nav_Portfolio"> <img src="images/layout/images/Portfolio.png"/> <div id="nav_Contact"> <img src="images/layout/images/Contact.png"/> </div> </body> And then this is the Refferenced style sheet HTML Code: #nav { position: absolute; top: 0px; left: 0px; } div.nav_side { background-image: url(images\layout\Side_nav.gif); background-repeat: no-repeat; background-position: top center; width: 36px; height: 594px; } #buttons { position: absolute; background-repeat: no-repeat; background-position: top center; top: 500px; left: 36px; } .nav_home { background-image: url(images\layout\Home.gif); background-repeat: no-repeat; background-position: top center; position: absolute; top: 552; left: 35; width: 67px; height: 14px; } .nav_Portfolio { background-image: url(images\layout\Portfolio.gif); background-repeat: no-repeat; background-position: top center; position: absolute; top: 566; left: 35 width: 67px; height: 14px; } .nav_Contact { background-image: url(images\layout\contact.gif); background-repeat: no-repeat; background-position: top center; style="position: absolute; top: 580; left: 35;"/> width: 67px; height: 14px; } I literally just started learning Html /CSS / Java a month ago; spare no details! ANY help with ANY (text formatting, background gradient that adjusts relative to a screen size, rollovers on the nav etc...) part of putting this site together will be more appreciated then most can fathom. I'd be willing to exchange some graphic work if any of you stuck this out to the end with me. I want to use my images as links, but I also want them absolutely positioned relative to their parent div. However I have come across a problem, to make them links I need to wrap <a>s around them which then means their positioning becomes relative to the anchor tag. Can anyone suggest anything to counteract this problem? I do need them absolutely positioned. The only alternative is an image map, but I'm reluctant to do that because of the slow load time for the whole image, plus all the extra co-ordinate coding I'd have to do. Hi, any possible way I can make a table show an image which is randomly selected from a bunch of them? Would I need javascript? something like I have 5 images that are 400x100 and I would want one of the 5 to be randomly selected and displayed each time the page is viewed. Or maybe each day it changes like igoogle home. Hi, I have to edit some part of my website and I need to easily know from which php files my html code is generated. Is there any easy way to know it ? thanks hey guys...i've seen the page of sourceforge where, when the page loads...the download of the file generates automatically.... i want the help related to implement that.... can anyone tell me how to do that.... thanks in advance... Hello. I have a small script developed for tracking sales. The script randomly generates a "transaction ID" by creating a random number when a user visits the thank you page. It works great, however there is one problem: when a repeat user comes back, it generates a NEW transaction ID and logs a second "sale" when in fact its just a repeat visit. How can I modify this script to remember the transaction ID for each user? I was thinking creating a cookie with the transaction ID would be the simplest way, however I'm not sure. If you can help me decide which way is best, and then show me how to implement this I will be very greatful. Basically I think I would need some sort of second variable, and a script that runs to check for a cookie. If cookie is present, replace "$random_number" with "transaction ID". else if no cookie is present, generate a new number with $random_number. Heres the code: Code: <!------- Random Number Generator For Pixel ----------> <?php srand ((double) microtime( )*1000000); $random_number = rand(0,100000); echo "<script src='https://users.domain.com/sale_third/49.95/$random_number/OPTIONAL_INFORMATION'></script> <noscript><IMG SRC='https://users.domain.com/track_sale/49.95/$random_number/OPTIONAL_INFORMATION'></noscript>"; ?> <!------- End Random Number Generator For Pixel ----------> Thanks in advance. Hey there! Is it possible to have a random GIF file loaded each time you open the site? For example if you open the page now, an animated GIF will load to advertise x and when you go to the same page later, an ad will load to advertise y. Thanks in advance! I on the mainpage of my site, i have a enter button, however I have 4 different sites. I want when you click enter, it brings you to 1 of the 4 at random each time... how would i go about that? thanksss. its much appreciated to whoever trys or can help. Say I have 10+ 468x60 banners I was wondering if there is anyway of having them show up randomly in one spot when you refresh the page. For example here is an ad I'm using: <script type="text/javascript" language="javascript" src="http://www.tkqlhce.com/placeholder-2762512?target=_blank&mouseover=N"></script> I know there is a way to random images but how do you randomize scripts? Hello everyone. Sorry for appearing to be another person to register with "vitally important question" and then probably never be seen again, but I think I'll be using this site to learn as much as I can about HTML. Anyway, my question is about HTML, but not for a website. It's for an iPhone widget. I don't want to advertise for any other forums or anything, but there is currently a tweak in development that allows for windows phone 7 live tiles on an iPhone. They use HTML code and as you can tell, I'm not a coder. There is a slideshow widget available that displays a random picture from a set location. I'm very new to HTML, but I have figured out quite a bit by changing a value and having a look at what it did. There is one thing that has me completely stumped though and this is what I would like to know. In the following code, it has the [Math.floor(math.random() bit. I've tried to add a 1 in the brackets, I've tried changin the random to no and false, I've tried just removing the line and I still can't get it. <html> <head> <meta name="viewport" content="width=238, user-scalable=no" /> <script> window.onload = onLoad; var array = "101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124".sp lit("|"); function onLoad(){ document.getElementById("show").src = array[Math.floor(Math.random()*array.length)] + ".png"; setTimeout(onLoad,1*200); } </script> </head> <body> <img src = "overlay.png" style = "position:absolute;top:0px;left:0px;z-index:1;"/> <img id ="show" style="position:absolute;top:-0px;left:0px;width:238px" /> </body> </html> What I want is for it to cycle through all the images in order. Any help would be greatly appreciated. THanks. Hi there, I have created a site that can be viewed at www.prestigeinteractive.com/legacy2 On this site I have utilized a basic two column design with both a header and a footer. You may need to look at the first page to know what i am talking about. Upon creating the site I wanted to make the athletes on the page extend beyond the borders of the site's wrapper. In order to do that and maintain reasonable filesizes, I opted to splice the images. I used a jpeg for the large part within the wrapper, and used a png in a absolute positioned div for the parts that are to extend beyond the site's wrapper/container (needed a transparent image to display the border and site's background properly). The friend I am making the site for asked if I could set it up so that there can be a number of images that randomly load when a user enters the home page. I am not sure it that is possible using the format I've implemented (2 images properly aligned). Can this be done? I've done it before with single images within a div tag, but not two that need specific coordinates to appear aligned correctly. If "yes this can be done", could someone kindly point me in the right direction to find a tutorial on this. If not, I'd appreciate knowing this as well, as I'll need to come up with an alternative plan. Thank you for your time, G I have this code below, and i would like it to randomly place 2 X's in any of the boxes, and each time i refresh the page the X's could end up in any of them, any idea how to do it? Thanks Dr Ben HTML Code: <html> <head><title></title></head> <body> <form name="placeships" action="board.php" method="post"> <table> <tr> <td align="center" bgcolor="black"><input type="text" id="1" class="hide" name="1" value="" size="2"> </td> <td align="center" bgcolor="black"><input type="text" id="2" class="hide" name="2" value="" size="2"> </td> <td align="center" bgcolor="black"><input type="text" id="3" class="hide" name="3" value="" size="2"> </td> <td align="center" bgcolor="black"><input type="text" id="4" class="hide" name="4" value="" size="2"> </td> </tr> <tr> </tr> <input value="submit" name="submit" type="submit"> </form> </body> </html> I used this code here but it doesnt seem to work for GoogleChrome browser well, as it did for the others. Is there a code that will work for all the browsers? HTML Code: <html> <head> <script language="javascript"> function randomBackground() { var myImages = Array(); myImages[0] = 'xxx.jpg'; myImages[1] = 'xxx.jpg'; myRandomNumber = Math.floor(Math.random()*myImages.length); document.body.style.backgroundImage = 'URL('+myImages[myRandomNumber]+')'; } </script> <style type="text/css"> body { background-attachment: fixed; background-repeat: no-repeat; } </style> </head> <body onload="randomBackground();"></body> I want to create a lotto system on my vbulletin forum..I have designed .gif graphics for each ball 1-49. I need a script ( whether java or html ) to randomly select 6 numbers without selecting the same number twice...I have saved the balls as smilies, so need the results to show lb1 lb2 lb3 etc... I hope you understand what I mean... Any help would be very much appreciated Okay... Here is what I'm trying to do...and not really sure as an HTML novice where to even start. I have something called a 'blogwall' on my site, it's url is he http://www.weusecoupons.com/index.php?pageid=blogroll What I would like to do, is on the main page: www.weusecoupons.com Have a ONE of the 125x125 buttons appear randomly. Is this a simple thing? All images are hosted locally!! Thanks for your help. I am an Admin for a PC gaming clan ( |ESF| ), and we have several game servers. Our goal is to have a random "server of the day" widget on the main page of the site. Here is what we need it to do: > Show the same server for all visitors to the page > Show the same server for a 24 hour period, say from 12am - 11:59pm > Have the code editable in case we change/add/remove a server I have some experience in Vb6 and Vb.Net, but not much HTML. I would assume the code would be something similar to: Dim SOTD As New String (Server of the Day) "Server List" Dim s1 As New String (Server 1) Dim s2 As New String (Server 2) Dim s3 As New String (Server 3) If TimeOfDay Is 12:00am Then Show SOTD(Random Server from List) Until TimeOfDay Is 11:59pm End If I know that isn't close to HTML, but it should help get the overall point across. Any help to get us closer to this goal is MUCH appreciated. If I wasn't specific enough with the above information, please let me know what else you need to know. It's very late and I'm super tired. Thank you in advance. Maybe someone here can shed some light on this for me. I am trying to create a site which displays 12 random questions from a pool of a few hundred. A visitor will come to the site, answer the questions and see the results, much like a poll but they will be randomly generated. I am lost as to where to start on this. I tried a poll type approach but that was not the answer. Those were fixed questions and the polls were powered by other sites. Anyone have ideas or tips on how I can start on this? How would i show a random image? When people come onto my site, i want the header to be random out of about, 6 different ones. When you refresh the page, it changes the image. (for more explaingin, ha) How would i go about doing this? |