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)

Hints:

***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

}

}

Kemahiran: CSS, HTML, HTML5, Javascript, PHP

Lihat lebih lanjut: split page html, php string html, page split, write content div, create html content, php ebook, write content program, write html pages, remover, php html, php html javascript, html tags, ebook store, word pages split, php file array, php text array, table set html, php table array, php html data, php html text, page element, variable html, save div, html table save, javascript write display

Tentang Majikan:
( 45 ulasan ) Kaohsiung City, Taiwan

ID Projek: #4062929

Dianugerahkan kepada:

mihaidraghicioiu

Seems simple enough. There is a way to do this entirely in PHP as well, for a given font. But the way you describe it is the simplest to implement.

$50 USD dalam 3 hari
(67 Ulasan)
4.5

11 pekerja bebas membida secara purata $221 untuk pekerjaan ini

srinichal

I can deliver the php script

$210 USD dalam 6 hari
(90 Ulasan)
7.0
gopalvora

ready to start thanks

$200 USD dalam 5 hari
(139 Ulasan)
6.7
LuigiWidmore

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
(98 Ulasan)
6.3
swardi

I am available immediately, please check PMB.

$175 USD dalam 3 hari
(43 Ulasan)
5.9
techwelf

Hi we checked your requirement,We could develop as per your need. u could check that out. we would work till your satisfaction. Thanks & Regards Techwelfare

$223 USD dalam 10 hari
(39 Ulasan)
5.8
corpotec1993

ready to start

$400 USD dalam 5 hari
(32 Ulasan)
4.6
vw1880582vw

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
(6 Ulasan)
4.1
MrGolshani

i can do it.

$250 USD dalam 3 hari
(10 Ulasan)
3.8
rajeshverma88

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

$250 USD dalam 15 hari
(9 Ulasan)
3.6
shabdullah88

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 [url removed, login to view] will do as many Lagi

$300 USD dalam 12 hari
(8 Ulasan)
3.5
mawaiskhansl

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

$120 USD dalam 4 hari
(12 Ulasan)
3.4