-
Posts
3,372 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Muddy_Funster
-
are you absolutely sure $_POST['submitted'] is set?
-
Create Search in php and Display results as Products
Muddy_Funster replied to Adibhise's topic in PHP Coding Help
strangely large number of portals being created this weather... to "help" we need your code. Unless you aren't actually creating your own portal and would instead like someone here to do it for you? -
I haven't run php direct from the console before, so we're well out my comfort zone, does it run under the logged in user or does it still need the php user account to launch? I'm hoping the latter as that at least makes sense to why it would still be denied. even though you are allowed to execute the script, php itself is not...that's what I'm thinking anyway.
-
You're welcome, although someone else would have stepped in had I not, so you're giving me just a little too much credit I think. if you are using jQuery then have a look at the jQuery.on() to see more about events. you will be wanting to do something that looks a bit like this (but is not this as this is just an over simplified example)... $('img').on("mouseover", function showOverlay(){ //either call the third party function from ViewerJS or code up your own modal overlay in here }); although, this will apply the mouse over event to every image, so you would probably want to have a class identifier on the images that you want to attach the event use and then attach the event through that. best of luck.
-
var_dump ($_POST) and see what's actually in you post data (and show us too)
-
the php user account on the server does not have read/execute permission for either those files or their containing folder. Just fix the permissions and you should be good to go.
-
you would need to call the viewer function through a custom mouseover event on each img element.
-
Updating a Div using the contents of a php file
Muddy_Funster replied to thowe26's topic in Javascript Help
alright: fully tested and working code, you will need to change the url parameter to suit, but this is all working. The problem with the last code was that I had forgot to close the fail action call, that has been fixed now. <!DOCTYPE html> <html lang="en"> <head> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <title></title> <meta name="" content="" charset="utf-8"> <style type="text/css"> ul li a{ background-color:#ddddff; cursor:pointer; } #MiddleColumnWrapper{ width:220px; height:220px; border: 1px blue dashed; margin: 10px auto 0px auto; } </style> <script> function myMenuFunction(dest){ //declare the function and say that whatever is passed into the function will be assigned to a variable called dest while it is inside it $.ajax({ //call jQuery ajax function and open parameter list url: dest, //pint the ajax request to whatever value is passed into the function using the dest varialbe mentioned earlier type: "GET", //set the request method to GET (GET is default, but it's good to get into the idea of setting it anyway success: function ajaxSuccess(data){ //on a successfull server response perform the following actions defined in the function we are calling ajaxSuccessto keep our code transportable and easy to read passing in returned data as the data parameter $('#MiddleColumnWrapper').empty(); // we want to make sure and clear out any content already in the div so we dont end up with unexpected content $('#MiddleColumnWrapper').html(data); // now we load in the data we got back from the server request into the div with id MiddleColumnWrapper }, fail: function ajaxFailed(e){ //this should be making sense by now, but here we are catching the error info of a failed request in the variable e and performing the following actions alert("Server call failed with the following message : "+e); //a simple alert message to give details about the failure }// close fail action call }); // close the parameter list and function call }; // close our custom function </script> </head> <body> <ul> <li><a onClick="myMenuFunction('ajaxTst.html')">3D Printers</a></li> </ul> <div id="MiddleColumnWrapper"></div> </body> </html> I just left in the html for completeness, obviously you will use your own. -
Updating a Div using the contents of a php file
Muddy_Funster replied to thowe26's topic in Javascript Help
why would you swap the brackets around? You broke the script. Re-copy the original code I gave you, then fire up the developer console in your browser (usually done with F12) and try running the script. It will point out errors and line numbers and we'll be able to fine tune it from there. P.S. Your using a really old jquery lib. think about getting the 1.11.x -
aww, so it's just another "do my homework for me" thread? can we get a color coding system and highlight these things? I think a putrid orange would do...
-
you could run a session variable to make sure that only one submit is allowed e.g. <?php session_start(); if(!isset($_SESSION['sub'])){ //your submit code here $_SESSION['sub'] = true; } else{ //your duplicate post control code }
-
if Barand (or someone else) doens't get here fist I'll get back to you in 7 hours. It's way too late just now (where I am) It's not that it's a complicated answer, just a long one to give in full.
-
well you have already set $count to the rowcount() on line 116, and now on line 118 you are sking for the rowcount() of $count...
-
you can't do that with your current setup. It really doesn't look like you have a proper persistance model here. have a look at the following http://www.devshed.com/c/a/php/building-persistent-objects-in-php-5/ it should help you a bit with what you are trying to accomplish
-
would you consider a javascript (specifically jQuery) ajax call as an option? or, if you really want to move the browser along, you could use a javascript window command.
-
Updating a Div using the contents of a php file
Muddy_Funster replied to thowe26's topic in Javascript Help
Alright, I'm going to pretty much take what you have, throw it away, and start again. I didn't have time to really look at your codde earlier as I was at work, now however I have an hour to kill, so let's do this right. I'll assume your css and everything is working for the display of your menu, so that can stay, but the html and jquery stuff we're going to re-do. First the html. We will keep it close enough so that your css should still work. <body> <ul> <li><a onClick="myMenuFunction('printer3.php')" class="ajaxLink" name="3D Printers" title="3D Printers">3D Printers3</a></li> </ul> <div id="MiddleColumnWrapper"></div> </body> Not much changed, except that there is now an onClick event that is passing in the string 'printer3.php' as a parameter to a function call for the myMenuFunction. Now let's go make that function. <head> ... <script> function myMenuFunction(dest){ //declare the function and say that whatever is passed into the function will be assigned to a variable called dest while it is inside it $.ajax({ //call jQuery ajax function and open parameter list url: dest, //pint the ajax request to whatever value is passed into the function using the dest varialbe mentioned earlier type: "GET", //set the request method to GET (GET is default, but it's good to get into the idea of setting it anyway success: function ajaxSuccess(data){ //on a successfull server response perform the following actions defined in the function we are calling ajaxSuccessto keep our code transportable and easy to read passing in returned data as the data parameter $('#MiddleColumnWrapper').empty(); // we want to make sure and clear out any content already in the div so we dont end up with unexpected content $('#MiddleColumnWrapper').html(data); // now we load in the data we got back from the server request into the div with id MiddleColumnWrapper }, fail: function ajaxFailed(e){ //this should be making sense by now, but here we are catching the error info of a failed request in the variable e and performing the following actions alert("Server call failed with the following message : "+e); //a simple alert message to give details about the failure }); // close the parameter list and function call }; // close our custom function </script> </head> And that's all we should need to do. I have commented this as much as I felt I could without overcrouding the code too much so there's not much more to say. Always rememebr that the ajax call is, by it's deffinition asyncronos. that means that it does not follow the normal flow of the code, so the rest of the code will not interact with it in the normal way. anything you want to do after an ajax call must be within one of the $.ajax callbacks, or else nested in a rather complicated wrapper function that uses custom callbacks. This is untested, so is likely buggy as hell, but it should be close enough for most people to get working that have used ajax and jQuery before. Also, if anyone want's to elaborate/alter/fix it please feel free to copy and past with additions/alterations. Best of luck. and if there is anything else ask away. -
lol, I seen the foreach $rows down the bottom of the post and completely ignored the fact that wasn't inside it!
-
this is more jqueryUI than plain jquery. as to if it's worth it or not, that's something only you, as the developer, can answer. In most cases it would certainly be worth it as it would cost more in man hours to have a front end developer write it (properly, including debugging, sense checking and quality testing) from scratch.
-
you have used single quotes in your query to define the alias date. these should be backticks ( ` ), not single quotes ( ' ).
-
this is a css issue, not a php one, you will need to find the entry in the relevant css file that has an entry for .sp-daterange-group and modify that.
-
Updating a Div using the contents of a php file
Muddy_Funster replied to thowe26's topic in Javascript Help
try removing the href from the anchor element -
nope. not without more data regarding the actual point of failure. start putting in debugging outputs at key points along the process using var_dump() and see exactly when things stop working in each browser.
-
Javascript or a.n.other client side language will be required for this. however, be very careful about things like hover events - especially if you are using them with a modal, people move their mouse all over the place without thought or intent, and if your going to block the screen with popups every time the skim over a part of the screen you're just going to p*** people off.
-
I have only been there once to try and publish some code for someone and spent ages trying to get the link to work, then gave up with it. So I'm not personally a fan of it for sharing, but it is very good for throwing up a prototype in a hurry.
-
Had to happen sooner or later lol. nah, joking aside: I tend to not even look in on threads I see you have posted on because I know there's going to be nothing I'll be able to add.