Control Printing (What Prints) With Javascript ?

Jul 9, 2004

When designing a site, a request has come to me about printing web pages. What they want is the page to be broken up into frames, and only one frame will be able to be printed. so that if the page is broken into 3 vertical frames. Would it be possible to have it only print the middle page if the person clicked the print button.

This is so that even beginner users to IE or Netscrape would be able to get a printout of the page without having to change options in the print preferences.

* The example the person gave me was similar to Page Breaks in MS Excel. You can see the whole thing, but when print is clicked, you only get a certain section printing (even a beginner can do this).

View 3 Replies


ADVERTISEMENT

Printing Using Web Control Print Button VB.NET

Jul 6, 2005

how or what's the JavaScript code to perform the following:

1. I have two frames on my web page. (Top and Bottom)
2. Top Frame is data
3. Bottom Frame are some Controls. (Print button, Back Button, Close Button.)
4. I'm using VB.Net creating aspx pages.

Question: I would like to write to a field in my sql database when the user presses the "Print" button. I was told that I needed to do the following: "create a "Print" button, and USING JAVASCRIPT, invoke the "window.print()" method when a user presses it, then you want to author a hidden form variable, then submit the form. Your code-behind page would read the hidden form variable to know that the user clicked your "Print" button." What will I need to perform the above? I'm very new to web development and Javascript.

View 9 Replies View Related

Turning Javascript Off While Printing

Jul 23, 2007

I am building a web page.and have a simple javascript menu... I call
the javascript menu within a div block that my print sytlesheet has
set as a display: none;, well all the content in that block doesn't
show up, EXCEPT the javascript is still getting run Code:

View 3 Replies View Related

Clarify Printing With Javascript

Nov 5, 2007

I very new to javascript. I have a php script that query a db and most of the time these reports are lengthly. When I use a print button and OnClick=window.print() it only prints what is currently displayed on the screen. Is there a way to print the entire report? Or if not what can be done?

View 1 Replies View Related

Javascript And Printing On Paper?

Mar 3, 2006

I want to print tables on a regular printer with A4 paper. How do I send data to the printer? And is there a processor for sending html to the printer that the printer understands.

One solution is to open a new window with the javascript and execute a php script that generates tables on that page and then just executes the browsers print version.

However, that is not what I want. I want it to send data to the printer without having to ask the user of permission. Any solution?

View 3 Replies View Related

Printing Out Several Hidden Frames Via Javascript (IE6)

Jul 23, 2005

I try to print out five hidden frames throug a printing-form. I use
the frame.focus() and the frame.print() functions. Everything is fine
except the following little disadvantage:

When I print out the five frames, the print window dialog appears five
time (for each frame once). The user has to confirm his standard
printer several times.

Do anyone know, how I can prevent this?

View 1 Replies View Related

Printing An Array To Screen As Formatted Javascript

Jul 20, 2005

I have a three tier nested array, used to define a map for a javascript
game, and can be edited within the web page. Is there a way I can
generate a visible copy of this array that I can then c&p into a file? I
think the best solution would be to write into a popup window (this
popup would be purely for map development use, so I don't feel worried
by popup blockers, as only myself would be seeing the popup). However, I
have no idea how to:

a) create the string in a form that a html parser can display as
ready-formatted javascript code

b) generate the popup

View 4 Replies View Related

Control Collection In Javascript

Jul 23, 2005

I have a .net application that I am trying to add some javascript code
to for a client-side execution. What I want to do is resize all the
HTML text fields on my web form, but instead of writing a line for
each text box I would like to loop through a collection of controls
and resize the control if it is a text field. Is there a way to do
this in javascript? The function below is what I have been toying with
for the past couple of hours. Another idea was to use a css, but I
can't find an element for the text field.


function Test()
{
Tarray = new Object;
Tarray = document.Form1.children
for (var prop in Tarray)
{
//document.writeln(Tarray.toString);
var s;
s = prop
if (Left(s, 3) == "btn")
{
prop.height = "20px";
}
}
}

View 3 Replies View Related

Javascript Font Control

May 24, 2006

I have been unable to reduce the size of the text that goes along with
my image slideshow(the play, next, stop buttons and also the captions
for the pictures) without reducing the size of my title text(my
friends).

View 3 Replies View Related

Menu Control In Javascript

Jul 20, 2005

