Frame print from ASP.Net

G

Graeme

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
 
H

Hermit Dave

for ImageButton - assign the javascript using
ibPrint.attributes.add("onClick", "javascript:framePrint('bottom')");

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
Graeme said:
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
 
G

Graeme

Cool! That's twice you've helped me now Thanks!
Hermit Dave said:
for ImageButton - assign the javascript using
ibPrint.attributes.add("onClick", "javascript:framePrint('bottom')");

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
Graeme said:
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'> said:
???

What's wrong please?
Thanks
Graeme
 
H

Hermit Dave

you are welcome.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
Graeme said:
Cool! That's twice you've helped me now Thanks!
Hermit Dave said:
for ImageButton - assign the javascript using
ibPrint.attributes.add("onClick", "javascript:framePrint('bottom')");

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
Graeme said:
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'> said:
???

What's wrong please?
Thanks
Graeme
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top