Click to See Complete Forum and Search --> : Javascript help needed for newbie


SparkyK
11-26-2003, 04:28 PM
I'm trying three things: code first:

parent.frames['main'].clearInterval(parent.frames['main'].interval_id);
parent.frames['main'].print();
parent.frames['name'].slide.submit();

I have a frame called 'main'. I want to shut the timer down, line 1, print the image in the frame, line 2, and submit the hidden values back to the originating PHP code, line 3. I must be doing something VERY wrong because the timer won't quit, I can't print and it won't jump to the PHP code. Could some kind soul help me...

Many bows and generous thanks would be bestowed upon my helper.

Sparky
Black Mesa Internet Services

Mr J
11-26-2003, 05:16 PM
Have you tried

parent.frames['main'].clearInterval(interval_id);

fredmv
11-26-2003, 05:21 PM
You also may want to use:

parent.frames['name'].document.forms['slide'].submit();

SparkyK
11-26-2003, 05:24 PM
All is working except the printing of the 'main frame. It only prints the frame that the 'print' button is in. Rest is fine, now...

Mr J
11-27-2003, 09:21 AM
This is what I use for my frameset


function printFrame(){
if(window.print){
parent.main.focus();
parent.main.print()
}
}