SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 10th, 2003, 02:03 PM
zuzupus zuzupus is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 82 zuzupus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
textarea problem

hi,
i created a form having textbox field and besides that there is image when i click on this image a pop window open having text area and 2 buttons clear and add,so when i type soem message in text area and clcik on add it will add in this text field and clear to clear the message

now problem ,is it possible when i type in TEST in this textbox field and clicks on thsi image i can see this TEST in text area field and when change it saves in this textbox

also when i type let say 20 characters in text area and save in text field as this text field size is limited upto 12 he cant see rest 8 characters so when i mouseon this textbox field i can see the whole message upto 20 characters or some alert message

thanks in advance

/*** this is the form in which text field is limited upto 12***/
<td nowrap align="center">
<input type="text" name="text" size="10" maxlength="12">
<img src="../img/edit.gif" onclick="window.open('thewindow.html','newWin','width=150,h eight=130,top=400,left=600,dependent=yes,alwaysRai sed=yes,resizable=1')" width="16" height="16" border="0" alt="Edit Text"></a>
</td>
/***** on clcik on image thewindow.html is opening******/
<HTML>
<head><title>edit</title></head>
<link rel="stylesheet" type="text/css" href="../styles/styles.css" />
<script language="javascript">
</script>
<CENTER>
<FORM NAME=aform>
<BODY bgcolor="#FF9900" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<textarea NAME=text1 style="width:200px;height:100px"></textarea>
<input type="button" value="CLEAR" onClick="document.aform.text1.value=''">
<input type="button" align="right" value="ADD" onClick="window.opener.document.tstest.text.value=document. aform.text1.value;self.close()">
</BODY>
</FORM>
</CENTER>
</HTML>


Reply With Quote
  #2  
Old July 10th, 2003, 03:35 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: textarea problem

To pre-populate the textarea in the popup window (thewindow.html), put this onLoad code in the body tag of the thewindow.html file.

onLoad="window.document.aform.text1.value = window.opener.document.tstest.text.value"

I would suggest changing the text box on the first page to a textarea with to solve your second problem.

let me know if that helps

Reply With Quote
  #3  
Old July 11th, 2003, 07:11 AM
zuzupus zuzupus is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 82 zuzupus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: textarea problem

thanks first is workign fine onLoad but changing text to text area in first form looks very ugly,i mean to say since im using table and its take too much space when i clicks on submit the text saves in same page

<td nowrap align="center">
<textarea name="text" COLS=2 ROWS=2></textarea>
<img src="../img/edit.gif" onclick="window.open('thewindow.html','newWin','width=150,h eight=130,top=400,left=600,dependent=yes,alwaysRai sed=yes,resizable=1')" width="16" height="16" border="0" alt="Edit Text"></a>
</td>
<td nowrap align="center">
//this save inserts this text value in database and at the same time it retrieves from database and print below the text field
<input type="button" value="S" name="Save" border="1" onclick="go();">
//to retrieve the value of text
<td nowrap align="center"><?= $line["text"] ?></td>
</td>

let say if i enter HI how are you thanks for your suggestions and click on submit very next line i get this whole text in single line i just want to limit the text may be upto 10 characters but when i put my mouseon i can see the read whole text for each and every line it will show alt

so how i can put something like "alt" to see the complete text and at the same time it wont take too much space to avoid ugly looking

thanks in advance

Reply With Quote
  #4  
Old July 11th, 2003, 01:06 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: textarea problem

I can't write the code for you, but I can tell you that to limit the length of the text in the text field, you can use the javasript substring() function to display only 10 charachters in the box. As for a popup that displays the whole string on a mousover, I am not quite sure how you would handle that. I have not done that myself, but I am sure someone has so search the internet and you will probably find a script.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > textarea problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway