Forum Moderators: open

Message Too Old, No Replies

getElementsByName on other websites

is there a way?

         

andrethegiant

11:03 pm on Jul 23, 2005 (gmt 0)

10+ Year Member



I'm trying to get the value of something on another website. I'm using

var x = document.getElementsByName("hR1")[0].value

document.getElementById("main").innerHTML = x

but this obviously doesn't work because I know I need to insert the url of the site I want to get it from, but I don't know where to do that. Any help would be appreciated.

RonPK

9:09 am on Jul 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Forget it: JavaScript cannot operate on pages on some other domain. You'll need a server side script to fetch and parse such a page.