473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Frame print from ASP.Net

Hello

What I'm trying to do is print a frame called 'bottom' from a button on a
different form ('upper'). This works in the aspx page (thanks to
codelifter.com - googled it):

<script>
function framePrint(whichFrame){
parent[whichFrame].focus();
parent[whichFrame].print();
}
</script>

and in the body:<a href="javascript:framePrint('bottom');">CLICK TO PRINT
</a>

But I want to run script from ImageButton (on 'upper' frame), but can't get
it right! Something like ...

Response.Write("<script
language='javascript'><href='javascript:framePrint ('bottom');'>;</script>")

???

What's wrong please?
Thanks
Graeme
Nov 18 '05 #1
3 2449
for ImageButton - assign the javascript using
ibPrint.attributes.add("onClick", "javascript:framePrint('bottom')");

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Graeme" <ma***@NOSPAMwave.co.nz> wrote in message
news:#J*************@TK2MSFTNGP10.phx.gbl...
Hello

What I'm trying to do is print a frame called 'bottom' from a button on a
different form ('upper'). This works in the aspx page (thanks to
codelifter.com - googled it):

<script>
function framePrint(whichFrame){
parent[whichFrame].focus();
parent[whichFrame].print();
}
</script>

and in the body:<a href="javascript:framePrint('bottom');">CLICK TO PRINT
</a>

But I want to run script from ImageButton (on 'upper' frame), but can't get it right! Something like ...

Response.Write("<script
language='javascript'><href='javascript:framePrint ('bottom');'>;</script>")
???

What's wrong please?
Thanks
Graeme

Nov 18 '05 #2
Cool! That's twice you've helped me now Thanks!
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:eb**************@TK2MSFTNGP09.phx.gbl...
for ImageButton - assign the javascript using
ibPrint.attributes.add("onClick", "javascript:framePrint('bottom')");

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Graeme" <ma***@NOSPAMwave.co.nz> wrote in message
news:#J*************@TK2MSFTNGP10.phx.gbl...
Hello

What I'm trying to do is print a frame called 'bottom' from a button on a
different form ('upper'). This works in the aspx page (thanks to
codelifter.com - googled it):

<script>
function framePrint(whichFrame){
parent[whichFrame].focus();
parent[whichFrame].print();
}
</script>

and in the body:<a href="javascript:framePrint('bottom');">CLICK TO PRINT
</a>

But I want to run script from ImageButton (on 'upper' frame), but can't

get
it right! Something like ...

Response.Write("<script

language='javascript'><href='javascript:framePrint ('bottom');'>;</script>")

???

What's wrong please?
Thanks
Graeme


Nov 18 '05 #3
you are welcome.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Graeme" <ma***@NOSPAMwave.co.nz> wrote in message
news:OA*************@TK2MSFTNGP10.phx.gbl...
Cool! That's twice you've helped me now Thanks!
"Hermit Dave" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:eb**************@TK2MSFTNGP09.phx.gbl...
for ImageButton - assign the javascript using
ibPrint.attributes.add("onClick", "javascript:framePrint('bottom')");

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Graeme" <ma***@NOSPAMwave.co.nz> wrote in message
news:#J*************@TK2MSFTNGP10.phx.gbl...
Hello

What I'm trying to do is print a frame called 'bottom' from a button on a different form ('upper'). This works in the aspx page (thanks to
codelifter.com - googled it):

<script>
function framePrint(whichFrame){
parent[whichFrame].focus();
parent[whichFrame].print();
}
</script>

and in the body:<a href="javascript:framePrint('bottom');">CLICK TO PRINT </a>

But I want to run script from ImageButton (on 'upper' frame), but can't

get
it right! Something like ...

Response.Write("<script

language='javascript'><href='javascript:framePrint ('bottom');'>;</script>")

???

What's wrong please?
Thanks
Graeme



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brett | last post by:
I have a frame (frame1) with data in it that is in a table. I'd like to print the data without any HTML. I believe this is the same as if I had the frame window open as a stand alone window and...
4
by: Scott Navarre | last post by:
Hello, I have 2 frames. The top one is the control frame and the bottom one is the display. I have a roll-over button in the top frame that I want to use to do a print() for the bottom frame....
2
by: David Cho | last post by:
My button to print a document is in one frame, but the target doc is in a different one. The button ======= <input type="submit" name="btnPrint" value="Print Application" id="btnPrint"...
4
by: kaeli | last post by:
Hey all, First off, frames - eww. I know. It's an internal site, so please don't tell me to ditch the frames. We like them for what they're being used for. That said, my users like to print...
3
by: dana lees | last post by:
Hi, I'm writing a C# asp.net web application. I have a frameset in which the upper frame contains a "print" button and the lower frame contains content of a different domain. Since i cannot...
18
by: robert | last post by:
Using global variables in Python often raises chaos. Other languages use a clear prefix for globals. * you forget to declare a global * or you declare a global too much or in conflict * you...
2
by: DataSmash | last post by:
Hello, I've created a simple form with 2 radio boxes, 2 text boxes and a button. When I click the button, I'd like to write each "choice" to a text file. I can't figure out how to "link" the...
2
by: PieOPah | last post by:
I have a webpage that uses frames (yes I know, frames - previously been flamed about that, but I do not know anything else to use since I am clueless!!! Been asked to cobble together a site since...
1
by: lev | last post by:
I want to pass a value(name) from a 'sign-in'(password) page to one(result) frame of a second, three-frame frameset page. I did this with 'action = result file.cgi' in the 'sign-in' file and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.