Text hyperlink to open another window above parent window

C

code_hungry

To the kind person who may be able to help me:

I would like to know how to set up a hyperlink on text and have a window
popup. The text is within a frame (I think) and I would like the new window
to open above the main page (above everything on the screen).

The code I have is <a target="_parent" onclick="window.open("
www.blablabla.htm", "height=420,width=330,status" ); return false;"
href="blablabla.htm">
sample</a> click here and ask for our special of
the month.</font></td>

I have another page on my site that does exactly what I want, but I have a
picture as a hyperlink and the code goes like this

<td><div align="center"><a href="#one"
onClick="MM_openBrWindow('modeling/eight.htm','','width=233,height=350')"><img
src="modeling/thumbs/TJ8.jpg" width="80" height="120"
border="0"></a></div></td>
<td><div align="center"> </div></td>

I want the first code to behave like the second. How should I type it?


Thanks in advance.

--
 
C

clintonG

Change your design unless you are working on an Intranet. The marketing and
advertising @ssholes abused the use of popUP windows and almost everybody
has some kind of add-in installed that will block the popUP from popping up.
Its possible to hold the CTRL key to over-ride the blocking program but its
still clumsy and we have to let people using our website know they need to
over-ride. Unless its absolutely neccessary its become a better strategy to
change the way the pages display information.

Furthermore, the code you pasted into your message includes 'MM_' characters
indicatin this code was 'borrowed' from somewhere. That type of prefix is
generated by another push button monkey code generator called Dreamweaver.
Sometimes the monkey is a good boy but usually he is a big problem, he will
eat all your food and then sh!t all over the living room if you catch my
drift.

That's why nobody wants to use popUPs anymore. After all, you may be the
monkey.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 
D

Dan

I am not sure if you would like to try this, but how about an iframe?
An iFrame is an "Inline Frame" and they work in a similar way to regular
frames but without many of the pitfalls of the later. Think of them as a
window in your web page where you can show the contents of another HTML file.
That file can get there by default or be put there and changed by clicking
links on your page. An iFrame can be made to scroll too - so that a page
longer than the window it is shown in can be used.

The HTML for a simple iFrame called "myframe" with dimensions of 200x300
pixels and with a default content file called "myframe.html" is coded like
this...

<iframe src="mypage.html" name="myframe" width="200" height="300"
scrolling="auto"></iframe>

To change the contents of this iFrame with a text link that says "load page
2" and that does just that. i.e. loads "page2.html" into the iFrame, we code
the link like this...

<a href="page2.html" target="myframe">Load page 2</a>

That pretty much covers the basics. One more important point though. If your
iFrame is 200px wide you will need to make sure that your content pages fit
that width, and subtract 10px or so for the scrollbars. The easiest way to do
this is to place the content of these pages into a table or layer (CSS Div)
set to the required width.
Hope this can help you out,
Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top