Sign in to follow this  
Brocketino

[web] Border respond to event

Recommended Posts

Brocketino    101
Quote:
Original post by benryves
You can gain access to an object's style properties by using getElementById to return the object then .style to edit it.

Yeah, I know:), but the thing is that i want a tableborder to respond to certain events and I have had no luck in implementing this.

Share this post


Link to post
Share on other sites
Extrarius    1412
Could you explain what exactly you're trying to implement? It seems an odd thing to have a table's border do anything besides display some lines.

Share this post


Link to post
Share on other sites
Fuzztrek    572
Oh, do you mean you want to, say, call a function when someone clicks on a table's border (but not the entire table itself)? I don't think that's possible, currently, but an intersting concept.

Share this post


Link to post
Share on other sites
Brocketino    101
Quote:
Original post by Fuzztrek
Oh, do you mean you want to, say, call a function when someone clicks on a table's border (but not the entire table itself)? I don't think that's possible, currently, but an intersting concept.

Yeah, thats exactly what im trying to do. The user should be able to resize the table when clicking and dragging on its border.

Share this post


Link to post
Share on other sites
Fuzztrek    572
As I said before, I don't think it's possible using conventional methods. However, you may be able to construct something similar using the entire table's events, and checking to see if the user's mouse coordinates are in the appropriate range on click (or something.) Also, if you are trying to create some sort of WYSIWYG editor, you can look into designMode (and its other incarnations on different browsers) which lets the user edit the entire HTML document (not just tables).

Share this post


Link to post
Share on other sites
Brocketino    101
Ok. I have another question for you Fuzztrek:)

I'm trying to build a sort of window alike GUI using dom, css and javascript. The problem is my CreateWindow function. All the windows should be appended inside the 'main document', the content area of each window is made up from an iframe.
The problem is - if i have have a icon inside the page loaded in the iframe of my first window and click this a second window should be appended into the main page, but instead it's created inside the iframes current document. So, is there some way to get the main pages object from a javascript, i tried to use window.document without any good result:)

Share this post


Link to post
Share on other sites
Fuzztrek    572
You should be able to use the "parent" object inside the iFrame to access the "main document". I'm not exactly sure about calling a user-defined function in another frame, as I haven't used frames very much. Some more information on iFrames can be found here, maybe it will provide some help ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this