Crossbrowser Version Of A Textarea Printout?
Nov 3, 2010
Is anyone able to make this code crossbrowser? Can it actually be done?It brings up the print dialog box and will print out the contents of a textarea box, but only in IE.
Code:
/*
for notepad printouts
[code]....
View 3 Replies
ADVERTISEMENT
Oct 3, 2006
I am building a linear sequence of pages with forward and backward nav. Because they have to pass info from one page to another they're in a frameset. I want the same title to appear on all the pages so I've put the title as a variable in the frameset. title="Mytitle"
I have a global.js which is loaded with every page and it contains a script to run certain functions on page load. One of these is a function addTitle() which is to take the variable from the frameset and put it into the appropriate div on the page. I did it at first with innerHTML
var titleplace=top.mainFrame.document.getElementById("sectionTitle")
title=parent.title
titleplace.innerHTML=title
This works in IE5.5 and 6 but not in Firefox or Opera. No error message but it just doesn't show anything.
I then tried with DOM scripting:
var titleplace=top.mainFrame.document.getElementById("sectionTitle")
title=parent.title
mazename=top.mainFrame.document.createTextNode(title)
titleplace.appendChild(mazename)
Same thing - no-show in FF or Opera, but OK in IE.
I've proved that the addTitle function is being run on pageload and it is getting the right value for title from the frameset. It just isn't putting it into the page.
OK, I could just hard-code it but this is to be a template for other apps so I'd like as much as possible scripted. I don't want anything specific in global.js as it should be reusable by anyone using the templates without them going into it.
View 1 Replies
View Related
Jul 12, 2006
I'd like to know where I can find some informations on how to retrive
element dimensions in a cross browser whay. Until now I used
offsetWidth and offsetHeight, but I know their are not standard and
they have a different behaviour on different browsers. I need a way
that includes also margins, padding and eventually border size. I know
I have to deal with doctypes, but my javascript knowledge is not so
advanced.
View 3 Replies
View Related
May 26, 2005
As you might know, removeNode() is an IE DOM extension (works only for IE5, IE6 and Opera 8 but not in IE 5.2 for Mac, Moz, Safari.
Following one of my clients request I think I found a cross-browser solution to remove a node but keeping it's childs. The request was to find a function which will remove, onevent, the <a href=""> tags, but keeping the inner text.
This is what I have done. If you know a better or a shorter solution, please let me know:
function removeN(tag){
var tags = document.getElementsByTagName(tag);
for (var i=tags.length-1;i>=0;i--){
var root = tags[i].parentNode;
var kids = tags[i].childNodes;
var eSpan = document.createElement('span')
for(var j=0;j<kids.length;j++){
clon = kids[j].cloneNode(true);
eSpan.appendChild(clon)
}
root.replaceChild(eSpan,tags[i])
}
}
the variable tag might be 'a', 'strong', 'em'....
I guess that the code might be used as a crossbrowser solution for replaceNode() as well. In fact the code as it is replaces the node tag with a <span> tag, but it might replace it whith another desired tag....
View 5 Replies
View Related
Jun 30, 2011
I have a page that is running several scripts. I am trying to add a script which refreshes an iframe every 5 seconds. The iframe is reading the contents of a chat buffer so I want the frame to show non-logged-in viewers the latest...I can get my existing code using setInterval to work fine on IE, but it wont on FF or Chrome though Chrome will show the updated info if I refresh the page (which I dont want to do as a am also reloading jpgs. and which FF wont do without emptying the cache).
the page is here: kayasplace.com/cam2.php
and the body code:
Code:
<script>
window.setInterval("reloadIFrame();",5000);
function reloadIFrame() {
[code]....
View 3 Replies
View Related
Mar 27, 2010
I have problems updating from version 1.7.2. to version 1.8. I'm using a custom theme - can anybody give me a step-by-step guide how to update without destroying the whole site ? :) I would like to have the button featueres in the new version
View 1 Replies
View Related
Dec 21, 2010
I am trying to get started using JQuery, but I find I can't even get to lesson #1. When I go to jquery.com and click to download the latest version (or any version) it doesn't "download" anything. It opens the file as a webpage in my browser and I see all the JQuery in one big string. Why won't the file just download? Is it the browser I am using? Is it my Mac?
View 2 Replies
View Related
May 13, 2011
How would i change back to the default length of textarea?
I have this comment area that after clicking submit i will append the new comment in the list of comments through ajax... i got one problem though, everything is working perfectly well except for the textarea that won't change back to it's default size...
EXAMPLE:
The problem is that the textareawon't change back to it's default size // let's say that the default size is rows=3
View 2 Replies
View Related
Jul 23, 2005
Does anyone have a quick script to find which version of IE a page is
being viewed with?
Specifically, I want to seperate version 4 from versions 5+, and post a
warning against using 4.
I expect I'll have to search out the (navigator.appAgent) string for
the MSIE substring, but since I don't need it until tomorrow, laziness
dictates I ask here before getting on with it. Is there another
variable? a less cumbersome way?
View 12 Replies
View Related
Jul 23, 2005
CAn anyone tell me where to get previous versions of internet explorer
(for ecxample version 3 or 4)? I need it to test my javascript code...
View 3 Replies
View Related
Feb 6, 2007
Is there a possibility to compare and visualize in a user-friendly way
the differences of two html files?
I need also something like a version-control. I think I could generate
for everychange of the text a new record in the database. But now I
need a tool (JavaScript, Java, etc.) to compare and visualize two
versions of these html-files online over a web-browser.
I know, this is not really a javascript topic, but perhaps here is
anyone how knows a tool for that.
View 5 Replies
View Related
Apr 8, 2006
Strange question i know, but i am trying to read javascript ( not necessarily clever enough to program), so that i can at least understand other scripts when incorporating them on my site as i feel this is important.
Would it be ok to go straight to v1.5 or as there are differences between the versions, start at say 1.2 and learn the differences between the upgrades.
I suppose i am hoping that i only need to start at 1.5 to make things easier.
View 3 Replies
View Related
Dec 26, 2002
i have a problem to create a printable version from html page.
View 2 Replies
View Related
Jul 23, 2005
I've have got this script, the only thing I want to be changed is the first part. It has to detect IE version 6 instead of just "Microsoft Internet Explorer". Can somebody help me out? I tried "Microsoft Internet Explorer 6" but that doesn't work.
<SCRIPT LANGUAGE="Javascript">
<!--
bName = navigator.appName;
if (bName =="Microsoft Internet Explorer") {
document.write('<link media="screen" rel="STYLESHEET" type="text/css"
href="stylesheet1.css">')
} else {
document.write('<link media="screen" rel="STYLESHEET" type="text/css"
href="stylesheet2.css">')
}
//-->
</SCRIPT>
View 8 Replies
View Related
Aug 26, 2006
I noticed that some sites use <script src='fineName.js?ver=XXX'></script(even google) Someone told me that it's for script changes, means - if the file in
server has been changed than the new XXX will demand to load the new file.
I find it hard to believe that it's true.
View 8 Replies
View Related
Jan 10, 2012
I am exhausted today, not to include the funk that the BCS national championship put me in, so I must be either crazy or missing something. When I do the following the code works;
[Code]...
View 3 Replies
View Related
Feb 17, 2011
I want to know the latest available version of the browser i am using and also i want to upgrade my current browser version to the latest one when i call a javascript method.on body onload i want to change my current browser version to the latest available version of the browser.
View 6 Replies
View Related
Mar 15, 2007
What the short way of using an if statment for assigning values to a verible?
View 2 Replies
View Related
Oct 26, 2003
I have just written a expanding menu which works great in IE6/NS7, what I have installed to check with, but the first person I went to show it to had IE 5.0, and guess what? It fell over.
So, I am wondering if anyone has any ideas about how I can go about checking this in IE5. I am using XP and, while i haven't tried, my understanding is that I cannot have multiple versions of IE installed, is this right? If not where can I get older versions from?
View 3 Replies
View Related
Oct 13, 2010
Does somebody know the code to detect the Blackberry version with javascript? If its a blackberry i need to detect the version of the OS because our mobile site only support version 4.5.0.127 and up. If the version is under that i have to redirect the user to another page to tell him that his OS version is not supported, they have to update there OS before using our mobile site.
<script language=javascript>
<!--
if((navigator.userAgent.match(/blackberry/i)) && !request.getHeader("user-agent").matches("^BlackBerry[0-9]{0,6}/(4\. (5\.(0\.(1(2[7-9]|[3-9]{1}\d{1})|[2-9]{1}\d{2}){1}|[1-9]){1}|[6-9] |1[0-9]){1}|[5-9]|1[0-9]){1}.*") ) )
{
location.href='notcompatible.cfm';
}
View 1 Replies
View Related
Feb 9, 2010
While attempting to create a greasemonkey script in FF2 (don't ask), I discovered that the "let" statement was causing my code to fail. After confirming that this statement has been available since FF2 (js engine 1.7) [URL] became curious as one determines their javascript engine in FF. IE has a way to inspect the jscript engine, ala [URL] but I couldn't find anything similar for FF. Feel free to list links for testing engines in other browsers,
View 1 Replies
View Related
Nov 3, 2009
How can you have a smaller version of a picture and when you click on it a bigger version pops up?
View 4 Replies
View Related
Jul 23, 2005
how to find if JAVA is evalible and if yes, of what version?
View 4 Replies
View Related
May 29, 2007
I've uploaded a new version of the javascript::Minifier module that
was on CPAN. It was a translation of JSMin but I rewrote it so it now
handles missing semicolons, + ++ code, and leaves those freaky IE
conditional comments in the output. The goal was that if working code
is input then working code is output where working == working.
Breaking code that works is not such a good idea. Code:
View 4 Replies
View Related
Jun 12, 2007
I have bookmarklets with a # in their urls but safari changes the
# to %23. And unfortunately, the bookmarklet does not work with %23.
You need to change it back manually to #.
View 3 Replies
View Related
Mar 27, 2010
I have an application developed using jQuery1.2.3 and I currently have issues with printing a pre-defined area of a page within the application.I found the solution in the jQuery Plugin - PrintArea but it's not compattible with jQuery 1.2.x. The introduction of PrintArea and jQuery 1.3.2 to my app throws errors like "exception thrown and not caught - Query1.3.2.js" and "object does not support this property or method - on the line where I'm calling the printArea function".
View 1 Replies
View Related