Save DOM in offline web archive(mht format) using ie6 - dom

I need to save the DOM in a offline web archive(mht format) using ie6. I need to make offline updates to the web archive and then save them back to the disk. However the "save as..." functionality is not including the DOM updates, is there a way to do this? Or perhaps a workaround?
Cheers,
Sam

Use saveSnapshot and choose "Web Page, HTML Only" rather than "Web Archive":
<style>
.snapshot_alpha {behavior:url(#default#savesnapshot);}
</style>
<!--...-->
<input class="snapshot_alpha" type="text" id="persist_alpha">

Related

Grafana Snapshot.raintank.io Sharing

I am a newbie with Grafana and I am trying to share my panel live.
I found the official doc which is well explained: https://grafana.com/docs/grafana/latest/reference/share_panel/
However, I am having an issue with my snapshot.raintank.io. I generated a link by going to share --> Snapshot--> Publish to snapshot.raintank.io. In the expire box I filled to "Never". However, when I should have data coming live on my real panel, it is not coming live to my shared panel on snapshot.raintank.io.
So, is it normal that the snapshot.raintank.io is not going live but it is only a way to interact with the existing data or am I doing something wrong?
Let me know if you need any extra information.
Please help if you have any ideas :)
My html code:
<div style="text-align: center">
<iframe src="https://snapshot.raintank.io/dashboard/snapshot/*********?viewPanel=4&orgId=2&refresh=5s" width="1000" height="350" frameborder="0"></iframe>
<iframe src="https://snapshot.raintank.io/dashboard/snapshot/*********??viewPanel=2&orgId=2&refresh=5s" width="1000" height="350" frameborder="0"></iframe>
</div>
</div>
Publishing a snapshot does just that: it publishes a snapshot. Snapshots are point-in-time captures of the data. They are captured just like you would take a snapshot of any other data store. They do not include any new or live updated information. If you want to publish your dashboard online then you will need to provide access to the dashboard directly.

Use feedburner email subscription without Popup

For my selfhosted Wordpress blog, i wish to add Feedburner email subscription form.
Embed code from feedburner site:
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=[BLOGNAME]', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
My issue is, i dont want the popup window to show up. That thing is so 80's stuff.
Instead, is it possible to show the popup contents inline? Using JS or PHP or something?
Check out how div contents change over click here using JS: http://www.willmaster.com/library/web-development/replace-div-content.php
Would be great if something similar could be worked out.
I guess this is easy to do but i have limited knowledge on web designs and php/js/forms.
Thanks in advance.
PS: Please do not suggest plugins. I hate installing plugins unless absolutely necessary.
You can change target="popupwindow" to target="_self" or target="_blank", it can load in current page or go to a new page.

Simple ASP Textbox Call

i am a front-end coder, so i don't know much about ASP
one of my clients called me for a simple help and i didn't refuse him.
What he wants is a simple text box with a submit button, and when he submits a text, lets say "Sample", he wants the server to call http://example.com/Sample.pdf after submission.
Simply, that is what i have at the moment:
<form action="form_action.asp">
<input type="text" name="pdf" value="enter pdf id" />
<input type="submit" value="Submit" />
</form>
It would be better if i can get a working answer as i don't have asp server on my computer, i will not be able to test it.
Any help will be appreciated. Thanks.
This is a very bad idea, especially when the implementer doesn't have an understanding of back-end coding. You are opening up the server to a whole heap of security issues.
If you allow anything to be put in this box, what would stop me entering ../includes/dbsettings.asp for example and getting access to files I really shouldn't have access to?
How will you handle if the file doesn't exist?
Actual Answer: This is a Q&A site, so here is the answer you requested, be careful what you do with it!
The following in it's own ASP page should do what you want:
<%
Response.Redirect("/" & Request.Form("pdf") & ".pdf")
%>
You can (and should) get more complex by setting mime type, designating it as an attachment (so a download box is spawned), streaming the file and above all adding security and error checking.

Perl see the full content in response

I need to take data from html page, so I am using LWP to get the page content.
the response I got is partial and not the full source of the page.
...
<div style="display:none" id="QUERY" query=""></div>
<div style="display:none" id="COLL" idcoll=""></div>
<div style="display:none" id="BROWSE" field=""></div>
<div id="center"></div>
<div id="loading"></div>
...
when using a web debugger(FIRE BUG) I can see a hidden content under:
<div id="center"></div>
<div id="loading"></div>
How can I get the hidden data using Perl ?
It breaks my mind for 3 days now !
Thanks ahead.
let's say it a JS running... How can i
see the content?
You could use WWW::Mechanize::Firefox. It seems to support Javascript.
If the content is indeed added using Javascript, you might be able to use WWW::Scripter with the Javascript or Ajax plugin.
If it is not present in the HTML source that LWP fetches, it is added in some other way. There probably is a Javascript running, or the webserver serves you and LWP different pages because of cookies or user agent string.
Install Firebug or use the Safari Develop menu to see what AJAX/XHR requests are being done to the server, and with what POST/GET parameters. You can then use LWP or any other HTTP client module to do such a request.

Submit a file element with jquery and ajax: No plugins wanted!

I'm trying to do a submit via ajax of a form that contains a file element.
<form id="classic_upload" enctype="multipart/form-data>
<input type="file" name="file" id="file"/>
<br/>
<!-- ...other inputs...-->
<button type="button" id="classic_save"> Send </button>
</form>
What I need to do is to submit this form and check if the file fulfills some requirements, so I wrote an ajax submit for this form
$('#classic_save').click(function(){
$.ajax({
type:"POST",
url:'<g:createLink action="classicUploadFile" controller="scan"/>',
success: function(msg){
alert("Data Loaded: " + msg);
}
});
});
However, I have no idea how to send the file through ajax.
Some context
Originally we were using swfUpload for this. However, we ran into some trouble with https and some certificate issues. So we decided to implement a basic html fallback. Plugins are nice, but we need to guarantee that this fall back is bullet proof (thinking of google mail "classic upload").
Any thoughts? Are iframes the way to go (read somewhere google mail uses them for their classic upload)
Thanks in advance.
If you like, there is jQuery Uploadify plugin to do exactly what you are looking for other than other great features.
I use the jQuery AJAX form plugin on my site to upload files.
Here you'll find a really good example/tutorial how to upload one file http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
Hope it works for you.
Cheers