PHP Classes

File: script.php

Recommend this page to a friend!
  Classes of Er. Rochak Chauhan   PHP Online Bookmarking Class   script.php   Download  
File: script.php
Role: Auxiliary script
Content type: text/plain
Description: JavaScript Code
Class: PHP Online Bookmarking Class
Code to implement online bookmarking in a page.
Author: By
Last change: Fixed bug to make this class work in IE.
Date: 15 years ago
Size: 596 bytes
 

Contents

Class file image Download
<?php header("Content-type: text/javascript"); ?>
window.onload=init;
var w=screen.width;
var h=screen.height;
var title="";
var link="";
function init() {
    title=document.title;
    link=document.URL;
}
function phpOnlineBookmarkingClass(url){
    link=encodeURIComponent(link);
    title=encodeURIComponent(title);
    var url=url.replace('{PERMALINK}',link);
    var url=url.replace('{TITLE}',title);
    openWindow(url);
}
function openWindow(url) {
   window.open(url,'PhpOnlineBookmarkingClass','width='+w+',height='+h+',menubar=yes,status=yes,location=yes,toolbar=yes,scrollbars=yes');
}