No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
27 Posted Topics
Hi there, I've been researching the correct layout for html5 web pages, and I'm a little unsure on how something like this should look: <div class="main-container"> <div class="main wrapper clearfix"> <div class="canvas gu6"> <div class="example-grid"> <div class="row"> <div class="col gu1"> <img src="img/1.jpg"> <div class="description"> <h2>Test</h2> <p>Test, Test, Test.</p> </div> </div> … | |
The code below simply shows and hides a div (content) when you click on the heading (heading). <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".content").hide(); //toggle the componenet with class msg_body jQuery(".heading").click(function() { jQuery(this).next(".content").slideToggle(0); }); }); </script> Demo - http://www.designgala.com/demos/collapse-expand-jquery.html By default, the content is always hidden - Is there any way to … | |
Hi There Guys, I've found a lot on this subject, but the sheer amount of scripts and suggestions is overwhelming and researching this has confused me more than anything. I have a fully working contact form, but at the moment it simply checks the users input on submition of the … | |
I know this has been asked before but I really can't relate any of the threads to my code. A'll I'm trying to do is get this quick PHP form to echo the error messages in the form as appose to a new page. (I'm sure you know what I … | |
Hey guys just a quick question, my AJAX is working in FF and Opera just fine, As in it repeats the function whenever the button is clicked, but in IE the first click works, but then it doesn't repeat... I've been searching around form some fixes, and found quite a … | |
Guys, just a quick question, is there any way to get this AJAX to be called on a button click? I know how to use buttons to call JS functions but I'm not sure where to add the open and closing parentheses with this AJAX...I've tried encasing different parts, but … | |
Hey guys, Im going to try and explain this the best I can, maybe a bit difficult, but here goes anyway: I have AJAX calling a php function which displays a random quote when a user clicks a link. Every 5th click a div is echoed over the quotes, that … | |
hey guys could anyone quickly show me how I'd go about combining these: [code] $(document).ready(function(){ $("#generate-quote").click(function(e){ e.preventDefault(); $.getJSON("generator.php?", {act: 'char_con', bc: '1'}, function(data){ $(".quote").html(data); }); }); }); [/code] [code] $(document).ready(function(){ $("#env").click(function(e) { e.preventDefault(); $.get("char_con.php?", {act: 'char_con'}, function(data{ $(".q").html(data); }); }); }); [/code] Right now they obviously do different things, but … | |
hey guys I just implemented some AJAX which calls a PHP function and gets random data from a database, and displays it accordingly. Problem is, I had the link which you click the randomly change the information on screen counting how many times it'd been clicked with a session. And … | |
Could anyone just help me out with this. I'm trying to get my AJAX to simply echo what's in my php file when a click a link: AJAX: [code] $(document).ready(function(){ $("#gentest").click(function(e){ e.preventDefault(); $.getJSON("char_con.php?", {act: 'char_con'}, function(data){ $(".x").html(data); }); }); }); <div class="box"> <a href="#" id="gentest">Generate Quote</a> <div class="x">TEST</div> </div> [/code] … | |
Hey, just got this contact form working, but had an email from the guy with the server, and he says he got the emails as well...which I thought was quite odd. Now I have no idea why it'd do this so I was wondering if one of you guys could … | |
Hey guys I'm having a little bit of an issue with this code, the code simply detects a page refresh, works fine in IE and FF, but it doesn't seem to be working in opera. Anyone got any suggestions on how to fix this? I've had an issue like this … | |
Hey guys I have a small piece of code and I'm just wondering how to go about doing the following. All the script does is gets random information from a database every time the user clicks a link. Which works fine, but the problem is the script is getting information … | |
Re: Could you post the error. Does it indicate what line the problem is occurring? It'd save time reading through all the code. | |
Hey guys this is kind of a JavaScript question but the script works elsewhere so I have a feeling it's got something to do with the fact it's being echoed by php. Can anyone tell me why this isn't working: [CODE] if (($_SESSION['count'] % 5 == 0) && ($_SESSION['countView'])) { … ![]() | |
Hey guys, Just wondered if someone could tell me how to make this echoed DIV dissapear. Here's my code with an explination: [CODE] <?php session_start(); if (isset($_GET['beginCount'])) { $_SESSION['countView'] = true; } if ($_SESSION['countView']) { $_SESSION['count']++; } if (($_SESSION['count'] % 5 == 0) && ($_SESSION['countView'])) { echo '<a href="http://google.com" title="x" … | |
Hey guys, wondering if you could help me with these two bits of code. What I'm trying to do is count how many clicks a link has been clicked, then when it has been clicked x amount of times, it echos 'test' Now the code below does that, but I've … | |
Hey guys, can anyone point out where I'm going wrong with this? It counts the sessions fine, but the IF statement doesn't seem to be working as it should. [CODE] <?php session_start(); ($_SESSION['count']) ? $_SESSION['count']++ : $_SESSION['count'] = 1; if (!(count) % 5) { echo "test"; } ?> <!DOCTYPE HTML … | |
Title should be 'PHP not working in Opera' Hey guys, I have some code which validates fine with the w3c validator, but still refuses to work in opera... Wondered if anyone could maybe tell wny this code works in every browser but opera? I'm stumped. [CODE] <?php if($_GET['act'] == "generate_quotes") … | |
Hey, just a quick question about the following code: [CODE] <input name='name' type='text' class='form' value='<?php echo "" . (isset($_REQUEST['name'])) ? dataClean(ex_clean($_REQUEST['name'])) : FALSE . "";?>' size="40" rows='5' /> [/CODE] Now, if the user has errors in the form details and clicks submit, the page refreshes and it displays what errors … | |
Hi, the problem i'm having is with the following code. When the user clicks the submit button with any errors it displays the section I've marked out. But it positions this at the very top of my form, pushing evverything down. Is there a way to get this error information … | |
Hi, I've got a form with captcha working, but I'm trying to add a 'refresh captcha' link too it. Now I already have something changing dynamically with PHP so I was wondering if something like that would work for this. Here's the one I have working: [CODE] <a href="index.php?act=generate_quotes">Generate</a> [/CODE] … | |
Hey, wondered if someone could help me with how to go about doing the following: I have some code which generates bits of text randomly from a database. But I was wondering if there's a way for a user to download an individual file, which corresponds to the one they're … | |
//Sorry about the name, hit enter too early >.< Should be 'adding a link to PHP' [indexphp.php] [code] <?php if($_GET['act'] == "generate_quotes") { $con = mysql_connect("*", "*", "*"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("quote", $con); $result = mysql_query( " SELECT * FROM `quote` ORDER BY … | |
I have some code which echo's a paragraph from a database, but is there anyway to make the paragraph have a title by calling the same Field? I've had a look for formating text which is being echoed, but I'm not sure how to go about having a title one … | |
Hi there, I need some help actually using the ajax I've got, and defining the url in the ajax [if that makes sense] I've been trying to do it but It's not working atall and I wondered if someone could actualy show me in the code how to go about … | |
Hey guys, I'm having some AJAX troubles that hopefully someone can help me with. I have some PHP code, which works fine. And I'm trying to call the PHP function with AJAX. But I've never used AJAX at all so I'm a little confused. I've tried to fiddle around with … |
The End.