Forum Moderators: phranque

Message Too Old, No Replies

invisible form possible?

         

kavalactone

12:49 am on Jun 10, 2009 (gmt 0)

10+ Year Member



Hello everyone...
I am new to this site and to web design in general. I have an idea for a site and first im just trying to find out if this thing is even possible. What I want to do is have users be able to post on a page with out completing a form. At least not a form that they can see... sort of like they are just writing on the page. Is this even possible? If so, how would one go about creating this? Which language to use? Thanks for any and all advice/critism concerning this.

bill

6:42 am on Jun 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You'd have to get the data into a database of some sort. Some blog systems allow for posting by e-mail...

kavalactone

7:35 am on Jun 10, 2009 (gmt 0)

10+ Year Member



The research ive done so far points to some sort of CMS system. But what I was wondering is there a way to allow users to post directly to a page... For example, picture a forum that anyone could type/write on without having to submit a form or type inside a text box. Text would be typed directly into the page like editing in a word processor and then posted to the website for everyone else to view. I was thinking either the text box would have to be invisible, or the entire page would be like one big text box. If the latter, then how would one go about formating the inside of a text box to look like a webpage? Again I am very new at this and just trying to find out if this idea is even technically possible. Thanks for any advice/guidance...

bill

7:48 am on Jun 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you're using HTML then those text input fields would be wrapped in a <form> for processing. You can't escape that.

It sounds like you're looking for some sort of wiki?

rocknbil

8:31 am on Jun 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard kavalactone!

<style type="text/css">
.noborder { width: 100%; border:none; }
</style>

........

<form action="">
<textarea class="noborder" cols="75" rows="50"></textarea>
</form>

Like that?

Problem is, borders are there for a reason . . . that example only works because it's 100% width and anywhere you type is "textarea." Also I'm presuming you'd want to save this somehow, so you might have to do an auto submit with Javascript . . . then could use perl, php, asp, whatever to write it to a database.

[edited by: phranque at 10:42 am (utc) on June 10, 2009]
[edit reason] "spliced" from crosspost [/edit]

kavalactone

9:45 am on Jun 10, 2009 (gmt 0)

10+ Year Member



rocknbil:

Thanks for your post... But is it possible to modify the background of a textbox?

bill:

Yes this is for a wiki-type site I had an idea for.

[edited by: phranque at 10:45 am (utc) on June 10, 2009]
[edit reason] clarification after splicing crosspost [/edit]

trillianjedi

10:42 am on Jun 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could capture the on key press in Javascript and send it off to a form (you probably want to do some buffering) and use AJAX to do that invisibly.

kaled

11:56 am on Jun 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sort of like they are just writing on the page.

I presume you are talking primarily about adding content rather than editing existing content. Therefore I assume that you want a WYSIWYG editor (something that feels a bit like MS Word). If this editor runs on the server it will be appallingly slow, therefore it must run on the client. If it runs on the client, then a SUBMIT button is required to upload the text after editing.

It doesn't have to look or feel like a form, but, insofar as data is edited locally and submitted, in practice, it must act like a form.

Kaled.

rocknbil

3:56 pm on Jun 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



is it possible to modify the background of a textbox?

Did you try? :-)

<style type="text/css">
.noborder {
width: 100%;
border:none;
background:#f7f7f7;
}
</style>

kavalactone

7:09 pm on Jun 10, 2009 (gmt 0)

10+ Year Member



Thanks again rocknbil!

Kaled: I would like users to be able to upload thier own content as well as edit other's content. It would be great if users had the option to change text size, font and color too, but i guess that would require the use of a client side wordprocessor? I would like to get away from having like a pop-up word processing application though. I guess the basic idea would be like a paint program.

kavalactone

7:12 pm on Jun 10, 2009 (gmt 0)

10+ Year Member



Trillianjedi:

Could you put that into laypersons words? I have very little development experience, but I am willing to learn to get my project done. Once again thanks for any and all help!

bill

8:08 am on Jun 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not following this very well. Could you explain why a wiki CMS couldn't accomplish what you're after?

trillianjedi

9:14 am on Jun 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could you put that into laypersons words?

I think so....

1. You're typing into a web form object, styled as you wish, lets say its a kind of multiline text box.

2. Everytime a key is pressed while you type, a Javascript event is triggered called onkeypress [w3schools.com].

3. You could intercept that keypress and send it off to your backend database invisibly (AJAX uses mechanisms like this - basically you have javascript doing POST's to a database webapp URL in the background.

If I understand the problem correctly (you want to build a system similar to Google Docs), then this type of AJAX might be a possible solution.

The other way to approach this is exactly as Google Docs have. Have a look at the way Google Docs does an "auto-save" when you're typing a document. This, instead of using a keypress intercept, has a timer that periodically sends what you've typed off to the server.

Both solutions do have scaling implications - you'll be hammering the webserver quite a bit.

If that doesn't make sense it's possible I've misunderstood the problem.

Could you explain why a wiki CMS couldn't accomplish what you're after?

With a background javascript timer periodically calling post without directing the response of the POST back to the page in view (eg standard AJAX type mechanisms), I think it probably could.

If you're using HTML then those text input fields would be wrapped in a <form> for processing. You can't escape that.

You can to an extent. You can use Javascript to extract data entered into those items, and you can also use Javascript to redirect the form's action URL dynamically, which would mean you could have, for example, an AJAX based submission system (going to one webapp URL) and still keep the button if you wanted to (going to another webapp URL).

What I want to do is have users be able to post on a page with out completing a form. At least not a form that they can see... sort of like they are just writing on the page.

If a "SAVE" button is allowed in your context (eg, like Google Docs) then AJAX will let you do this without the user navigating to a different page (browser remains static).

If a "SAVE" button is not allowed in your context then you'll need to intercept keypresses with Javascript and save one character at a time (or buffer it and save, eg, 10 characters at a time). Or do the Google Docs auto-save trick and do this with a timer. This latter one comes with some risk that the user browses away, or goes offline, before the timer has activated and causing some data loss.

To take a slightly different approach to this discussion - could you explain in what ways your system (purely in terms of input from the user) needs to differ from Google Docs ?

kavalactone

5:24 pm on Jun 11, 2009 (gmt 0)

10+ Year Member



Yeah, the idea is alot like google docs.

rocknbil

5:57 pm on Jun 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I guess the basic idea would be like a paint program.

Like this [imaginationcubed.com]?

This is a bit more complex . . . requires a few combined technologies . . .

trillianjedi

1:09 pm on Jun 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, the idea is alot like google docs.

There you go then....

Like this?

Bill - I love that! Fantastic design - stunning piece of consumer-friendly work....

phranque

3:16 pm on Jun 12, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



... and more than 4 years old:
Drawing on the net [webmasterworld.com]

rocknbil

5:51 pm on Jun 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<ot>Yeah, but wasn't GE the ground-breaker? :-) </ot>

kavalactone

3:36 am on Jun 13, 2009 (gmt 0)

10+ Year Member



Yes, very much like that! That is a very cool site! What programs/languages went into programing something like that? What would be be needed as far as server capability?

phranque

4:43 am on Jun 13, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i would imagine that is all done on the client side with flash.

kavalactone

5:57 am on Jun 14, 2009 (gmt 0)

10+ Year Member



ok, thanks, ill look into that.