
emvy03
Members-
Posts
62 -
Joined
-
Last visited
Never
Everything posted by emvy03
-
I think I have solved it by changing position to fixed. Thanks.
-
Hi guys, I'm messing about trying to suss how to do a slide down box that appears when the user clicks a link inside a fixed header at the top. The slide function works, I think, but it will slide down and then 'jump' to the left once it has completed the sliding action. Below is the code I am using: <script language="javascript" type="text/javascript"> $(document).ready(function() { $("#open").click(function(){ $("div.hiddenDiv").slideDown("slow"); }); $("#close").click(function(){ $("div.hiddenDiv").slideUp("slow"); }); }); </script> <style type="text/css"> .hiddenDiv{ display:none; height:150px; width:200px; background:yellow; position:relative; top:36px; left:780px; } </style> and the HTML: <div id='headercontainer'> <ul id='header'> <li><a href='#'><img src='images/twitter.png' alt=''></a></li> <li style='float:left;'><input type='text' id='search' value='Search...'></li> <li><a href='#'><img src='images/facebook.png' alt=''></a></li> <li><a id='open' href='#'><img src='images/shopcart.png' alt=''></a></li> </ul> <div class="hiddenDiv"> <!--Content goes in here --> <a id='close' href='#'>Close</a> </div></div><!-- Close Header Container --> Any help would be greatly appreciated and of course I will post any other code if required. Many thanks.
-
Hi, Thanks so much for your help. There was a rogue element in there causing havoc which has since been removed. Microsoft IE I have found to be a pain, much prefer to use Chrome. Cheers
-
Its a Div tag for the voting system on my site. I'm not too too worried about at the minute, my biggest concern is the site won't display properly across the different browsers. IE now works perfectly, but Firefox and Chrome are now suffering. Its the complete opposite problem I was having a few days ago. I believe the site passed validation so I don't really know what's going on. :'(
-
Hi, Thanks for all the help. I think I'm starting to get some where now with the errors. Is there anyway to work around using the 'name' attribute. I need it to enable my javascript to work but validation is telling me that the 'name' attribute is now obsolete. Thanks.
-
Changed the DOCTYPE to html transitional and have solved all the major errors using validator but Internet Explorer still showing major flaws .
-
Hi, Thanks for the reply. I'm getting the same errors with some of them like <center>...</center>.
-
Hi, This is going to seem really school boy and I'll probably get a bit of stick for this but I believe I'm having a problem with the DOCTYPE. The reason being that I'm getting about 40 errors when validating my website and most of them are OMITTAG NO. Admittedly some of my img tags haven't yet been closed but most of the errors are for <div>, <h4> etc where you don't close the tags by />. Please say if you need more elaboration. www.rumourdeal.co.uk is the site so you can see it. Cheers.
-
Sorry, I placed the 'nl2br' in the wrong place. Thanks for pointing it out. All is good now. Ta.
-
Thanks. It processes the code to include line breaks but its just not displaying the code to include the breaks. I.e. If I have text like: Roses are red, Violets are blue The page displays: Roses are red, Violets are blue This is the code to display the text ($msg is the php variable for the text): <?php echo '<div style="margin-top:5px; margin-left: 15px;float:left; font-size:12px; font-weight:bold;">' . $date_added . '</div><br><h4>' . $title . '</h4>' . $msg; ?>
-
Hi, I'm not sure if this should be in PHP or HTML so apologies if it's in the wrong area. I have a form with a text area element but when the text is submitted, tags such as <br> aren't included so the outputted text is never formatted correctly such as there being no paragraphs. Is there a way make sure such tags are included in the output text? Ta.
-
Hi, Sorry I haven't replied replied in a while. I've managed to find a work around so thank you for all your help.
-
No, I haven't tried firefox. I think the issue maybe to do with the fact that the button doesn't have a 'name' so the php script is triggered but has nothing to work from. The problem I now have is what to give a 'name'.
-
function submitvote() { if(document.voteForm.onsubmit && !document.voteForm.onsubmit()) { return; } document.voteForm.submit(); } </script> I'm using the exact same code for an upload form as well and that works with out any problems.
-
Hi, Sorry, that was a mistake when I copied and pasted the code; the correct code does have 'voteForm instead of 'searchForm', but I am still having the same problem.
-
Hi, I'm having trouble submitting a form using javascript. I have 2 javascript submit buttons (One uploads a story to the site and the other if for a search function) on my site, and another submit button assigned to 'story' that a user uploads. The problem I am having is with this last submit button. I'm using the same script as with the other two buttons and the submit function works in that the page reloads, nothing happens with regards submitting any code. I'm confident that the form works because there is no issue when using a standard issue submit button. The form code: <form name='voteForm' id='voteForm' action='vote2.php' method='POST'> <a href='javascript: submitvote()' id='submit'><img id='green' src='images/greenbtn.png' alt='' ></a> <input type='hidden' id='pid1' name='pid1' value='$id' > <input type='hidden' id='page' name='page' value='$page' > <input type='hidden' id='title' name='title' value='$rumourID'> </form>" The Javascript: <script type="text/javascript"> function submitvote() { if(document.searchForm.onsubmit && !document.searchForm.onsubmit()) { return; } document.searchForm.submit(); } </script> Thanks for reading guys!
-
Hi, I'm not too sure how to word this, but what I want to is to have a timetable for the 7 days of the week and 24 hours of the day, which gives 100-200 possible combinations. A user will select a checkbox and click submit which will then upload to a mysql database with the respective information. My question is, is there a way that the check box will dynamically select the day and time based on the row and column in it, as opposed to having 168 different names and values for each checkbox? I hope I have made my point succinctly but please post back if any more info is needed. Ta.
-
Hi, Not sure if its any help but I think I had a similar problem and I inserted a hidden field into the form containing the ID.
-
Hello, Yes, I was just wondering where to write the directory to output to, is it in between the output brackets?
-
Hi, Thanks for the help. Might sound like a daft question but in the line: $image->output(); How would I configure it to output the file to a directory. Is it is as simple as just putting the directory in there?
-
Hi, I'm far from being even a novice at php but I thought I'd add my 2 pennies worth as I recently had a similar issue. I've got a similar system, whereby I have images for many different galleries all with different gallery names. My table has an ID, Gallery name and image path. That way for each different gallery you can put a WHERE clause in the query and only images designated for that gallery are displayed. Then get the images to save in a given directory. To sort the images by date added I guess having a date_added row would be an idea. Again, don't take my word for it as there are far more qualified people on here.
-
Hi, I've got an upload script which works fine; it checks for image extension and uploads perfectly. The only thing is, I want to add an image resize section of code in there as I have an image gallery which displays the pictures and they are rather large. The code at present <link rel="stylesheet" href="upload.css" type="text/css" /> <?php define ("MAX_SIZE","100"); function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } $errors=0; if(isset($_POST['Submit'])) { $image=$_FILES['image']['name']; //if it is not empty if ($image) { $filename = stripslashes($_FILES['image']['name']); $extension = getExtension($filename); $extension = strtolower($extension); if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { //print error message echo '<h1>Unknown extension!</h1>'; $errors=1; } else { $size=filesize($_FILES['image']['tmp_name']); if ($size > MAX_SIZE*1024) { echo '<h1>You have exceeded the size limit!</h1>'; $errors=1; } $image_name=time().'.'.$extension; $gallery_name = $_POST['galleryselect']; $newname="../gallery/$gallery_name/".$image_name; $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo '<h1>Copy unsuccessfull!</h1>'; $errors=1; }}}} if(isset($_POST['Submit']) && !$errors) { echo "<h1>File Uploaded Successfully! Try again!</h1>"; } include "../storescripts/connect_to_mysql.php"; $sql = mysql_query("INSERT into images (image_path, gallery_name) VALUES ('$newname',$gallery_name')"); ?>
-
Hi, What is happening is the image will be displayed to those dimensions, however there is alot of white space created surrounding the image. Do you have any ideas as to what could be causing this? Ta
-
Hi, I hope I've not misinterpreted this forum as my lightbox question has nothing to do with php. Basically, I have a lightbox set up to display images that a user has uploaded to a gallery, however they are all of different sizes. How would I go about modifying the lightbox css file so that the popup gallery shows all images the same size? #lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;} #lightbox img{ width: 500px; height: 500px;} #lightbox a img{ border: none; } #outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; } #imageContainer{ padding: 10px; } #loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; } #hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; } #imageContainer>#hoverNav{ left: 0;} #hoverNav a{ outline: none;} #prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; } #prevLink { left: 0; float: left;} #nextLink { right: 0; float: right;} #prevLink:hover, #prevLink:visited:hover { background: /prevlabel.gif) left 15% no-repeat; } #nextLink:hover, #nextLink:visited:hover { background: /nextlabel.gif) right 15% no-repeat; } #imageDataContainer{ font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0 auto; line-height: 1.4em; overflow: auto; width: 100% ; } #imageData{ padding:0 10px; color: #666; } #imageData #imageDetails{ width: 70%; float: left; text-align: left; } #imageData #caption{ font-weight: bold; } #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; } #imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; outline: none;} #overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; } Thanks.
-
Thank you!!! I had written a very simple $_GET code but wasn't quite sure if it would work, but your's is right on the money! Thanks also for the comments, I learnt a bit about php just from those alone Now just to hit up google and find out about multiple image uploads.