Jump to content

D.Rattansingh

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by D.Rattansingh

  1. Yes, thanks! Just read up on standard deviation and it's exactly what i'm looking for
  2. Can it be done with javascript? I tried using my normal ajax code in my javascript file but it didn't work, it's as follows: ar = new XMLHttpRequest(); if(ar.readyState == 4 || ar.readyState == 0) { ar.open("GET", "ajax.php?area=" +encodeURIComponent(area), true); ar.send(null); ar.onreadystatechange = function() { if(ar.readyState == 4) { document.getElementById("img3").src = ar.response; }// end if }// end function }// end if Any ideas on what is wrong with this? If I get this way to work it will solve my problem since I can put my code in the if(ar.readystate==4) block. I suspect something is wrong with the line document.getElementById("img3").src = ar.response;
  3. Not the max, the data was just a sample. It's dynamic data which is being generated on the fly. Thus if the data is now: A - 2 B - 87 C - 96 D - 9 E - 44 I want to retrieve that B and C is much higher than the rest while E is medium A - 76 B - 81 C - 68 D - 74 E - 77 I want to retrieve that none had any major spikes compared to the other, they are all roughly around the same average. I hope I'm being clear enough. There's about 15 clumps of data sets where the value in each of these sets are dynamic and I want to retrieve high spikes or low or even medium. If there is a way to determine this in mathematics, then it can be coded
  4. Hope I can post this question here. So I've got some data I'm pushing into a line graph. Now I want to retrieve high 'spikes' in the graph e.g. A - 34 B - 23 C - 96 D - 54 E - 44 The value for D is much higher than the rest, this I want to retrieve. Is there any mathematical formula to do this or could help in the development of a programming algorithm?
  5. I've run into a problem, hope you could give some assistance. I got through with passing the images to javascript and my code looked similar to yours, this is the call: document.getElementById("img3").src="ajax.php?area=" +encodeURIComponent(area); This is working fine but I have a few lines after which I want to execute after the image is loading and there seems to be a timing problem since the lines are executing before the image is being loaded What I would have done in the past with ajax would be create an object of XMLHttpRequest(), send the request, wait for the message and after execute my code with the use of XMLHttpRequest.readyState == 4) I tried doing it like that but wasn't working so decided to go with the above. Is there a way to determine when the call has been completed? i.e. the image finished loading?
  6. I think I figured it out from what you said. I wasn't thinking. I need to save the image on the server (i.e. php) and pass the name of it back to javascript which will display it. Hope I don't get a problem with it overwriting
  7. It involves a lot of mathematical calculations in which I decided to create a lot of diagrams. For the first few I had to do, I created them with php using css for the formatting and since for those sections I'm using ajax, it's pretty easy to send back the html code to javascript to execute and display. The idea crossed my mind to use images instead of divs and css and did a lot of work on it. But since those sections are already designed to use ajax I'm wondering if the image created could be passed. So in the page there is are divs, when the user clicks a search button they get filled up with charts and formatted data by calling to javascript which then calls to php via ajax. But now there is an image involved which is not saved but rather created "on the fly". Once it gets to javascript it's easy to push it into the innerHTML of the html page. I have not tried it yet, just wondering if it's possible since the only way I communicate with php back to javascript is using the echo statement.
  8. I've been doing some work on generating some diagrams and midway through I decided to have php generate them as images (when in the past I would have used css and javascript). I'm almost completed this work however I'm now wondering if PHP could pass these generated images to javascript via ajax to be displayed in some div which is as a result that this part of my design uses ajax.
  9. Using the imagestring up function, the text rotates from bottom to top. Is there any way to rotate the text from the other angle? i.e. top to bottom?
  10. I'm trying to create something like yahoo.com where the content is in the middle and on the outskirts there's a grey margin (or at least something looking like a margin, not sure if it's padding). I was successful, however when the page is resized by the user I want this margin to decrease just like it is on yahoo.com but its not decreasing (go to www.yahoo.com and resize the page and their margin decreases). Anyone knows how to get this margin to decrease? body { font-family: "Lucida Grande", "Lucida Sans"; background-color: #525252; text-align: center; margin-left: 150px; margin-right: 150px; margin-top: 0px; margin-bottom: 0px; min-width: 650px; min-height: 685px; color: #00008B; } table { margin:0; padding: 0px 2px; border-spacing: 0; /* remove the spacing between the borders. */ width: 950px; height: 685px; background-color: #C1CDC1; }
  11. Sorry about the confusion. With your example, what I want is to hover over the link t1 but t2 background colour changes (not t1).
  12. Is there any way to update javascript libraries help in netbeans? I have version 7.0.1 and it seems either the library is out of date or not installed or turned on. There are many more functions than the IDE is suggesting.
  13. Could you clarify what you mean by upload it? If I was using just PHP and HTML, I would post the HTML page onto the PHP page and upload the file directly. I'm trying to use AJAX to do the same. The only problem is either directly or indirectly uploading it.
  14. I'm trying to send a file over to a PHP script using GET with AJAX. Ajax is working fine however is there a way to send an entire file over to PHP? This is since all I know thus far is we send strings via GET. <script type="text/javascript"> var Load = function() { var image = document.getElementById("img").value // here I could get the image value, i.e. the file name // sending with ajax XmlHttpRequest.open("GET", "server.php?id=17&image=" +image, true); ........ rest of ajax code // I know from the above all that would be sent would be the name, But is there a way to send the entire file so PHP could process? return false; }; </script> </head> <body> <form action=# method="post" onsubmit="return Load();"> <input type="file" name="img" id="img"> <input type="submit" value="Upload"> </form>
  15. Sorry about that. The corrected code is: <div> <a href=# id="t1"> </a> <a href=# id="t2"> </a> </div> #t2:hover { background-color: blue; } These may not be the only anchors. Yes if I do something like hover over t1, to change the background of t2. For e.g. the above would change the background of the link #t2. But what if I wanted to change the background of t1 instead? I know this could be done with javascript but just wondering if it's possible with CSS. DR.
  16. If we have 2 links t1 and t2 and I hover t2, is there any way to change the background of t1 with CSS or coud that only be done with javascript? <div> <a href=# id="t1"> </a> <a href=# id="t2"> </a> </div> .t2:hover { background-color: #CAFF70; }
  17. Yes I realized that. It was stopping due to another reason, however at first I suspected it wasn't working well. Don't know how to delete this topic. Regards,
  18. Hi. I'm using window.onload to call a function to swap a few pictures in an image box. Everything is working fine however if I minimize the browser or switches to another page it stops. Anyone knows how to probably use another function so the function will be called regardless if the user is on the page or not?
  19. Hey thanks. I modified in the .ini file: ;date.timezone = "US/Central" Regards.
  20. I am using PHP5.2 and I'm using localhost. I have display_error() set to On and error_reporting() set to E_ALL. Still isn't getting anything.
×
×
  • 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.