Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 03-22-2005, 12:15 PM Detect an enter
sepple's Avatar
Super Talker

Posts: 147
Trades: 0
Is there a way to detect where an enter has been entered into a text field?

I know how to check a value for a character but what is it I search for?
__________________
Thanks
Stephen
sepple is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-22-2005, 02:01 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
I don't know that you can detect an ENTER in a text field (i.e., <input type="text">), but you can in a <textarea> -- it is represented as a newline character ("\n").
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 03-22-2005, 02:45 PM
sepple's Avatar
Super Talker

Posts: 147
Trades: 0
Sorry, I meant to say in a text area. So I should search the value for \n?
__________________
Thanks
Stephen
sepple is offline
Reply With Quote
View Public Profile
 
Old 03-22-2005, 02:54 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Without running a quick test, I would say yes -- I'm sure that's right.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 03-22-2005, 03:43 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
\n is a control sequence, so include it within double quotes and PHP will treat the \n sequence as a literal newline character.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Detect an enter
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23598 seconds with 12 queries