You are here: Re: Writing a PHP and Javascript generated page to a PHP variable... « PHP Programming Language « IT news, forums, messages
Re: Writing a PHP and Javascript generated page to a PHP variable...

Posted by Jerry Stuckle on 09/03/06 13:46

jonnyblazed@gmail.com wrote:
> Okay..... I'm gonna sum up what I want to do cause it will make it
> pretty simple for you guys to understand.
>
> Here we go:
> I have a form that posts data to a PHP mailer page I have created. When
> it goes to the PHP mailer page it reads some of the data and modifies
> the page accordingly using Javascript (hiding certain divs, etc...). My
> goal, is to take all this data after it has been processed by
> Javascript and send it through my PHP mailer as it is currently
> formatted.
>

And what happens if the user has js disabled?

> If it helps any, the track I am on right now involves encapsulating the
> Javascript processed block in a div. I am then trying to take the
> .innerHTML data from that div and store it in the PHP $message variable
> for my mailer. This won't work because PHP is server side. So, I moved
> on to generate some Javascript code (with PHP) that sends all that
> messy HTML data that its processed through a URL variable to then be
> read by PHP. This doesn't really accomplish what I want as it cuts off
> about a quarter of the way through my data......
>
> Any ideas??
>

Forget the js. Do your work server-side.

> One thing I thought of but don't know how to do or whether it's even
> possible is using PHP to view the source of the current page and store
> that as the HTML to be e-mailed. Or, is it possible to do something
> similar to .innerHTML with PHP?
>

Nope. As you noted, PHP is server side, not client side.

>
> Well, Thanks in advance everyone! I've been up for the past 4 hours
> trying to figure this out and I rarely post on message boards. You guys
> are my last hope before I'm forced to settle for sending the text
> unformatted and messy :(
>

No, it's not possible to view the source with PHP. However, you
generated the source - so you should know what it is. And you can
buffer your output - see ob_start(), etc. - and use it later.

Not knowing exactly what you're trying to do, it's impossible to say if
you're on the right track or not. But it seems to be needlessly
complicated.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация