Hi,
I was wondering: is it possible to get read the line on this site (not mine) and to make it available for javascript? If the answer is yes: how can i do this?
kind regards,
Knstr
note: i don't have much experience with javascript so keep it simple please
Thanks for the reply declan.
About the iframe: that's not an option for me as I have to do some calculations with the numbers you saw on the site...
About the server-side language: should i use php then?
if yes: how do i move this topic? what would this php script look like?
As far as I know the former solution is not valid. Cross-domain JavaScript relationship is forbidden by default
I always use a server-side solution, so you're probably right. I was under the impression that you could access the contents of an iFrame on the page, but not call any JavaScript or anything like that. I must have been wrong.
preg_split is the better method to use first of all.
What exact calculation are you trying to do? The present one is this, which I somehow doubt is what you want. Though that's not -9 so the values on the page must have changed recently.
Code:
$b=(10^((000-109)/32));
Great wit and madness are near allied, and fine a line their bounds divide.
Well, you can still use the information from the iFrame, but the PHP solution would be my preferred anyway. Include tutorial. From what I know of PHP, that will work for an internal file, but you can read all about that at php.net.
Great wit and madness are near allied, and fine a line their bounds divide.
Declan - I have asked this question and seen similar posts and they all said it was impossible on client-side. Is the hidden IFRAME wheeze an exception to received wisdom?
I will try it soon anyway.
TIA
I was going to hide my IFRAME during the inspection phase to speed the process, but I found that rendering proceeds after onLoad fires anyway. So I guessed it would not improve anything.
You can not establish a JavaScript relationship between documents belonging to different domains, so that in an iframe everything you can do is to display that document as it is, but you can not "touch" it (read it) using javaScript. Only a proxy server-side application can do that. That means you need a combination AJAX + proxy to read the information from another domain and use it on your document as a JavaScript variable.
The outcome of the calculation is a rainfall depth, so in mm/h. That's always positive, and -9 isn't .
If $raintime[0] is 0, the outcome should be 3.9E-4 mm/h (so almost nothing...)
$raintime[0] is a value between 000 and 255 i think... But i think the problem is that its still a string, not a number.
I tried to convert the raintime[0] to a number using:
PHP Code:
settype($raintime[0], "float");
but that didn't work.
I hope you guys can help me. Thanks for the effort so far!
You cannot access the content of the 3rd parties content using iframe. Even if the page(iframe src) is in your application you cannot read the body (i mean the whole content of the iframe) from javascript. If you try to do you will get the error "Access is denied".
But you can get the content of a particular text box/div/button etc you can get it. Still the src of the iframe should be in your application. 3rd parties link wont work.
Bookmarks