Thread View: aus.computers.java
6 messages
6 total messages
Started by Lucy
Tue, 30 Dec 2003 14:11
help! javascript inline of an HTML to open an HTML in a target window
Author: Lucy
Date: Tue, 30 Dec 2003 14:11
Date: Tue, 30 Dec 2003 14:11
23 lines
1776 bytes
1776 bytes
help! javascript inline of an HTML to open an HTML in a target window.
Something like...
<html>
<head>
<title>test</title>
</head>
<body>
hello, world!<BR><BR>
javscript:"window.open('file.html','NewWindow',blah)"
But I can't remember, can't find an example and i really need a way
to open a html file in a window without the user pressing a key or anything.
ANY help would be appreciated. This is due in a few hours and it's the last
bit of code to drop in.
Thanks!
lucyh at dhimaging dot com dot au
Re: help! javascript inline of an HTML to open an HTML in a target window
Author: kingsley
Date: Tue, 30 Dec 2003 19:13
Date: Tue, 30 Dec 2003 19:13
19 lines
2242 bytes
2242 bytes
On Wed, 31 Dec 2003 01:11:21 +1100, Lucy wrote:
> help! javascript inline of an HTML to open an HTML in a target window.
<a
href="javascript:openWindow('<url>','<title>',<window-width>,<window-length>);">
> But I can't remember, can't find an example and i really need a way
> to open a html file in a window without the user pressing a key or anything.
Eeek! I hate that - I have mozilla disable it,
no un-requested popups for me...
-kt
--
Kingsley Turner,
(mailto: kingsley@maddogsbreakfast.com.au)
http://MadDogsBreakfast.com - Travel Tales: The good, bad, and down-right ugly
Re: help! javascript inline of an HTML to open an HTML in a target window
Author: Lucy
Date: Tue, 30 Dec 2003 19:26
Date: Tue, 30 Dec 2003 19:26
35 lines
2391 bytes
2391 bytes
its NOT a pop-up - I need to refresh content in a frame/iframe based on
which keystroke the user presses...
NOT A POPUP...
does anyone have any ideas...
lucyh
"kingsley" <kingsley@maddogsbreakfast.com.au> wrote in message
news:pan.2003.12.30.19.13.51.156282@maddogsbreakfast.com.au...
> On Wed, 31 Dec 2003 01:11:21 +1100, Lucy wrote:
>
> > help! javascript inline of an HTML to open an HTML in a target window.
>
> <a
>
href="javascript:openWindow('<url>','<title>',<window-width>,<window-length>
);">
>
> > But I can't remember, can't find an example and i really need a way
> > to open a html file in a window without the user pressing a key or
anything.
>
> Eeek! I hate that - I have mozilla disable it,
> no un-requested popups for me...
>
> -kt
>
> --
> Kingsley Turner,
> (mailto: kingsley@maddogsbreakfast.com.au)
> http://MadDogsBreakfast.com - Travel Tales: The good, bad, and down-right
ugly
>
Re: help! javascript inline of an HTML to open an HTML in a target window
Author: kaeli
Date: Tue, 30 Dec 2003 20:08
Date: Tue, 30 Dec 2003 20:08
15 lines
1535 bytes
1535 bytes
In article <bssjo6$rsn$1@gnamma.connect.com.au>, someone@somewhere.com enlightened us with... > its NOT a pop-up - I need to refresh content in a frame/iframe based on > which keystroke the user presses... > Capture the keystroke (how to do that is in the archives) and have the action refresh the frame/iframe (also in the archives). -- -- ~kaeli~ What do they use to ship styrofoam? http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace
Re: help! javascript inline of an HTML to open an HTML in a target window
Author: Michael Winter
Date: Tue, 30 Dec 2003 20:15
Date: Tue, 30 Dec 2003 20:15
50 lines
3074 bytes
3074 bytes
On Wed, 31 Dec 2003 06:13:54 +1100, kingsley
<kingsley@maddogsbreakfast.com.au> wrote:
> <a
> href="javascript:openWindow('<url>','<title>',<window-width>,<window-length>);">
I assume that's IE-specific? If it is, say so in future. The cross-browser
method would be:
window.open('url','target_name','features');
The target_name is used with HTML Transitional attributes like:
<A href="..." target="target_name">...</A>
To declare the title of the page, you must use the TITLE element. To set
the window size (bad idea), specify it in the 'features' string:
window.open('...','...','width=x,height=y');
One final comment; DON'T USE JAVASCRIPT PSEUDO-URIs:
1) The correct way of specifying the script language is through the use of
a META element:
<META http-equiv="Content-Script-Type" content="text/javascript">
Not all browsers use Microsoft's initiatives.
2) The onclick event should be used to trigger actions when an element is
clicked, and the URI should point to an alternative, non-javascript page
that shows the same content as the action, or an explanation as to why the
user cannot view it:
<A href="alternative.html" onclick="window.open(...);return
false">...</A>
If there is no alternative content, you might use a button instead of a
text link:
<BUTTON type="button" onclick="window.open(...)">...</BUTTON>
Mike
Follow-ups set to c.l.js
--
Michael Winter
M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Re: help! javascript inline of an HTML to open an HTML in a target window
Author: Tony Morris
Date: Wed, 31 Dec 2003 23:51
Date: Wed, 31 Dec 2003 23:51
41 lines
2395 bytes
2395 bytes
Out of pure curiosity, why is a Javascript question posted to what I believe
is a Java forum (correct me if it is not) ?
Do you not realise the difference between the Java 2 Programming Language
developed by Sun Microsystems and HTML/Javascript ?
--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
"Lucy" <someone@somewhere.com> wrote in message
news:bss18l$jt5$1@gnamma.connect.com.au...
> help! javascript inline of an HTML to open an HTML in a target window.
> Something like...
>
> <html>
> <head>
> <title>test</title>
> </head>
>
> <body>
>
> hello, world!<BR><BR>
>
> javscript:"window.open('file.html','NewWindow',blah)"
>
> But I can't remember, can't find an example and i really need a way
> to open a html file in a window without the user pressing a key or
anything.
>
> ANY help would be appreciated. This is due in a few hours and it's the
last
> bit of code to drop in.
>
> Thanks!
>
> lucyh at dhimaging dot com dot au
>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads