Gemmell
06-24-2009, 11:17 AM
All,
While the title says php on a javascript forum, it will get back to javascript. A php function already exists that strips a text products from the National Weather Service into just a portion of that text, which is what I want to display on my page. This php function, courtesy of the NWS, is available at this url: http://aviationweather.gov/testbed/afd/update.php?location=KLOT The text can be seen in the source code. It is assigned to the variable "cwainfo" and returned to a javascript in whatever the parent page is, at the end of the code:
parent.refreshText(cwainfo);
All I want to do is display the text that is in cwainfo on my page. So if I call to that page with a script, something like
function updateText() {
callToServer('http://aviationweather.gov/testbed/afd/update.php?location=KLOT');
return true;
}
...then how would I get to display that cwainfo code on my home page, which would be the parent page? It would have to be some function. This may be basic, and I feel like it is, but I cannot get it to work.
Thank you,
Ryan
While the title says php on a javascript forum, it will get back to javascript. A php function already exists that strips a text products from the National Weather Service into just a portion of that text, which is what I want to display on my page. This php function, courtesy of the NWS, is available at this url: http://aviationweather.gov/testbed/afd/update.php?location=KLOT The text can be seen in the source code. It is assigned to the variable "cwainfo" and returned to a javascript in whatever the parent page is, at the end of the code:
parent.refreshText(cwainfo);
All I want to do is display the text that is in cwainfo on my page. So if I call to that page with a script, something like
function updateText() {
callToServer('http://aviationweather.gov/testbed/afd/update.php?location=KLOT');
return true;
}
...then how would I get to display that cwainfo code on my home page, which would be the parent page? It would have to be some function. This may be basic, and I feel like it is, but I cannot get it to work.
Thank you,
Ryan