Can Content script set value of a text box within HTML frame? using Google Chrome extensions..
Posted
by devdreamers
on Stack Overflow
See other posts from Stack Overflow
or by devdreamers
Published on 2010-06-13T21:17:24Z
Indexed on
2010/06/13
21:22 UTC
Read the original article
Hit count: 276
Hi all,
I was working on a very simple extension, where on clicking extension icon, a webpage is opened in a new tab, the webpage has HTML frames, within which lies a textbox. I want to set a value for the same.
The webpage which opens has:
<HTML>
<FRAMESET rows="15%, *" border="0">
<FRAME src="./files/abc.htm" id="abc_frame" name="abc_frame"
onload="abcLoad()" scrolling="NO">
</FRAMESET>
</HTML>
and abc.htm has:
<div align="center" valign="bottom" style="font-size: 1em;">
<form onSubmit="javascript:navigate(this);return false;">
<label for="loc">Loc</label>:
<input type="text" size="50" id="loc" value="http://google.com"/>
<input name="go" type="submit" value="Go" id="loc_go"
onclick='navigate(this); return false;'/>
</form>
</div>
how can I replace current textbox value with, say http://yahoo.com ? I guess, Content Script in Chrome extensions is required, but not sure, how/what should be it's code/content. Please guide/help. Thanks a lot. Appreciate it.
© Stack Overflow or respective owner