Re: Secondary Windows and HTML Help

Subject: Re: Secondary Windows and HTML Help
From: "Wing, Michael J" <mjwing -at- INGR -dot- COM>
Date: Mon, 17 Nov 1997 15:43:44 -0600

> -----Original Message-----
> A colleague passed along a bit of code but I haven't been
> able to make it work. I am working with IE 3.02. Here is the code:
>
>
> <form><input type=button value="What you want on the button here"
> onClick="window.open ('yourHTMLfilehere.html', 'cuecrpro',
> 'scrollbars,resizable,height=400,width=275');"><p></form>
>
> I have a hunch IE doesn't support this type of code...I just get
> script
> errors. Does anyone have anything that works on IE 3.02?
>
>
> Any suggestions are much appreciated,
>
>
> > BaaN
> >
> > Peter Kelly,
>
Peter;

I did some dabbling with 3.02 before going to IE4.0. I was able
to get the window to open; however, it was immediately followed by a
scripting error. I got around it by calling a subroutine and using the
"On Error Resume Next" statement. This statement allowed the window to
open while suppressing the scripting error.

The subroutine uses an argument (File). This argument accepts
the name of the HTML file to open in the window. Using the subroutine
with the argument allows it to be called for numerous examples without
having to set the window parameters for each call. The subroutine is as
follows:

<script language="VBScript">
<!--
sub openwindow(File)
on error resume next
window.open File, "Example", "scrollbars=yes, top=100,
left=100, width=700, height=600"
end sub
-->
</script>

The script would called as follows:

<form><input type=button value="Insert Button Text"
openwindow('MyFile.htm')"></form>

Or called as a link:

<p>To open window click <a
href="javascript:openwindow('MyHtml.htm')">here</a>.</p>
>
>
--- By the way, does calling the window parameters with the
'resizeable= yes' or 'scrollbar= no' syntax instead of just stating
''resizeable" solve part of your problem?

Mike Wing

Michael Wing (mailto:mjwing -at- ingr -dot- com)
Principal Technical Writer
Intergraph Corporation; Huntsville, Alabama
http://www.ingr.com/iss/products/mapping/
(205) 730-7250

"So also the tongue is a small part of the body; and yet it boasts of
great things. Behold, how great a forest is set aflame by such a small
fire!"

-- James 3:5

Posts: mailto:techwr-l -at- listserv -dot- okstate -dot- edu
Commands: mailto:listserv -at- listserv -dot- okstate -dot- edu (e.g. SIGNOFF TECHWR-L)
Archives: http://listserv.okstate.edu/archives/techwr-l.html,
http://www.documentation.com/, or http://www.dejanews.com/
Subjects: JOB:, QUESTION:, SUMMARY:, ANNOUNCE:, or none of these.



Previous by Author: Re: cross-reference between documents
Next by Author: FW: Secondary Windows and HTML Help
Previous by Thread: Secondary Windows and HTML Help
Next by Thread: FW: Secondary Windows and HTML Help


What this post helpful? Share it with friends and colleagues:


Sponsored Ads