/    Sign up×
Community /Pin to ProfileBookmark

Delete element?

Is it possible to delete an element inside an iframe?

index.htm:

[QUOTE]

<iframe id=”RSiframe” name=”RSiframe” src=”http://somepage/inside.htm” frameborder=”0″></iframe>

[/QUOTE]

inside.htm looks something like this:

[QUOTE]

<body>
<table cellspacing=”0″ cellpadding=”0″ id=”gametable”>
<tbody><tr><td colspan=”2″>

<div id=”tb”><iframe width=”766″ scrolling=”no” height=”96″ frameborder=”0″ allowtransparency=”true” src=”Something”/></div>

<div id=”menubox”>
<div id=”menu”>
<div>
<a href=”Something” onclick=”return cm()” id=”home”>
Home
</a>
<a target=”_blank” href=”Something” id=”upgrade”>
Upgrade to Something
</a>
<form target=”_
blank” action=”Something” id=”search”>
<img alt=”” src=”Something”/>
Search Something
<input id=”q” name=”q”/>
<input type=”submit” value=”Go” id=”t”/>
</form>
</div>
<a target=”_blank” href=”Something” id=”jagex”>
<img alt=”Jagex” src=”Something”/>
</a>
</div>
</div>
</td></tr>
<tr>
<td width=”0″ height=”503″><img width=”0″ height=”503″ src=”Something”/></td>
<td id=”gamecell”>
<div id=”gameframe”>
<span style=”display: none;” id=”vbUrl”>Something</span>
<div id=”vb”>
<div id=”vb_border”>
<div id=”vb_container”>
<iframe width=”320″ scrolling=”no” height=”250″ frameborder=”0″ allowtransparency=”true” src=”” id=”vb_frame”/>
</div>
</div>
<span id=”vb_skiptext”>-</span>
<a onclick=”return hideVideoAd();” href=”#” style=”display: none;” id=”vb_skip”>Skip advert</a>
</div>

</div>
</td>
</tr>
<tr><td colspan=”2″>

</td></tr>
</tbody></table>
</body>

[/QUOTE]

I want to delete the following code from inside.htm:

[QUOTE]

<tr><td colspan=”2″>

<div id=”tb”><iframe width=”766″ scrolling=”no” height=”96″ frameborder=”0″ allowtransparency=”true” src=”Something”/></div>

<div id=”menubox”>
<div id=”menu”>
<div>
<a href=”Something” onclick=”return cm()” id=”home”>
Home
</a>
<a target=”_blank” href=”Something” id=”upgrade”>
Upgrade to Something
</a>
<form target=”_
blank” action=”Something” id=”search”>
<img alt=”” src=”Something”/>
Search Something
<input id=”q” name=”q”/>
<input type=”submit” value=”Go” id=”t”/>
</form>
</div>
<a target=”_blank” href=”Something” id=”jagex”>
<img alt=”Jagex” src=”Something”/>
</a>
</div>
</div>
</td></tr>

[/QUOTE]

Is this able to do with javascript?
Thank you.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@konithomimoSep 11.2008 — If the page loaded in the iframe is one of your own pages, meaning on the same server/website, then yes, you can edit it. if it is from another server/website then JS cannot do this. You can try using PHP though.
×

Success!

Help @ogelami spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...