JavaScript in WP Pages
-
Hi there
I have looked at other posts for this solution, but cannot find.
Apologies if I missed posted solution.
Am rusty with web-dev, and new to WP, and I want to put a ‘Bookmark us’ link in a clients WP-Page. – similar to the “javascript.internet.com” code at bottom of this post.
I’ve read the “Javascript in Posts” Codex advice, but can’t get it to work.How do I get a non-template, one-time JavaScript to work in WP?
Thank you
<script language=”JavaScript”>
function bookmark(url,title){
if ((navigator.appName == “Microsoft Internet Explorer”) && (parseInt(navigator.appVersion) >= 4)) {
window.external.AddFavorite(url,title);
} else if (navigator.appName == “Netscape”) {
window.sidebar.addPanel(title,url,””);
} else {
alert(“Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark”);
}
}
</script><form action=”#”>
Add us to your Favourites
<input type=”button” value=”Bookmark us!” onclick=”bookmark(‘http://javascript.internet.com/’,’JavaScript Source’)”>
</form>
<p><div align=”center”>
<font face=”arial, helvetica” size”-2″>Free JavaScripts provided
by The JavaScript Source</font>
</div><p>
The topic ‘JavaScript in WP Pages’ is closed to new replies.