Script To Print The Current URL Is Fine?

Jul 23, 2005

the simple script to print the current URL is fine:

<script language="JavaScript">

<!--

document.write(document.URL)

//-->

</script>


but as my cgi-script receiving the URL referrer needs the actual page name,
anyone browsing a top level directory without the index.html as in:

http://site.com/about/

and the cgi-script will not work. So how can this javascript be done so if the document.URL end in / the script adds index.html.

View 1 Replies


ADVERTISEMENT

Print The Current Record

Jul 23, 2005

I have to insert a button in the left of all record in a table to print the
current record, simply create a table and print it in the printer.

anyone have an idea or there is a printer/report utility.

View 1 Replies View Related

Print A Page But Not Current?

Feb 1, 2010

I'm running a script for my ecommerce website. I'd like to modify a button that brings up a customer's invoice as a webpage to instead print out that page (not the current page) and not leave the page I am currently on. Is there a way to do this in javascript? I'm assuming window.print() can only be used for the current page?

View 1 Replies View Related

Date Object - Cannot Get Current Month With Print Function

May 28, 2009

I was working on Date() object of javascript. When I write:
today=new Date();
year=today.getYear();
month=today.getMonth();
day=today.getDay();
Here everything was correct but when I print month then I got currentmonth-1 that if the currentmonth is 5 then t get 4. If the current month is 07 then I get 06. At last I worked by adding 1 with month like month+1.

View 1 Replies View Related

Print A Web Page With Method Window.print() Without Pages Number And Footer

Jul 3, 2007

I would like to print a Web page with javascript method window.print() without pages number and footer.

View 7 Replies View Related

Window.print() - Configure Function To Make It Print A Certain Pixel Only?

Aug 30, 2011

Can I configure this function to make it print a certain pixel only?

Around 500px X 700px Center.

CODE:

Is it possible?

View 1 Replies View Related

Print Link That Doesn't Show The Print Dialog

Apr 7, 2006

I'm trying to create a print link that sends the page to the printer without opening the print dialog box on the browser.

I know that window.print() will open the print dialog and then the user has to click OK.

is there anything that can do this?

View 1 Replies View Related

Window.print Doesn't Print Long Page / Fix It?

Jul 21, 2009

I'm facing a different problem.

I'm having a long page where there will be content to be printed.

I'm using the css using media=print to hide all the unwanted contents and using the window.print method to invoke printing.

But when i click the print button it prints only partial content upto a single page and all the remaining contents are discarded.

I wonder what may be the problem!!!

And there's another problem , i've bills to be printed in order but dont want them to be breaking in between pages .(ie a bill should be printed fully if there is enough space at the bottom or should be printed on the next page)

How can i do both of this?

View 3 Replies View Related

How Do I Print A Page In IE5 For Mac? Window.print() Doesn't Work

Jan 3, 2002

Hey all. I am currently putting together a test page of mine where a popup window comes up showing a coupon that I will have a link enabling them to print it simply and easily.

For my current code I have a simple <a href="javascript:window.print()"> that works great on both Internet Explorer 5 and Netscape 4/6 on the PC but for some reason, Internet Explorer 5 for Macintosh doesn't do a thing.

View 2 Replies View Related

Window.print With No Print Dialog Prompt

Jul 20, 2005

Is it possible to do an ie print from javascript that does not bring
up the print dialog? I'm in a situation where i need to load a
sequence of files into a browser and print all of them without any
user interaction.

View 3 Replies View Related

Get Print Preview Triggered By Button Rather Than Just Print?

May 1, 2009

Is there a way to get a print preview triggered by a button rather than just print?

<input type="button" name="print" value="Print" onClick="document.print();">

Unfortunately, the WebBrowser.execWB(7) functionality doesn't work in FF3.

Any idea using good old fashion JavaScript or jQuery?

View 1 Replies View Related

Window.print() Does Not Print Page Correctly

Jun 22, 2007

So I have a print page that's written in a combination of php & html. The body tag is outside the php with an onload="window.print();window.close;"

The idea behind this print page is when the print button is pressed on the parent window, it generates this child window that is specifically made larger for printing reports that people can read easily. I use css for text styles and the table "width" is longer.

All the html code inbetween the body tags is created by php using the php "Print" function.
</head>

<body class="page" onload="window.print();window.close;">
<?php
Print "<table width=1600 border=1 cellpadding=0 cellspacing=0 class=page>";
Print "<tr bgcolor=cbe5ff>";
Print "<td width=30>WO #</td>";
// yada yada yada
?>

My problem is it does not print the table dimension or the font size above a certain size. When I print in landscape, which is what this page is designed for, it prints the same size as "scaled to fit" portrait. On the screen the size is correct and if I use the browser print button, it prints to the correct size.

The css works, it will make changes and will even make the text smaller just won't print over a certain size (9pt?).

View 1 Replies View Related

Print A Div And Iframe Content With Single Print?

Jun 27, 2007

I have a requirement to print particular area of a web page. Web page has many div's and one iframe in it. I need to print a div and iframe content with one single print command. I am able to do so but then two print dialog boxes come up when the print command is given. I have written a javascript function to achieve this.

I did find a solution to this but then I do not understand why onload fails to work in this scenario. I am summarizing steps I had followed.

1) Read the contents of div using innerHTML and store it to a variable.

2) Read the contents of iframe and store it to a variable. "Details" is id of the iframe.

var iframeObj = document.getElementById("Details");
var iframeDoc;
frameDoc = iframeObj.contentWindow.document;

3) Open a window and write all these content after writing these few lines
flashDivWindow.document.write('<html><head><title>Print page</title></head><body onload="javascript:window.print()">');

