onclick = open page in new window

These Adverts help to pay for this site. ai2

A couple of pieces of code I have been trying to use today:


These Adverts help to pay for this site ai6.

This one creates a button, which when clicked, opens a new page in the same window.

    <form><input onclick=”location.href=(‘https://www.abcdiamond.com’)” type=”button” value=”Details of link…” /></form>

This next one creates a button, which when clicked, opens a new page in a NEW window.

    <form><input onclick=”window.open(‘https://www.abcdiamond.com’)” type=”button” value=”Details of link…” />

This next one creates a button, which when clicked, closes the current window.


Agoda HolidaysAgoda HolidaysThese Adverts help to pay for this site. ai5
    <form method=”post”><input onclick=”window.close()” type=”button” value=”Close this Window” /></form>

To centre these buttons in a table, the code <center> must be placed after the code <form>.

    <form><p align=”center”><input onclick=”location.href=(‘https://www.abcdiamond.com’)” type=”button” value=”Details of link…” /></form>


102.1 - 588,075
DreamHost

Scroll down for Comments
0 0 votes
Article Rating
Subscribe
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments