473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

help! javascript inline of an HTML to open an HTML in a target window

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',bla h)"

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

Jul 20 '05 #1
8 7690
Lee
Lucy said:

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',bl ah)"

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.


<script type="text/javascript">
window.open("file.html","NewWindow","blah")
</script>

But don't expect it to work for many people, since it's become
popular to disable popup windows.

Jul 20 '05 #2
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>',<win dow-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: ki******@maddogsbreakfast.com.au)
http://MadDogsBreakfast.com - Travel Tales: The good, bad, and down-right ugly

Jul 20 '05 #3
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" <ki******@maddogsbreakfast.com.au> wrote in message
news:pa****************************@maddogsbreakfa st.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>',<win dow-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: ki******@maddogsbreakfast.com.au)
http://MadDogsBreakfast.com - Travel Tales: The good, bad, and down-right ugly

Jul 20 '05 #4
In article <bs**********@gnamma.connect.com.au>, so*****@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

Jul 20 '05 #5
On Wed, 31 Dec 2003 06:13:54 +1100, kingsley
<ki******@maddogsbreakfast.com.au> wrote:
<a
href="javascript:openWindow('<url>','<title>',<win dow-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.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #6
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" <so*****@somewhere.com> wrote in message
news:bs**********@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',bla h)"

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

Jul 20 '05 #7
On Tue, 30 Dec 2003 20:15:30 GMT, Michael Winter
<M.******@blueyonder.co.invalid> wrote:
On Wed, 31 Dec 2003 06:13:54 +1100, kingsley
<ki******@maddogsbreakfast.com.au> wrote:
<a
href="javascript:openWindow('<url>','<title>',<win dow-width>,<window-length>);">


I assume that's IE-specific?


Nope, made up (presumanly they have an include file providing it)

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #8
On Tue, 30 Dec 2003 20:15:30 +0000, Michael Winter wrote:
On Wed, 31 Dec 2003 06:13:54 +1100, kingsley
<ki******@maddogsbreakfast.com.au> wrote:
<a
href="javascript:openWindow('<url>','<title>',<win dow-width>,<window-length>);">


I assume that's IE-specific? If it is, say so in future. The cross-browser
method would be:


I dunno, I've never tested it with IE, only mozilla, netscape & konquerer

-kt

--
Kingsley Turner,
(mailto: ki******@maddogsbreakfast.com.au)
http://MadDogsBreakfast.com - Travel Tales: The good, bad, and down-right ugly

Jul 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
4
by: Sarir Khamsi | last post by:
Is there a way to get help the way you get it from the Python interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the module cmd.Cmd? I know how to add commands and help text to...
2
by: Sudheer Kareem | last post by:
Dear All Please tell me how to assosiate help files with my Vb.net Project. Regards Sudheer
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
27
by: Bruce Dodds | last post by:
I recently started using Access 2003 for the first time. I wanted to pass on some comments about the Help system to Access MVPs who frequent this board. I'm doing this in the hope that some of...
4
by: Fred Flintstone | last post by:
This one baffles me. I'm using VS.Net 2005 and write desktop apps that need built in help. So logically, I figure maybe VS has a help system component built in so I search the help. Hey! ...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
10
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
1
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.