473,394 Members | 1,765 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,394 software developers and data experts.

Need simple java script to Popup small window

tmp
I want to have a 'help' popup on seveal key words on a page.

I don't want to use a button...

But would like to do it like a link... so the text on the page is the link
to the Popup Window.

Can anyone provide me with a simple example of a JavaScript to do this.

thanks in advance.

Jul 23 '05 #1
1 2487
tmp wrote:
I want to have a 'help' popup on seveal key words on a page.

I don't want to use a button...

But would like to do it like a link... so the text on the page is the link
to the Popup Window.

Can anyone provide me with a simple example of a JavaScript to do this.

thanks in advance.


Be aware of the risk of using new windows to display content. Not all user
agents support client-side JavaScript. Some user agents that support
client-side JavaScript have it disabled. Some block any attempt to open a new
window. Some open your new window in a new tab instead (which means you can
not control to the size/chrome of the new window).

In general, the way to execute client-side JavaScript using a link is:

<a href="noJS.html" onclick="yourFunction();return false;">Link to
yourFunction()</a>

Specifically, opening a window is something like:

<a href="yourPopup.html"
target="yourPopupWindow"
onclick="window.open(this.href, this.target, '...attributes...');return
false;">Link</a>

The content of '...attributes...' is documented at <url:
http://msdn.microsoft.com/workshop/a...ods/open_0.asp
/>

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2

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

Similar topics

1
by: Alex Shi | last post by:
Hi, I understand my question might not necessarily be a issue specific for PHP. However since my current development is conducted with PHP so I definitely need a PHP solution for it. Here is the...
3
by: Raju V.K | last post by:
can I use javascript and PHP in the following manner to create a pop-up window: <--- in <head> </head> <script language=javascript> function popup(folder1, file1) {...
1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
3
by: Steve | last post by:
Hi, I have a nice little script that works well displaying images on my website. It's a script where if you clik a thumbnail image a pop up window opens that contains a larger version of the same...
2
by: Mike Button | last post by:
Hello all, I am really really desperate on what I should do, and I am asking for help from anyone in this newsgroup, here's the situation: I am creating a form that is being run on a server...
6
by: nizar.jouini | last post by:
I have web page that contains two links. link "a" and link "b". When I click on "a" a small window should pop up. when I click on "b" another small window should pop up. So what you should see now...
5
by: Chris | last post by:
Hi, I have been trying for days, yes days, to use the calender from the asp.net timetracker starter kit. I am now frustrated. I finally get the popup calender to popup but when I click ok to...
2
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
10
by: happyse27 | last post by:
Hi all, I have enabled Javascripting in internet explorer 7, and I have been writing script in perl. The thing I cant do now is to pop up image in small html frame from main html page.......
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.