I have been trying to achieve this since yesterday night and am not
able to figure out any solution as yet.
There's an XML page with RDF information inside. I want to simply get
the source of this page and save it in a file.(basically i want to do a
'save as' without prompting the user.
I'll use the FSO for putting it into the file but to get the source of
the page in a variable :
I think document.body or document.html do not work in Firefox. Also
document.documentElement.getElementByTagName('xml' )[0].innerHTML is of
no good.
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:
I find JS more time consuming because I have to manually search line by line for a single error. In C++ or C the compiler tells me the exact line number of the error or at least what the error is so I can research it.
With JS, notepad or Firefox's source viewer doesn't indicate anything. Is there any software available that will error check JS codes?
I've a problem: I need to retrieve (in javascript) the soure HTML code from a url without loading the page then put the HTML source code in a string variable to manipulate it. From this variable I need to get all the links to perform some operations.
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
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?
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)?
Many ajax and javascript functions change the innerHTML of elements in the source, writing and rewriting things in the source
You can run any javascript function or action you want that would change the source, but when you view it, it will always show the original source before a JS function changed it
Is there a way to view the changed source after each time a JS functoin changes it??
for example: <span id="whatever">This is the original source code</span>
then you may run this piece of JS: whatever.innerHTML= 'Changed source code!'
but when you right click and press 'view source" you will always get this: <span id="whatever">This is the original source code</span>
I want to get the changed source code, maybe its possible to write the changed source code to another file, or use some kind of HTTP prog to read the changes on an html page?
View source code of external files in html like *.js and *.css For example: In this page I am Posting to, there are 24 *.js files. They are loaded but you can't see them. I would like to view some of these external javascript files for study. Not necessarily on this site, but where ever I find them.
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>
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?
I'm not exactly sure as to whether this question should be posted here or on the php forum, but I think it mainly has to do with fancybox's zoom feature. My problem is this.
I'm doing SEO for an already established site and this site has a features area with about three different options that use the fancybox zoom script. These boxes all contain pertinent information (SEO heavy) about each option as well as links to different sites. All of the info displayed is pulled from a database via php.
I would like to be able to display the descriptions as searchable content, and be able to track how many people click on the external links, but as it is now none of this shows up on the source code. The fancybox zoom feature seems to open up another window within my main page.
My question is this. Is there anyway that I can retain fancybox and get the content to come up under the source code? Or does this maybe even sound like an unusual effect from fancybox.
I can send some code later, if anyone needs it. I just didn't want to throw everything in here all at once, because it's quite a bit of code involved.
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.
i don't know so much about jquery so just i use them with indication from their web site. so my problem is how can i use multiple source of jquery without one source stop the other,and that what i need:
recently i noticed that all of my embedded JavaScript code and external style sheets are being shown IN "view source."
this happens in all browsers ( IE, FF, Chrome, and Safari [windows]) ... oddly enough it only happens when viewing on my vista or win2k3 machines. is this something added to these OS's or the result of an installed program? has anyone seen this before?
I would like to open an html file locally (not fetch it from a server) and somehow use javascript to fetch the relative resources from the server. One solution would be to convert all of the relative links to absolute links. I can convert the html source file anyway I wish, but ideally I would like to modify the html source as little as possible, for example insert a function that modifies the result of the src attribute. How would I go about this? Is there any trick I can use to define where the relative home is? Am I going to get into any scripting security gotchas?
I have a website that I frequently visit (FWIW, Firefox 3.x is my browser of choice) with many image sources referring to URLs that end with "-thumbnail.jpg". However, for better image quality, I am trying to use Greasemonkey to replace all instances of "-thumbnail.jpg" in the source of images on this site with "-bigthumbnail.jpg". The closest I could think of was to somehow use getElementsByTagName and innerHTML.replace, but realized that innerHTML does not do HTML, only content.
Below is as far as I tried to get on my own,
var as,ae; as = document.getElementsByTagName("img"); for (var i = 0; i < as.length; i++) { ae = as[i]; ae.innerHTML = ae.innerHTML.replace(/-thumbnail/gi, "-bigthumbnail"); } })();
I'm having some trouble implementing a popup in firefox. I attached some simplified code at the bottom. This is part of a firefox extension. What happens is that a popup window is created, the popup window updates it's data depending on what is shown on the main window. The problem comes when i click the 'X' to close the popup window. it crashes firefox, and closes all firefox windows. can somebody help me with this? why does this happen? I'm 99% sure the error comes from the form in the html code.
I am trying to add select items via jquery to a select control. The following code works perfectly in IE, Opera. Chrome and Safari, but for the life of me I cant get it working in firefox. I really don't think its a bug but I must be missing something obvious.
I am trying to build a site using html, css and javascript. problem is it works perfectly in IE but practically not at all in firefox. I have lots of mouseovers and tooltips, none of which will work. The only thing that seems to work is an onload random image generator. The html and css all return no errors using firefox's validation tool. I am completely new to javascript and have been trying to learn via building this site, so apologies if the code is really messy. Would be really grateful if anyone could help - I thought I was getting to grips with this when it all worked in IE, but am now feeling pretty stupid and think I must be missing something pretty fundamental. I've spent an age getting frustrated trying to resolve this.
I built a pretty simple Ajax request which needs to send some data to the server and put the resulting HTML in a div. Unforunately, I need to POST the data. I used .post() and it worked fine ... *on Chrome and Opera!* ... on Firefox no data gets posted even though firebug shows the data in it's console. I ended up building the longest possible request, just to try all the options. No luck. As soon as I POST anything, Firefox won't receive the data. If this was a Firefox issue, wouldn't I read about it everywhere? What's wrong?