Jump to content

D.Rattansingh

Members
  • Posts

    26
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

D.Rattansingh's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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).
×
×
  • 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.