Forum Moderators: open

Message Too Old, No Replies

Couple of scripts

find box + print button

         

superflous

12:59 pm on Apr 18, 2007 (gmt 0)

10+ Year Member



I've a couple of things I want/need and I was wondering if anyone here knew a script for it.. (it may not use JavaScript but I thought it was likely so I posted it here).

Firstly, a simple text field with 'Find' button so that when they enter text and press the button it skips to the word(s) on the page. (Works exactly like ctrl+f except no highlighting basically). The reason I want a box for this is so I don't need to explain ctrl+f to non computer-literate visitors and also because it's unprofessional to get people to do that (imo at least).

Secondly, I was wondering if I could have a button that when pressed prints (or brings up the print dialog for) the selected frame. (i.e. the frame the button is in).

Thanks in advance to anyone that can help me.

Dabrowski

4:58 pm on Apr 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok,

First problem, the find thing...what use is a find without highlighting? Do you mean that you have page sections and you'd like to jump to that section? I think jumping halfway down a page with no highlighting could be disorientating.

It is very easy to make a highlight text function.

Second thing, use this code...

<a href='javascript:print();'>Print This</a>

That will bring up a pring dialog for whatever frame the link is in.