Jquery :: Save As HTML - Copy Source And Present To User
Feb 23, 2011
I'm working on a webpage which is completely self-sufficient. This means if you copied the source you would be able to load it locally without any glitches from your computer. I want to embed a "Save As" feature into this document using only javascript or jquery. For various reasons I do not have access to a server-side language to perform this action. I've done some research but can't seem to find a definitive way to do this.
My goal:
User clicks "Save As HTML" button which triggers jquery to copy the source of the page and present it to the user as a mypage.html download. My fall back approach will be to open a new tab with just the desired html and instruct the user to manually "File -> Save As". However, this is very undesirable and I would like to find a solution to fulfill the goal above.
View 1 Replies
ADVERTISEMENT
Feb 23, 2011
I got some code that loads divs from other web pages into a particular div in my main page. In other words, I click on a button, and this tells jquery to load afragment of a particular page into my main page. For instance if I have 5 web pages onrock stars, I could have 5 buttons, and each button could load one rockstar's biography into a div on the main page (and replace whatever was there before). This works, and I do see the content that it loaded. But when I do 'view source' in IE, I do not see that content (the bio of the rock star). Another clue that this content is not really there, is when I try and run some code on that content. The content (from those external pages) have divs with specific names, and I try and make them into collapsible panels by running the following short function:
var IdentifyPanels = function() {
$("DIV.ContainerPanel > DIV.collapsePanelHeader > DIV.ArrowExpand").toggle(
function() {
[code]....
View 2 Replies
View Related
Apr 26, 2011
our requirement is client wants to know howmany users leaving the main page without entering
data in the application page.at that time we need to show the css popup overlay.in the following scenarios overlay should pop up.1)when user leaves the page.(e.g. type other address in the address bar).bascially user shy away from the browser.2)clicks browser close button.we will show one css popup overlay(not browser popup) and in the back ground main application will be greyed out.this overlay consists of some text fields and some buttons will be there and parallely in the back ground we will execute AJAX call.can we accomplish this requirement??is yes how?will it work in all browsers?my concern is how to prevent the browser from closing when css overlay comes up?
View 1 Replies
View Related
Feb 1, 2009
I am creating this small Script to to take a url address from the user and then it present it them as a link.
<HTML><HEAD><TITLE>Page Download</TITLE>
View 6 Replies
View Related
Apr 26, 2011
our requirement is client wants to know howmany users leaving the main page without entering data in the application page.at that time we need to show the css popup overlay. in the following scenarios overlay should pop up. 1)when user leaves the page.(e.g. type other address in the address bar).bascially user shy away from the browser. 2)clicks browser close button.
we will show one css popup overlay(not browser popup) and in the back ground main application will be greyed out.this overlay consists of some text fields and some buttons will be there and parallely in the back ground we will execute AJAX call. can we accomplish this requirement??is yes how?will it work in all browsers?my concern is how to prevent the browser from closing when css overlay comes up?
View 3 Replies
View Related
Apr 27, 2011
our requirement is client wants to know howmany users leaving the main page without entering data in the application page.at that time we need to show the css popup overlay. in the following scenarios overlay should pop up.
1)when user leaves the page.(e.g. type other address in the address bar).bascially user shy away from the browser.
2)clicks browser close button.
we will show one css popup overlay(not browser popup) and in the back ground main application will be greyed out.this overlay consists of some text fields and some buttons will be there and parallely in the back ground we will execute AJAX call. can we accomplish this requirement??is yes how?will it work in all browsers? how to prevent the browser from closing(e.g.when user chooses browser X button) when css overlay comes up.
View 2 Replies
View Related
Aug 24, 2011
There is a website based game I would like to build, but I am not sure that the main functionality would be possible to program. I have tried to do as much research as possible. I know that javascript can do drag and drop, but would it be possible for the user to specify which images (out of a catalogue of thousands) they would like to be present on screen/toplay with?
It would need to work like this: The user is presented with a catalgoue of images. They can refine this catalogue according to things like colour, type etc. The user chooses which images they would like to play with by adding them to their personal choices (e.g. with an 'add this item' button). In the next step the user is taken to a page showing all the items added to their personal list, which they can then drag and drop around the screen. The user can then save/share their 'creation'.
View 4 Replies
View Related
Aug 15, 2010
How do I create a JavaScript script to save a web page's source code to a file?
Example: I will go to a website, it automatically from the web page's source code will be saved to a file.
View 4 Replies
View Related
Aug 4, 2008
Is there a chance to disable these two things from my site?
(View Source) and (Ctrl + C)
View 9 Replies
View Related
Oct 11, 2011
I've wrote what (at least in my mind) and awsome report generator for a group who uses my server. The user gets all the data from the server via the server's normal reporting tools, and then sorts/shows/hides/formats columns using javascript/jquery (saves server cycles). There is only one slight problem (think "grand canyon" slight), once a user has a form he or she wants, then the user needs to save the tab separated value form of the report to disk.
I can output the TSV into a DIV (and probably an IFRAME I'm guessing), and do for display purposes. However, the users need to copy/paste at this point, which is rather user-unfriendly. Is there a way to either prompt a file download/save (without making a call to the server and wasting time), or opening up a new tab with just the desired text, so the user can save it?
EDIT: I'd rather not replace the whole page that generates the report, as the user probably doesn't want to lose his or her work in formatting setings, and my want to generate multiple reports from one dataset/query, without having to rewrite the query.
View 4 Replies
View Related
Sep 2, 2010
$(document).bind('contextmenu', function() {
return false;
});
[code]....
View 8 Replies
View Related
Jun 6, 2009
<div>
</div><div>
</div><div>
How to restrict the user copy the article content in the page ,</div><div>
1.I want to disable the copy from the right click menu ,</div><div>
2.also want to restrict the user Select all the article and take the copy
View 3 Replies
View Related
Jul 20, 2011
I need to write code to prompt the user to save the changes before the user session expires. And this should happen only when the user makes any changes, if he doesnt make any changes, I should not be prompting him. For this I need to check if any fields are modified in the page. I need a generalised code that goes in the header or footer page of the application, so that I dont have to make any changes to the existing 100 pages.
View 2 Replies
View Related
Jul 8, 2009
I have busy forum site where some of the spammers copy/paste the forum topics from other sites! I would like to disable copy/paste using Javascript! Its possible? How to do it!
View 5 Replies
View Related
Aug 17, 2009
How do I get back the DOM element as HTML source using jQuery? The html() method only returns the innerHTML and it does not include the UIelement itself. But I am more interested in converting the UI element
View 7 Replies
View Related
Mar 25, 2011
I`m using some functions to manipulate contents of local HTML files When modifications are done i would like to make them permanent by clicking SAVE / SAVE AS / EXPORT button How to save dynamically generated HTML elements into the opened file, as well as export them to another one?
View 1 Replies
View Related
Feb 19, 2011
It will be best to use server side scripting like php for it , because user can disable his javascript in that condition your code won't work
View 1 Replies
View Related
Aug 22, 2010
I'm wondering if there's a jQuery method or plugin which allows me to dump the HTML source of all selected elements, ie. the element(s) referred to by any jQuery object?
As opposed to .html(), which outputs the "innerHTML", I'm looking for something like IE's old "outerHTML" function, which also provided the tag's own code as well as its inner HTML.
For a jQuery object which has captured several elements, I'd like to output *all* the HTML of all those elements at once, in one "dump" as it were. Is that easily doable?
View 2 Replies
View Related
Jul 13, 2011
I've seen examples of how to turn xml into html, but how can I make the html output clickable so as to be able to access the corresponding original xml element (to read its attribute values)?
View 1 Replies
View Related
Nov 8, 2008
how to hide the source when user click on viewsource ex
<script LANGUAGE="javascript">
document.write("hello");
</script>
View 3 Replies
View Related
Jun 8, 2010
I need save to my html page id path adress like id="#videos/fashion/test.txt" but if I want find this line like $("div").find("#videos/fashion/test.txt") it doesn't find it. I think it for the slashes. What is the best way to save into html page value and not to be seen on design view?
View 1 Replies
View Related
Jul 11, 2011
I am having some problems to solve what i will explain next:
I am reading a xml into a html table code...
This code only give me the textboxes that have values and the correspondent value.
What can i do to have more than the value of the textbox, ie, return the value of that and the value of another column in the same row?
View 3 Replies
View Related
Jun 30, 2009
I have a confirm message box which asks the user whether they wish to take a survey. At the moment the confirm box appears each time the page is loaded. Would there be a way that when the user selects OK to take the survey this is remembered, so when the users next visit the page the box doesn't appear?
View 1 Replies
View Related
Jun 3, 2009
Why isn't this code working? I can add items but only remove the ones originally added in the source code, not the ones dynamically added.
<form><div class="list">
<div class="item">
<input type="text" value="" /> <a href=""class="removeitem">Remove this item</a>
</div><div class="item">
<input type="text" value="" /> <a href=""
class="removeitem">Remove this item</a>
</div><a href="" class="additem">Add item to list</a>
</div></form>
<script type="text/javascript">
// Add item to list
$('.additem').click(function(){
var template = $($(this).prev().get(0)).clone();
template.insertBefore($(this));
return false;
});
// Remove item from list
$('.removeitem').click(function(){
$(this).prev().parent().remove();
return false;
});
</script>
View 2 Replies
View Related
Oct 26, 2009
I'm new to js/jquery and this forum so please forgive my potentially off-scope js/jquery remarks. I've been running a lot of toggles to show, hide, etc... divs and other HTML elements. It's making my application incredibly nice navigation wise.
Now to put myself in my users shoes. Say one user toggles on and off the things they want and don't want until they are satisfied with all the content of the screen. (That is by the way the nature of my application. A user loads in various variables via PHP and other means and when satisfied, a PDF is generated for them containing all their preferred content.)
Because: When a user is at a point where all the content they are viewing is worthy of a PDF, it is also worth saving that HTML 'view' (classes switched, variable adjusted, etc...). I would call it 'Save this workspace' or something along those lines.
I don't have a direct question per se but am more interested in the views of others who have similar thoughts and moreover, what relationship has jQuery had in helping employing some method?
View 4 Replies
View Related
Jul 31, 2009
Basically am working on the travel booking site,i written the lot of ajax scripts , so am little bit fear of that ajax ,becoz if some one tried to access anonymously So i dont want to user access or takeing my javascript fileTell me how to restrict the use get my javascript filecouple of days back i saw on site, in the i take that site js url , and when i typed on the Browser , the system say , you cant view this URL
View 2 Replies
View Related