|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Automation...
Hi there.
I've been trying to build a system to automate the somewhat tedious process I have to go through of manually putting up a few property adverts per day on a certain website. On this website, you just use a normal form to enter all the details of an ad, and then click upload, at which point it supplies you with a posting reference. Now, having done this for months, I got sick of it, and built a system that integrated with our database program, so with one click the ad was added, I just then had to copy the reference from the one frame I used for the website, and put it into the database. I still obviously had to do this one ad at a time however. What I am looking to do now, is have it so I can click once, and have everything done. I've got the database stuff done, and the automated posting done, but stupidly enough, I can't work out how to get the posting reference out of the page that is supplied to me. Trying things like self.window[0].document.body.innerText (when using an iFrame) just give me errors along the lines of access denied, depending on which browser I am using. I've also tried things like document.getElementById('adFrame').innerHTML Unfortunately my DOM knowledge is a little rusty these days, so I don't know where I'm going wrong. I also remember reading on MSDN that interaction between frames of different sites is limited for security reasons. Could this be it? |
|
#2
|
||||
|
||||
|
Could very well be.
Imagine someone writing a similar script, keeping track of any other windows you have open and snooping out passwords? Remember however that an iFrame is a subclass of the document class of the parent document: Code:
document.getElementById('iframename').contentDocum ent
__________________
This is my code. Is it not nifty? "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." ---Douglas Adams Join the Itsacon fanclub! Zero Tolerance: Spammers banned so far: 264
![]() Last edited by Itsacon : September 22nd, 2005 at 02:04 PM. |
|
#3
|
||||
|
||||
|
Avoid frames; problem solved =)
I do believe it is a strong security concern if you were able to manipulate an external site across frames, although I don't see any need for that in your example. Are you running two sites? Or are both pages hosted on the same site? |
|
#4
|
|||
|
|||
|
Quote:
It's a case of I've written a page which is basically local (it's running off the built in web server of the database software), and I'm posting the ads to a public site. It's not ours in any way. Which is I think what's causing the difficulties. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Automation... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|