vijayrajesh98
11-12-2008, 05:24 PM
Hi All,
I have a javascript file thru which I write some text on the webpage - something using the below to display on the page.
var t = document.getElementById('foo');
var tr = t.appendChild(document.createElement('tr'));
tr.appendChild(document.createElement('td')).innerHTML = "NYY";
tr.appendChild(document.createElement('td')).innerHTML = win;
tr.appendChild(document.createElement('td')).innerHTML = loss;
how ever I would need to write the above output on a file on a txt file on the server side. The txt file will be something like on ther server and will be appended.
NYY 10 3
I am not too sure how to embed php to this so that I append these outputs from javascript to the text file though php? can I pass in each output to a php function like getjsvals(team,win,loss) and then this triggers the php function to write to the file? not too sure how to accomplish this.
I am working on a deadline, so any insights would be deeply appreciated!
I have a javascript file thru which I write some text on the webpage - something using the below to display on the page.
var t = document.getElementById('foo');
var tr = t.appendChild(document.createElement('tr'));
tr.appendChild(document.createElement('td')).innerHTML = "NYY";
tr.appendChild(document.createElement('td')).innerHTML = win;
tr.appendChild(document.createElement('td')).innerHTML = loss;
how ever I would need to write the above output on a file on a txt file on the server side. The txt file will be something like on ther server and will be appended.
NYY 10 3
I am not too sure how to embed php to this so that I append these outputs from javascript to the text file though php? can I pass in each output to a php function like getjsvals(team,win,loss) and then this triggers the php function to write to the file? not too sure how to accomplish this.
I am working on a deadline, so any insights would be deeply appreciated!