Hi there,
I am developing an extension for google chrome using jquery,
now these extensions are built using html/css/javascript.
my problem is that with the extension you are only allowed to use one page, i.e you tell it what page to load up and then that is it, you can not load up another page unless you reload the extension.
So,
Because my extension needs to interact with a php application i am using ajax for the requests, the php application builds the entire pages code,
Now the part i am stuck on is, is it possible to replace the entire pages code with the response from an ajax request?
My idea was to (if these are possible)
1) innerhtml of the <html> tag.
2) build it piece by piece
ie. have the basic page structure as
<html>
<head>
<title></title>
<script type='text/javascript" src="http://***/jquery.min.js></script>
<script type='text/javascript" src="http://***/jquery.pagebuilder.min.js></script>
</head>
<body>
</body>
</html>
the pages do not need meta data as it is never indexed, nor is it cached ect.
1) so i would systematically edit the title,
2) next check if there are more than two script tags, if there are, delete the extras,
3) insert new pages javascript
4) replace body innerhtml with that of the new pages.
will either of these methods work?
is there a plugin already to do this?
if not what is the best method?
any other ideas?