DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 17, 2014, 10:38:54 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: Just a stupid moment in my life... re: commentary entry box size  (Read 3291 times)
0 Members and 1 Guest are viewing this topic.
Afkamm
Mod God
*****
Offline Offline

Posts: 1670

MarcTheSlayer


View Profile WWW
« Reply #15 on: February 11, 2012, 09:54:33 AM »

Javascript. Smiley
Logged

Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 873


View Profile WWW
« Reply #16 on: February 11, 2012, 10:59:50 AM »

*wonders how thats done*
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
HunterD
Captain of the Guard
***
Offline Offline

Posts: 102


RPGLink... it's a thing!


View Profile
« Reply #17 on: February 11, 2012, 12:29:50 PM »

*wonders how thats done*

Ever have someone type out an RP post, which ends abruptly mid word?  'Cause they hit enter prematurely, or accidentally.  This method enables the RPer to actually review their post, and not have to break their train of thought as they are being creative due to an accidental enter.  I love it as is, and wouldn't really recommend the javascript enter-catch.

That's my .02.  Your change may vary.

~h
Logged
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 873


View Profile WWW
« Reply #18 on: April 21, 2012, 03:12:28 PM »

Well its been a bit and I still dont know exactly how do do this enter thing I would like.  I use ajax...It would be nice to know how to get it to send when pressing enter and not make a new line...Thank you
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 873


View Profile WWW
« Reply #19 on: September 29, 2012, 01:06:45 PM »

*bump*  Still wondering how the enter thing is done.  Afkamm said Javascript but that i'm clueless on.  help would be wonderful.  Please and thank you.
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
The Doctor
Mod God
*****
Offline Offline

Posts: 1482



View Profile WWW
« Reply #20 on: September 29, 2012, 05:04:59 PM »

If you don't want it to add a new line when you hit enter, why not just keep the chatbox the same as it regularly is? Either moving your mouse to hit 'Add', or scrolling back in your commentary box isn't that much hard work, last time I checked..
Logged


Time Lords Online - The First Doctor Who LoGD!

~ LoGD Programmer ~ My Released Modules ~ The Original Aeolus ~
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1014


Zeno's Arrow never hits the mark.


View Profile
« Reply #21 on: September 29, 2012, 05:18:02 PM »

She wants a textarea box, though. I suggest taking a look at this: http://cburgmer.github.com/jquery-shiftenter/
Logged

My Mods
I'm not currently a fully active member of DP, though I do respond to most PMs.
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 873


View Profile WWW
« Reply #22 on: September 29, 2012, 05:29:47 PM »

Because this way its easier to see all you've typed and see your whole rp and make sure its right.  Thats why I want the enter to send it and the big box to type in.
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 873


View Profile WWW
« Reply #23 on: October 13, 2012, 07:17:25 PM »

I know I might seem like a huge pain but I really would like this to work because then it would make it so much easier cause we wouldnt have to edit posts as much.  So doe anyone know how to get the enter key to send the post when the box is bigger?  I know Afkamm said javascroipt, but I know nothing about Javascript.  Sorry I'm not all codey smarts.
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
The Doctor
Mod God
*****
Offline Offline

Posts: 1482



View Profile WWW
« Reply #24 on: October 13, 2012, 07:18:47 PM »

I know I might seem like a huge pain but I really would like this to work because then it would make it so much easier cause we wouldnt have to edit posts as much.  So doe anyone know how to get the enter key to send the post when the box is bigger?  I know Afkamm said javascroipt, but I know nothing about Javascript.  Sorry I'm not all codey smarts.

Have you tried Google?
Logged


Time Lords Online - The First Doctor Who LoGD!

~ LoGD Programmer ~ My Released Modules ~ The Original Aeolus ~
Maverick
Captain of the Guard
***
Offline Offline

Posts: 106


View Profile
« Reply #25 on: October 13, 2012, 08:40:12 PM »

The main thing that I don't understand is that there already is a javascript function made in commentary.php that previews what you have typed...

Logged
The Doctor
Mod God
*****
Offline Offline

Posts: 1482



View Profile WWW
« Reply #26 on: October 13, 2012, 08:49:56 PM »

The main thing that I don't understand is that there already is a javascript function made in commentary.php that previews what you have typed...

This isn't to view the colours and all, this is to view the actual text. Like, if you made a mistake a paragrap or so back, with this, you can easily just click where you made the mistake, and edit it, instead of scrolling back through words and words to find it.
Logged


Time Lords Online - The First Doctor Who LoGD!

~ LoGD Programmer ~ My Released Modules ~ The Original Aeolus ~
Boris735
Mod God
*****
Offline Offline

Posts: 553


View Profile
« Reply #27 on: October 14, 2012, 04:06:11 AM »

This isn't to view the colours and all, this is to view the actual text. Like, if you made a mistake a paragrap or so back, with this, you can easily just click where you made the mistake, and edit it, instead of scrolling back through words and words to find it.

Right, but if pressing Enter submits then there can only be the one paragraph, so that's not entirely on point.  That said, the same does apply to several lines back, and textareas are much nicer to edit than text fields.

So, one way to do this might be the following; note that I have not tried this or tested it myself, so apologies if some syntactic (or more serious) error has crept in.  The textarea needs to be reacting to the key up event in some fashion similar to this:

Code:
<textarea onKeyUp="if (event.keyCode == 13) { this.form.submit(); return false; }"></textarea>

However, if the textarea is displaying a commentary preview then it is likely already doing something on the keyup (or keypress) event.  In that case, you may instead need to modify that javascript to insert code like the above.
Logged
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 873


View Profile WWW
« Reply #28 on: October 14, 2012, 08:27:05 AM »

And that code goes where? and it will allow you to press enter if you have a text area and not a text field?  Cause right niw its the standard text field and I want a text area but when you hit enter it makes a new line and I dont want it too.  I want it to send the message like it does with the original text field.
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
The Doctor
Mod God
*****
Offline Offline

Posts: 1482



View Profile WWW
« Reply #29 on: October 14, 2012, 09:10:28 AM »

And that code goes where? and it will allow you to press enter if you have a text area and not a text field?  Cause right niw its the standard text field and I want a text area but when you hit enter it makes a new line and I dont want it too.  I want it to send the message like it does with the original text field.

Well, I believe that is what we've been helping you do, and that is about the third time you've said what you want..

Have you actually tried inserting it somewhere? I'll give you a hint. Look at lib/commentary.php. How is the text field inserted? Via the previewtext function, available in lib/forms.php. Take a look at that. Do you see a <textarea> section somewhere? I certainly do. You say you're a C&P coder - it shouldn't be too hard from here on in.
Logged


Time Lords Online - The First Doctor Who LoGD!

~ LoGD Programmer ~ My Released Modules ~ The Original Aeolus ~
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
32 Guests, 1 User
Rohen
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search