How to grab form values without submitting the form?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
csmith
Forum Newbie
Posts: 4
Joined: Wed Feb 15, 2006 8:12 am
Location: Waxhaw, North Carolina

How to grab form values without submitting the form?

Post by csmith »

Hi guys,

I am trying to make a save feature into some code i wrote. Basically, I have a web app that will allow someone to edit an HTML template with a WYSIWYG editor. I am using the php-on-the-fly code example found here: http://www.webpronews.com/webdevelopmen ... heFly.html

On the php file that is called by the on-the-fly example code, all I had to do was place session_start(); at the top of the file and i can not pull in variables from the main app. The issue is, I am trying to get what data is in the textarea of the form without having to submit the form. I want them to be able to keep working on what they are, without having to reload the page or without having them have to start from scratch and select which site they are working on, and then search the database for the template and reload it again.

Thanks for your help,

-- Chris S.
smittydesign@gmail.com
yum-jelly
Forum Commoner
Posts: 98
Joined: Sat Oct 29, 2005 9:16 pm

Post by yum-jelly »

the only way is with javascript >> httprequest object or AJAX...

yj!
csmith
Forum Newbie
Posts: 4
Joined: Wed Feb 15, 2006 8:12 am
Location: Waxhaw, North Carolina

Post by csmith »

yum-jelly wrote:the only way is with javascript >> httprequest object or AJAX...

yj!
@YJ:

Thanks for the recommendation, I have gotten AJAX working with my app and i am able to get the values passed on to the other file now without having to submit the form. The problem now is that I use FCKeditor to provide a WYSIWYG GUI and if I use that and make changes there and then hit my save button, the changes are not reflected through the AJAX class. But if I disable the FCKeditor and pull up the info through the database and then make a change and hit the save button, it will post the changes correctly.

It really isn't an option to not use the FCKeditor, so if anyone knows a work around or what is causing this I would appreciate it.

For reference here is a link to the WYSIWYG editor I am using: http://www.fckeditor.net/

Thanks for your help

-- Chris S.
smittydesign@gmail.com
Post Reply