When I view the source all HTML code can be seen as expected, however this doesn't trigger onload event. I need to refresh the page for print to happen, some thing which isn't practical. Using Javascript reload doesn't help as print is invoked even before the page content is reloaded.

View 2 Replies View Related

Print Two Iframes Within Same Print Method?

Feb 15, 2009

I want have two iframes in a single php page and I print them using two print methods. May I know how to print the both iframes using a single print method?

View 6 Replies View Related

Is It Possible To Print [using Window.print()]

Jul 23, 2005

Is it possible to print [using window.print()] a page that has no "title"
and "page number" on the top and no "link adress" and "date" on the bottom
(to print just a page just as it is...)?

View 2 Replies View Related

Bookmarklet Parse URL - Take The Current URL Of The Page And Open A New Window With A URL Based On The Current Page?

Mar 16, 2009

I'm trying to create two bookmarklets:

1. Take the current URL of the page and open a new window with a URL based on the current page. Some examples (I use "->" to mean "this URL turns into that URL"):I plan to use these bookmarklets in sequence, first pressing 1 to log into the CMS, then pressing 2 to edit the current page.

View 5 Replies View Related

Display Print Preview Dialog, Not Print Dialog

Jul 23, 2005

If I do the following, it will pop up print dialog. But i want to produce
"File->Print Preview" Screen. Is it possible to do that?

<input type="button" value='Print Preview' onClick='window.print();'>

View 1 Replies View Related

ExecCommand Not Working In IE, Fine In FF?

Jul 4, 2010

I'm (experimenting) writing my own RTE in JavaScript, I'm doing pretty good until it comes to the commands, the execCommand method. Here's what I have so far:

function get(editid) {
// IE
if(document.frames[editid].document) return document.frames[editid].document;
else return document.getElementById(editid).contentDocument;
}

[Code]....

The xC (execute command) function is not working! I've tried so much.

View 2 Replies View Related

RemoveChild() Working Fine In FF But Not In IE

Jul 3, 2009

I have the situation where I want to clear out the whole tree of nodes given a parent node. I get this to work in Firefox (where, actually, it's not necessary to traverse the whole tree) but in IE it doesn't work at all.

[Code]....

View 1 Replies View Related

Onblur Not Working In Mozilla, Fine In IE

Jan 15, 2007

The php file is just an echo statement
now to simplify for the moment. If instead of calling the replace
function I've also tried putting in an alert function. Alert works,
the calling the php file does not.

Any suggestions greatly appreciated, I've never encountered such
difficult functionality as with javascript in firefox compared to IE.
Might just be my luck though... Code:

View 3 Replies View Related

IE: Object Expected; Moz: Runs Fine

Jul 20, 2005

I have a html document, in which I include two standard libraries of
functions (supposed to help me with cross browser issues), and one
application-specific script file. All Javascript fcoz.

The very first attempt at invoking a function from this last script file
fails miserably in IE (6) but works as it should in Moz (1.4)

I have tried putting alert()s here and there, so I (think I) can tell
the exact spot where IE dies.

Structure is like this (all in HEAD):

<script type="text/javascript" src="../libPlatform.js"></script>
<script type="text/javascript" src="../libDOM.js"></script>
<script type="text/javascript" src="tooltip.js"></script>
<script type="text/javascript">

function register() {
initAPI();
alert('after init');
regTooltip('a1');
alert('after dreg-1');
regTooltip('a2');
}
</script>

initAPI sits in libPlatform, and executes. I get to see the first alert.
And then, boom, IE script errors on page: Object expected (points to
'regTooltip')

Am I missing something here? If my code is wrong, why is Mozilla so
forgiving about it? How can I persuade IE to get the function?

Note: if I put regTooltip() right above register(), so locally in the
document, it works.

View 3 Replies View Related

JQuery :: 2 Scripts Working Fine Alone, But Not Together?

Jun 17, 2011

I'm struggling with these 2 scripts.

Atm on my side i'm using this for putting in content in certain divs, and that is working fine.

$(document).ready(function () {
$('a').click(function() {
$('.fjern').remove();
});

[Code]....

But on my picture site, i'm using a lightbox jquery script that also works fine when it just applies to the gallery div.

But If i use the above script to get the images from another html, inside the gallery div. I suddenly can't get the lightbox script to apply to them.

The lightbox script only works if the images is placed in the div directly. Hope this makes sense.

How do i get the lightbox script to run to the images moved inside the gallery div fra the above mentioned script?

Ps. The lightbox script looks like this:[URL]

View 2 Replies View Related

Script Not Running In IE6 But Fine In FF And Opera?

Feb 13, 2010

This code is generating row in table at Run time. But once I reach up 10 rows which I kept maximum limit after that even I Refresh the Browser and try to do same function its giving error in IE

Line: 31
Char: 6
Error: Invalid Argument
Code: 0

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

[code]...

View 3 Replies View Related

GetElementsByName Doesnot Work Fine ?

Jun 6, 2011

I got a problem with getElementsByName in IE 7 check that if i do this

So if i've changed its type to radio so it's give me the right number so what the hell
why ?

View 1 Replies View Related

Fade-In Slideshow V1.51 - Fine In All Browsers Except IE?

Aug 26, 2009

Is this a known problem? I have Fade-In Slideshow v1.51 running on a site I am building. The purpose is to rotate banner images.

Sometimes when the page is loaded in IE it only loads half of it...other times it loads fully. In every other browser I tried it has been fine - Firefox, Opera, Chrome, Safarai just not Internet Explorer. Here is the JavaScript code, that is in the head:

[Code]...

View 2 Replies View Related

IE8 Display PNG Images Fine Until Rotate

Feb 8, 2011

IE8 display PNG images fine until rotate show this issue in the below page: [URL]

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved