473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Smiley Click picker using Javascript and FORM woes .. Please help...

OK im prety much a newbie at PHP but it has me hooked.

Im writing a comment system for one of our modules on phpnuke. Its all
going very well, well should i say WAS going very well :)

Ok all the comments work etc and everything is intergrated nicely in the
database. Now im parsing the comments back out to the user and replacing
string like :) with emoticons etc. It works perfectly and i'm seriously
pleased with myself (ok ok remember i said i was new at this :) .....

Now the issue i have is a silly one. I want to present the form input
for the comments in pretty much similair ways to phpbb does on a new
post. I.e present BBCODE icons and smileys that can be clicked and it
inserts into the FORM field ... I have a working javascript that does
just that but try as i might the darn thing will NOT wrap a FORM (even
if wrapping is on). This seems more a MOZILLA problem than IE ( wraps in
that). So if i keep on hitting the same icon again and again it will not
wrap and presents a scrollbar that keeps on going. The actual FORM will
wrap if i insert text inside it manually however so maybe its a
javascript error after all ??

Anyway im hoping someone somewhere can shed some light on this. Here the
test code.
-----------------------------------------------------------------------------
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title></title>
</head>
<body>
<script type="text/javascript">
<!--
function addsmiley(code)
{
var pretext = document.comment.post.value;
this.code = code;
document.comment.post.value = pretext + code;
}
//-->
</script>
<b>Comment on this movie:</b>
<form name="comment" method="post" action="news.php"> <textarea
name="post" wrap="hard" rows="8" cols="30"></textarea></form>
<img src="../../forum/images/smiles/icon_biggrin.gif" alt=":)"
onclick="addsmiley(':)')" style="border: 0px solid ; width: 15px;
height: 15px; cursor: pointer;">
</body>
</html>
------------------------------------------------------------------------------
Ive tried setting WRAP to Virtual / HARD / SOFT / Physical etc and it
still insists on not wrapping from the javascript ... Anyone any ideas ???

Jul 17 '05 #1
0 1655

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: George Hester | last post by:
In a page I have when the user left-clicks the page a Input box for a form gets the focus. But if the user right-clicks the page the Input box is not getting the focus. I'd like the Input box to...
3
by: descds | last post by:
OK im prety much a newbie at PHP but it has me hooked. Im writing a comment system for one of our modules on phpnuke. Its all going very well, well should i say WAS going very well :) Ok all...
13
by: Hussein Patwa | last post by:
Hi there. I'm new to this group. I'm also partially sighted so navigating the web is sometimes quite difficult. I'm looking for a javascript date picker, you know the ones that travel sites...
1
by: Simon | last post by:
Is there any way that I can use an input with type file as a directory picker? The input starts a file picker but I want to be able to select a folder rather than a file. Thanks IA, Simon
3
by: DotNetGuy | last post by:
I have been programming in asp.net w/ vb for 3 years now and I feel a need to include more client side script with javascript so here I am. Hopefully in the right place. I have a timecard web app...
0
by: obuli | last post by:
In VB.NET Form,i am using Date Time Picker How to fire "Date Time Picker" 's Click and "Double Click" events... It seems these events are not fired.. any one please help me .. thanks in...
1
by: Sabbuser | last post by:
Hey Guys please help me out!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I have placed a Date & Time Picker Control on a form in Windows 2000, When our Organization has upgraded all the PC's with...
4
by: gggram2000 | last post by:
Hi, I'm using php 5.2.3 with mysql server 5.1 as backend. I have a program in which a person enters or chooses two dates from two datetime pickers and other info, I'm not sure if the problem is...
0
by: =?Utf-8?B?a3BpenpsZQ==?= | last post by:
Hi all. using vs.net 9, C# I've got a trivial dilemma right now with my datetimepicker. It is bound to a datetime field in a database. This field is also set to not allow nulls. The default...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.