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.

JavaScript Forum


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



Reply
How do I auto search and select?
Old 11-14-2008, 01:40 PM How do I auto search and select?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
I have to write some clicky GUI code - I'm not very good at this stuff (I'm a back end guy!), and I'm not sure how to accomplish this.

Given a page with a frameset, I need to display a local page on top, and a client's page on the bottom. A lot like Google Images, but it will be mostly or all text.

When someone clicks or double clicks or selects or any type of interaction that can be coded - when somebody "points to" a word or phrase in the top frame, I need to figure out how to auto find that on the bottom page.

Is that possible? How would I figure out how to do it?
__________________

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


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-14-2008, 05:39 PM Re: How do I auto search and select?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
OK, I figured most of it out, but I have one question left.

I'm using window.find(str) to do the magic. And it's working great, within the top frame. What I really need is to handle an event in the top frame, but search the bottom frame.

I figured out how to call things like parent.frames[1].document.body.createTextRange(), but document and body have to find method. And I don't understand the DOM hierarchy.
__________________

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


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 11-14-2008, 06:57 PM Re: How do I auto search and select?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Got pretty much everything working. Top frame sadly has a form with a text box and a button, and then the code works.

Is it possible to execute my function when somebody finishes selecting text in the top frame?
__________________

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


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 11-14-2008, 08:01 PM Re: How do I auto search and select?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Got it, thanks to this tutorial

http://snipplr.com/view/2383/copy-selected-text/
__________________

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


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do I auto search and select?
 

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.27927 seconds with 12 queries