add a popup window

They have: 4 posts

Joined: Oct 2006

I need to add a small popup window with instructions, then the visitor clicks Ok and continue. Anyone can tell me how to do that in HTML.

Thanks.

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

You can do a clickable link like this:

<a href="javascript:alert('Put your text for the pop-up here.');">Put your text to click on here.</a>'

Or you can do something that runs when the page opens by replacing your tag with this:

<body onLoad="javascript:alert('Put your text for the pop-up here.');">'

They have: 4 posts

Joined: Oct 2006

Thanks. It worked. Is it possible to add this in a PDF document. When someone opens a pdf document they will get the popup.

I'm not sure if this applies to this thread, if not please ignore.

Thanks for your help.

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

That particular method only works with a HTML document. However, you could have the HTML document then immediately redirect to a pdf.

<body onLoad="javascript:alert('I am redirecting you to Google.');window.location='http://www.google.com';">'

They have: 4 posts

Joined: Oct 2006

very helpful information. Thanks again.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.