Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Design

Textarea border

Author Message
pagespec



Joined: 14 Mar 2006
Posts: 5

Posted: Tue Mar 14, 2006 - 10:55 pm    Post subject: Textarea border Reply with quote

I have a widget that is pretty basic. I have a single background image and I would like to place a textare on top of that image. I actually have that part working. My problem is that I would like the textarea to be unnoticeable except for the text within, of course. I am using css to hide the border of the textarea, but it is still visible and when you click on the textarea the border becomes highlighted making it even more obvious.

TIA

Paul
View user's profile Send private message Send e-mail Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Tue Mar 14, 2006 - 11:46 pm    Post subject: Try This Reply with quote

This is cool it alows you to type without a text box

http://scriptasylum.com/misc/type/type.html


Jon
View user's profile Send private message Send e-mail Visit poster's website Widgets
purvisa



Joined: 21 Jul 2005
Posts: 182
Location: Kirkland, WA

Posted: Wed Mar 15, 2006 - 8:56 am    Post subject: Reply with quote

Have you looked at Apple's method for creating custom menus? The coder places a custom glass menu image down and a visibility 0 menu over it (the real one). Between the two is a DIV that displays custom-formatted info from the real (invisible) menu. Now, you could apply this sort of thing here with an onChange() event handler. The problem is that the onChange() may not kick in with each character.

This may just be a bad hack, but it might be fun to look into. I am too tired right now to make sense.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger Widgets
pagespec



Joined: 14 Mar 2006
Posts: 5

Posted: Wed Mar 15, 2006 - 11:47 pm    Post subject: Reply with quote

The textarea is a read only control. I am populating it with data from a website.
View user's profile Send private message Send e-mail Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Thu Mar 16, 2006 - 1:04 am    Post subject: Masking Reply with quote

In that case u can use an image mask over the text area the image will be on a layer over the text area and the area u want to be shown will be of course transparent, and the areas u want hidden will be white or what ever color or pattern your widget is. A good example of this is the Anniversary Wedding Guide Widget.
View user's profile Send private message Send e-mail Visit poster's website Widgets
pagespec



Joined: 14 Mar 2006
Posts: 5

Posted: Thu Mar 16, 2006 - 9:49 am    Post subject: Reply with quote

Thanks for the advice. I will give it a go.
View user's profile Send private message Send e-mail Widgets
gnome
Administrator


Joined: 26 Sep 2004
Posts: 145

Posted: Fri Mar 17, 2006 - 12:56 am    Post subject: Reply with quote

I don't think you want to do it that way; in fact, I don't think you're looking for a textarea at all. I think a much simpler solution to your problem is to use a <div> tag. If you give the div tag an ID, you can reference the div through document.getElementById('whatever_the_id_is').whateverYouWantToDo;. Then in order to change the contents of the div, use the .innerHTML property.

In your case, your code would probably look something like this:

Code:
<script>

function websiteHasLoadedSoNowDisplayTheBody() {
    document.getElementById('websitetext').innerHTML = yourXMLHttpRequestObject.responseText;
}

//all your XmlHttpRequest junk here...

</script>

<div id="websitetext" style="width: 250px; height: 150px">Loading Whatever It Is This Widget Does...</div>


Mucking around with image masks and overlaying the positioning is, sorry, but it's completely the wrong way to go. (Clean code is happy code. Smile )

P.S. Notice I gave the <div> tag style information to set the width and height. Adjust these according to your widget.
View user's profile Send private message Widgets
jonbrown



Joined: 01 Jul 2005
Posts: 56
Location: Silver Spring

Posted: Fri Mar 17, 2006 - 9:00 am    Post subject: this is good Reply with quote

This is good thanks, for the code, yes simpler is better. Smile Code on
View user's profile Send private message Send e-mail Visit poster's website Widgets
pagespec



Joined: 14 Mar 2006
Posts: 5

Posted: Tue Mar 21, 2006 - 9:43 pm    Post subject: Reply with quote

I have a question based on the <div> solution. I currenetly have a working Konfabulator widget that populates a text area with a text file that it pulls off of the Internat. I would like to use the same text file to populate this widget. I only have to write the widget once, but the text has to be maintained throughout the year. It would be simpler to have one file for both widgets.

The text file has no formatting in it other than some line feeds and that does not work very well when inserted into te <div> tag. Still looking for ideas though.
View user's profile Send private message Send e-mail Widgets
pagespec



Joined: 14 Mar 2006
Posts: 5

Posted: Wed Mar 22, 2006 - 12:39 am    Post subject: Reply with quote

I got all of my problems figured out.

I was able to use the textarea and setting it to "disabled" made it unselectable, but you can still scroll through the contents.

Thanks for all of your suggestions.

Paul
View user's profile Send private message Send e-mail Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group