Sedang Disiapkan

PHP: HTML Tag/Tag data remover, Javascript: Calculate Display Page Data

(Please refer to the file provided for an example)

Preparing a word document to HTML for display in a set-sized DIV (ie: to be displayed in a simple eBook).

Require a program to do the following:

1. PHP to strip </html tags from file, [and] cut out tags and content

2. Using Javascript, given a certain div size (height, width), calculate how many non-overflow pages the data requires in order to be shown.


1. Given an HTML, write PHP functionality to:

a) Strip tags, but keep the content

b) cut out and all contents (but should be put in a variable, just in case we wish to save this at a later point)


2. With the remaining HTML, use Javascript to split HTML into pages (according to a certain div height/width)

a) given a div size (given a height/width), parse through the HTML contents to see how many pages (of the given size) are needed to display all the content. (***NOTE: see example file)


***using JS: clientHeight, write a block of data to the div (a paragraph, or table) and loop through data blocks to see if they overflow.

*** create an array of text, to store each "page" of data

Example logic:

while(exists HTML){

get next data block

if(data does not overflow){

add data to current string


else if(data overflows){

push data that fits in the without overflowing, into an array element (page)

use a new string with overflow text to start a fresh string, and continue looping with remaining data




Given: HTML
PHP part of program should be able:
1. Remove [html] tags
2. Cut out [style] tags and data
JAVASCRIPT part of the program should
1. Given a set div size and HTML content to display (from above), cut the HTML content and place into div size where no overflow exists (in essense, to count the amount of div, or pages, to show all the data)

No DB creation or insertion. No fancy output, just the PHP functionality is required.

Kemahiran: CSS, HTML, HTML5, Javascript, PHP

Lihat lagi: using javascript calculate overflow width, split page html, php string to html, page split, js to write content in div, how to start a ebook, create js with html content, php ebook, how to html program, how do we write the content of a program, write html pages, Remover, php html, php html javascript, parse html, parse an html, html tags, ebook store, parse php table html, parse table javascript, word pages split, javascript html parse, php file array, php text array, table set html

Tentang Majikan:
( 45 ulasan ) Kaohsiung City, Taiwan

ID Projek: #4062929

9 pekerja bebas membida secara purata $239 untuk pekerjaan ini


ready to start thanks

$200 USD dalam 5 hari
(500 Ulasan)

I can deliver the php script

$210 USD dalam 6 hari
(142 Ulasan)

Hi sir , My name is Luigi Widmore and i'm an expert web developer. My areas are HTML/CSS PHP/MYSQL Design/Photoshop. I can complete this project in 4 days or less. Please check PM for details , you may be impresse Lagi

$250 USD dalam 999 hari
(125 Ulasan)

Dear sir After reading your project details,we are interested in this project and would like to bid on this project. we take care of our every client personally and has always long term [login to view URL] will do as many Lagi

$300 USD dalam 12 hari
(19 Ulasan)

I am available immediately, please check PMB.

$175 USD dalam 3 hari
(43 Ulasan)

I'm an experienced web developer of 17 years and can deliver this project with a high level of satisfaction.

$250 USD dalam 10 hari
(35 Ulasan)

Greetings! Ready to start,I can start right away thanks

$250 USD dalam 15 hari
(56 Ulasan)

ready to start

$400 USD dalam 5 hari
(42 Ulasan)

Hi,I'll Give you exact solution that you have required..

$120 USD dalam 4 hari
(12 Ulasan)