I would like to set dynamically the pressed item of a menu of a form in javascript. First, how to get the value of the item that has been selected with the mouse. Then how to set it in javascript. I don't know the object name. I do that like form.myfield.value = xxxx with an input text, but it it doesnot work for menu!

View 1 Replies View Related

ActiveX Control In HTML/JavaScript

Jul 23, 2005

Is there any way i can show my excel chart on my web page.

View 2 Replies View Related

Javascript Use <option> From <select> As Control

Jan 20, 2006

i tried to create a dropdown menu and use the option as a control to
change content inside another text area

the code is like this:

<select name="xxxx"><option onclick="changeunitprice(29.87)"
value="1744"/>

the function changeunitprice() is called when an option is selected

problem is it works well with firefox but not IE

any ideas? or is there anyway can make same effect in IE?

View 1 Replies View Related

Using Javascript To Control Acrobat Reader

Mar 28, 2006

I need information (sure, i used google but couldn't find anything useful yet) about automating/adjusting Acrobat Reader using javascript. I need to print multiple documents without having to open them individually and selecting the print option on each document. I also need to adjust the user interface. Sometimes printing is allowed, sometimes it is not. So i need a way to disable (or remove) the print button from the default toolbar.

Anyone has experience (sample code) or documentation i can use?

View 1 Replies View Related

Hidden Control's Value Is Not Showing In Javascript On MAC Safari

Sep 7, 2005

I'm using input hidden control's value in the javascript function.

same code is working fine on all other browser except a specific
version of safari(i.e.: MAC OS 10.3.7 and Safari 1.2.4).

problem:
control's value is not getting displaying at the first time
when the page gets load, although the same piece of code would work if
I just refresh the page, strage.

declaration of hidden control:
<INPUT id="hSliders" type="hidden" runat="server">

javascript code which is calling the value of hSliders:

alert(document.Form1.hSliders.value)

this alert is showing nothing although it should display string.

i check the view source also control's value is getting populated.

View 1 Replies View Related

How To Dynamic Control Some Picture's Size By Javascript

Feb 14, 2006

i have some pictures in a page. there are have difference sizes. some
of them are too widen for be arrange in a line. so
i been tried to adject their sizes to more suitable.

i add a event to that image likes:
<img id="img" onLoad="adjustSize(this)" src="123.jpg">

and write a function in javascript:
function adjustSize(obj){
if (obj.width>250){
sizeRate=250/obj.width;
obj.width=obj.width*sizeRate;
if (obj.hight>268)
obj.hight=268;
}}

but exactly,i can get the image's width and height. cuz the loading
hasn't finished while the function of adjustSize works.

View 5 Replies View Related

JavaScript Ticker Using Tabular Data Control

Dec 10, 2002

This JavaScript Ticker is an example of "Data Binding" using "Tabular Data Control (TDC)" which is a Microsoft ActiveX control built in to Internet Explorer....

View 6 Replies View Related

Javascript Control For HTML Radio Button

Mar 24, 2006

I'm not what you would call naturally gifted with javascript (I use PHP mostly), so I hope this is an easy question for one of you....

I'm trying to create a HTML link that, when clicked, affects a pair of HTML radio buttons by moving the selection from one radio button to the other.

the following code is wrong, but It's all mine, and its what I've written in a feeble attempt to accomplish this:

<HTML>
<HEAD>
<TITLE></TITLE>

<script type='text/javascript'>
<!--
function rejectAll()
{
if (window.document.link_form.a0.checked == 1)
{
window.document.link_form.a0.checked = -1;
}
}
-->
</script>
</HEAD>
<BODY>
<form action='file.php' method='post' name='link_form'>
<input type='radio' name='a0' value=&#391;' checked>
<input type='radio' name='a0' value='-1'>
</form>
<a href='javascript: void(0)' onClick='rejectAll();'>Reject All</a>
</BODY>
</HTML>

Can anyone see what I'm trying to do here and point me in the right direction...

View 3 Replies View Related

Button Prints Out Random Number

Sep 23, 2011

I am trying to make it so that when you press a button it prints out a random number. This is what I currently have:

Code:
<script type="text/javascript">
function randomnumber(randomForm){
var x=Math.floor(Math.random()*11);
document.write(x);
}
</script>
<FORM>
<INPUT type="button" value="Print Number" name="button1" onClick="randomnumber(this.form)">
</FORM>

When I click on the button it just clears all the text from the page and clears the bgcolor. A random number then appears at the top left corner. I am trying to make it so that when I press the button it prints out a random number just above or below the button. Is this possible? if so how do you set it up?

View 2 Replies View Related

Input Field Prints To Screen As You Type

Mar 11, 2005

I would like to be able to print to the screen as you type in an text input field. I'm guessing that you will have onkeypress, but I'm lost after that.

View 17 Replies View Related

JQuery :: Doesn't Looping Through An Array - Always Prints The First Item

Jun 7, 2010

I don' t know what I'm missing here..

$("div#carousel a").each(function(i) {
$(this).click(function(e) {
e.preventDefault();
console.log(myArray[i]);
});
});

it doesn't loop, it always prints the first item in the array (there are 18 <a>'s inside div#carousel, and 18 items in the array...)

View 4 Replies View Related

IE - Ensure Required Fields Populated Before Screen Prints

Apr 14, 2011

I have a basic html form with some text input fields and a couple drop down selection lists. Our employees print the form and include it with items they need our shipping department to ship for them. The form uses the following verification script to ensure the required fields have been populated before the screen prints. It works exactly as desired in Safari and Firefox. In Internet Explorer, however, the selections made in the drop down lists are reset to the default values on the printed form.

Before you respond with, "don't use Internet Explorer," you have to understand that Internet Explorer is our only corporate approved web browser because it is the only browser supported by some of our other "mission critical" third party web apps and because it can be more rigorously controlled using Group Policies than Safari, Firefox, Chrome, Opera, et al, can. How to make the form print without resetting the drop down list selections? :confused:

<script language="javascript">
function verify() {
var themessage = "You must provide the following information";
if (document.shipment.SenderName.value == "") {
themessage = themessage + ", Sender Name";
} .....

View 1 Replies View Related

Combine IF And FOR - Double Prints The Event Dates.Original

Jan 31, 2010

Is there a way to check for A , else check for B? The code in Red is what I need to put together. [This is an event calendar. problem is it double prints the event dates.Original problem is here. [URL]

[Code]...

View 3 Replies View Related

JQuery :: Superfish: Top Level Navigation Menu Prints As A List

Jul 11, 2011

I have implemented Superfish in SAP Portal. there is a small issue when I take a print using the browser's print option. When I try printing the Web Page from the browser, the Top Level Navigation Menu appears as a list of links (vertical). This is happening in both IE as well as Firefox.

I have seen the same issue in the website from where I downloaded Superfish :-|

1. Goto: [URL]

2. Click on 'Print Preview' button in your Browser.

3. The Superfish Menu below the text 'The result:' will appear as a list of links in the print preview.

View 6 Replies View Related

Need Next-previous Control To Control Contents Within An IFrame?

Oct 10, 2011

Situation:I have a very long page divided into many sections vertical-wise marked by bookmarks, say pageX.html#s1 to s10. I need to show the section inside an iframe (iFrame1) on the mainpage (mainpage.html). I am thinking of having 4 buttons, sitting on the mainpage, to help navigate between these sections on pageX, namely NEXT, PREVIOUS, TOP, END.condition of the frame, fixed width/height, no scroll, no border.Very new to javascript but need this code to make a page work for BIZ.

View 1 Replies View Related

Radio Button That Prints Text To A Text Box?

Nov 11, 2010

I'm working on an html assignment using javascript and I need to have two radio buttons as well as a text box. When you click on one of the radio buttons it needs to display text inside the text box. right now I have:

Code:
<form>
<input type="radio" name="yes" value="" onclick =" "/> yes</br>

[code]....

View 14 Replies View Related

Printing Other Frames

Jul 23, 2005

I have a frameset with two frames, and want to have a button in one
frame call print() in the other one:

This is the layout:

<frameset rows="*,40" frameborder="NO" border="0" framespacing="0">
<frame src="..." name="pritableText">
<frame src="..." name="printButton" scrolling="NO" noresize>
</frameset>

And, in printButton, I got this code:

<a href="#" onClick="parent.printableText.focus();
parent.printableText.print();">Print the page</a>

However, nothing happens in Netscape (7.01) and Firefox (0.8), and in IE (6)
I get an "error in the script". However, I do not identify the error.

Does anyone have a clue onto what's happening?

View 1 Replies View Related







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