Jump to content

adam84

Members
  • Posts

    289
  • Joined

  • Last visited

Everything posted by adam84

  1. I am new to css and I have had quite a bit of problems getting this to work. Firstly, I created javascript gallery to display my pictures and what I want is when the user hovers over the image, I want some text to appear. But I cannot get the text to show Any ideas on my problems. Thanks CSS: body{ background:white; color:black; } /* --- IMG GALLERY --- */ #img_gallery{ margin:50px auto; width:900px; } #img_gallery a{ outline:none; border:none; } #img_gallery a img{border:none;} #tHeader{ width: 860px; overflow: hidden; height: 20px; background-color: #181818; color: white; text-align: left; font-weight: bold; } #img_gallery #wrapper{ overflow:hidden; padding:4px 2px; width: 860px; float:left; height:60px; background-color:#181818; position: relative; height:220px; } #items{ margin:0px 0px; padding:0px; list-style:none; width:50000px; position: relative; letter-spacing:0em; height:200px; } #items li{ float:left; list-style:none; margin-right: 25px; } #items .thumb{ width:150px; height:210px; cursor:pointer; margin:0px; padding:0px; } #fullimg .loading{ width: 24px; height: 24px; } #fullimg .thumb{display:none;} #items .item p, #items .item span{ display:none; text-indent: -2000em; } #moveleft, #moveright{ margin:0px; height:150px; color: white; width: 16px; text-indent: -1000em; text-decoration: none; z-index: 1000; display:block; cursor: pointer; float:left; } #moveleft{background: url('images/left.gif');} #moveright{background: url('images/right.gif');} #moveleft:hover, #moveright:hover{ background-position:bottom; } /* ---Pop up---*/ #item:hover{ background-color: transparent; z-index: 50; } #item span{ /*CSS for enlarged image*/ position: absolute; background-color: lightyellow; padding: 5px; left: -1000px; border: 1px dashed gray; visibility: hidden; color: black; text-decoration: none; } #item span img{ /*CSS for enlarged image*/ border-width: 0; padding: 2px; } #item:hover span{ /*CSS for enlarged image on hover*/ visibility: visible; top: 0; left: 60px; /*position where enlarged image should offset horizontally */ } PHP echo "<div id=\"img_gallery\">"; echo "<div id=\"tHeader\"> New Movies</div>"; echo "<a href=\"#\" id=\"moveleft\">Left</a>"; echo "<div id=\"wrapper\">"; echo "<ul id=\"items\">"; while( $row = mysql_fetch_array( $r ) ){ echo "<li>"; echo "<a href=\"viewMovie.php?movieID=" . $row['movieID'] . "\" class=\"item\">"; echo "<img class=\"thumb\" src=\"" . $row['img_poster'] . "\"/>"; echo "<span><img src=\"media/ocean.jpg\" /></span>"; echo "</a>"; echo "</li>"; } echo "</ul>"; echo "</div>"; echo "<a id=\"moveright\" href=\"#\">Right</a>"; echo "</div><br clear=\"all\"/>";
  2. Thanks man for your help
  3. http://www.blockbuster.com/ Its the way the New Releases, DVD Spotlight, etc are set up, with the two arrows and all that. I want to add this to my site but I dont know what its called. So i cant google it or anything. Thanks
  4. I created a field called counter, which get increased by 1 everything a record is retrieved and it will restart back to one every time it reaches 3. Formula Field: counter numberVar c = 0; Whileprintingrecords; c := c + 1; if c > 3 then c := 1; I have another field that I want to concatenate the results together StringVar data; Whileprintingrecords; data & {@fieldName} The last field I have, I want to have the {@counter} But for some reason when I run the report I get the result of 0 0 0 1 D Not 1 2 3 1 My problems are that my counter isn’t working correctly and the data isn’t being concatenated together, it seems like there is a line break after the data. Any help? Thanks
  5. adam84

    [SOLVED] Help

    thanks
  6. Im trying to retrieve the value: '82 minutes' from a string. Any suggestions on what I need to do. This is what I have, but it doesnt work $pattern = "[0-9] /minutes/"; Thanks
  7. totally. I got the error: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash
  8. I want to get rid of different references (ie the '[1]' ) within my text. For instance: "I went to the store today[1]. Tomorrow I will get some carrots.[3]" $pattern = \[[0-9]\]; Is this correct?
  9. Hello, I was wondering if anyones know how to goto an anchor tag, once a page is reloaded from a submit. What I want to do is when there is an error with the user input, i want the screen to goto the first error, rather then the user having to scroll down and find the problem. Thanks
  10. Since you are inserting user data into your database, i would suggest you escape the data prior to inserting it. If you don't, the chance of something happening to your database will be much greater.
  11. public static function find_by_sql($sql="") { global $database; $result_set = $database->query($sql); while ($row = mysql_fetch_array($result_set) ) { $object_arry[] = $row['row1']; } return $object_arry; }
  12. yes it possible. document.getElementById('myButton').value = 'Zoom'; just substitute the name of your button and what you want to change the value of the button to.
  13. Hey, What I would do is create a function that gets called whenever the button is pressed. Then in the function you can change the style sheets. var counter = 0; function chooseStyle(obj,num){ if( counter < 1) obj.setAttribute("class",obj.value); else if( counter == 2 ) obj.setAttribute("class",obj.value); else if( counter == 3 ) obj.setAttribute("class",obj.value); else if( counter == 4 ){ obj.setAttribute("class",obj.value); counter = -1; } counter++; } <input name="choice" type="button" value="style-sheet1" onClick="chooseStyle(this, 60);" />
  14. Howdy, Does anyone know or have a script on moving a DIV element around the screen. I am looking for something along the lines of a drag and drop. I searched google, but most of what they have are all clicking a button/link to move the div around. Thanks for your help
  15. I am having trouble changing an elements css class. What I want is when the div element is clicked, i want to change to style sheet so that it has the border around it. Thanks //html <html> <head> <link rel="stylesheet" type="text/css" href="test.css" id="test"/> <script> function divClick(id){ document.getElementById(id).setAttribute("class", "test"); } </script> </head> </body> <br /><br /> <div name="myDiv" id="myDiv" onclick="javascript:divClick(this.id);">This is a test</div> </body> </html> //css .highlight{ border: .2em dotted #900; } #border { border-width: .2em; border-style: dotted; border-color: #900; }
  16. adam84

    Saving CSS

    there any good functions or methods to use that would prevent such a problem from occuring. The only real function I use is add/strip slashes.
  17. adam84

    Saving CSS

    Howdy, I want to allow my registered users to create their own css for their page. My question is how would i go about saving this information. I have a few ideas. 1. Say I have five different css styles I am allowing them to edit. Would I create a table with five different columns and I save each css style in its appropriate column. 2. Save the entire user created css file into the database. Any other ideas??
  18. I have no idea off hand, try it and see
  19. Hey, Im not 100% sure because I really can't see your code. But you may want to try and use onFocus rather then onBlur.
  20. so... is creating a web crawling immoral....?
  21. I just wanted to know that if my script is crawling along someones site, will they be able to track what I am doing or will they even know that I am there? Thanks
  22. If I type in a b c d in my text area (each letter is on a new line, new line = enter) When I process the data using php, I want to change all the '\n' to <br />. For some reason it is not working correct. I've tried two different approaches approach 1 $text = nl2br($text); approach 2 $newLine = array( '\r\n', '\n', '\r' ); $text = str_replace( $newLine, "<br />", $text);
  23. Awesome thanks for your help!!!!
  24. I am trying to create a simple wiki application on my site. But I keep on running into some problems. What I want to do is search the user inputted text for anything like this: _this will become bold_ Then I want to change it to: <b>this will become bold</b> I have never used preg_replace and I am just starting off with the whole regex thing. Any help?? This is what I have $pattern = "/^(_)[]*(_)$/"; echo preg_replace( $pattern, "<b>$text</b>", $text);
  25. I have formatting buttons over top of a text area. When a user clicks on a button, I want to add the corresponding html tags around the selected text. Just like the 'start new topic' and 'reply' pages on this site. all I have been able to do is once I click the button, I can add the tag just to the end of the current string in the textarea. Any ideas?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.