473,774 Members | 2,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Google Suggest, advanced JS, DHTML

It seems like I've been reading the code to Google Suggest (GS) for
about a week, and I'm going to have to wrap it up shortly.

I'm OK with many of the subjects, and I would say I have intermediate
knowledge of JS.
I've read from many sources/blogs/sites: C Justus (dissected),
alacrity, AjaxAC, etc.

After reading the code, here's a few parts, I didn't follow:
s.<div> contains Iframe, but why does s.style.left="-10000" ? does it
get moved afterwards?

setTimeout() used in multiple places, and even recalculateTime out() //
not sure why

lots of blur() focus() processing and fireEvent() event processing

Although its brilliant, its as difficult to follow as spaghetti code,
keeping track of which variables are global, local, etc.
I understand the keystroke processing and createTextRange code.
I'm sure you have to designate priority between mouse and keystroke
selections, or else you can end up with 2 rows being highlighted, as I
saw in an ASP related example.

I'm intent on doing my own (simplified) version, but want to keep or
learn how to do, any processing that is absolutely neccessary.
Last call for code (on this topic) - I promise... Over n out

May 25 '06 #1
2 1854
_completeDiv=do cument.createEl ement("DIV");
_completeDiv.id ="completeDi v";
// ...
document.body.a ppendChild(_com pleteDiv);

// ...
var M=document.crea teElement("IFRA ME");
M.completeDiv=_ completeDiv; // assigning an element to new id ??
syntax ?
// element previously appendChild to body
M.name="complet ionFrame";
M.id="completio nFrame"; // used over n over

May 26 '06 #2
Still studying this, and although I'm late to the AJAX ballgame, its a
very impressive technology, and I'm looking for more references and
articles to ready, to become proficient myself.

I'm still baffled by this statement ? "completeDi v" is it a property
? out of the blue ?
also does an element need to be appended to body, before it can be
assigned like this?
M.completeDiv=_ completeDiv;

I have the same ? about "prefixStri ngs" It never seems to be defined
anywhere, it just appears as a property.

I don't have my notes handy, but the Google Suggest model has many
nested elements
div { iFrame { div { sub-div(line) { sub-sub-div(line-fragment) } } } }
What purpose does the iFrame (set offscreen) serve ?
Could a simplified version remove the outer two layers ?

As I design my own mini-Suggest I hope to keep it as simple as
possible.
One area of concern is the Event processing associated with keypress
keydown
Which to use ?

I have taken note of T-PE-Lahn and his _addEventListen er method, from
Feb '06 post
under Keywords "elements to addEventListene r, moveDeleteContr ols"
I want to use this xBrowser model; it seems comprehensive for
compatibility.
Is the event that should be passed Case Sensitive ?
The ex: is all lower case, yet I got an IE error when trying this for
"keydown"

I do notice Google Suggest's model uses (slightly convoluted but
efficient) structure:
a.onkeyup=new Function("retur n okuh(event); ");else a.onkeyup=okuh;

I don't know if Google way is best.
I have done some testing and noticed differences between IE and MOZ
Once accepts keydown events from the document.body, while the other is
more restrictive, only capturing keydown events from textbox, and other
controls, etc.

TIA for any suggestions, feedback, and good implementation ideas.

Jun 7 '06 #3

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

Similar topics

0
1408
by: devpoint | last post by:
Advanced DHTML Dropdown List component (Javascript,ASP,.NET,PHP) enhances usability of large dropdown lists with type & select feature. It suggests possible matches for entries you type in the input box. Web site: http://195.228.204.9/advsel/
2
3304
by: devpoint | last post by:
Advanced DHTML Dropdown List component (Javascript,ASP,.NET,PHP) enhances usability of large dropdown lists with type & select feature. It suggests possible matches for entries you type in the input box. Works in all browser with DIV, CSS and JavaScript support: IE5+, Netscape6+, Mozilla, Opera. The script allows full customization with style sheets, single and multiple select mode. Web site: http://195.228.204.9/advsel/
2
4899
by: srinivas | last post by:
HI, I am a dotnet developer.Ho we can do the functionality exists in google suggest site (http://www.google.com/webhp?complete=1&hl=en).In this site in search text box if we enter some text it will automatically populate the data.How we do that in dotnet.If any one have the code for this please send me.Thanks in advance Srinivas
1
2418
by: Vai2000 | last post by:
Can someone tell me or hint me what technology Google is using for its Maps?? Apparently its not Java or DHTML...How are we able to navigate the map on the browser??? Its amazing.. TIA
5
5291
by: gimme_this_gimme_that | last post by:
I'd like to create my own version of google suggest GS. If you haven't seen GS check it out at : http://www.google.com/webhp?complete=1&hl=en I've reviewed several AJAX write-ups on the internet and understand the issues around passing and fetching data from the client to the server. Well, at least as it's described in various tutorials.
1
2322
by: gimme_this_gimme_that | last post by:
What I need is the DHTML for an input box that allows javascript to add drop down entries. .... I'd like to create my own version of google suggest GS. If you haven't seen GS check it out at : http://www.google.com/webhp?complete=1&hl=en
18
2312
by: dlesandrini | last post by:
Has anyone noticed that the Google Groups Advanced Search no longer works correctly? Is it something I'm doing or have others noticed the change? Used to be, if I put *access* in the Groups filter, I got groups with the word "access" in the name. No longer. Used to be, if I selected "English" as the language, I didn't get non-english posts. No longer. What's up with that? Anyone else notice this?
0
2463
by: passion | last post by:
"Specialized Search Engines" along with Google Search Capability (2 in 1): http://specialized-search-engines.blogspot.com/ Billions of websites are available on the web and plenty of extremely good search engines are there like Google, Yahoo and Live to name few of them. Though this search engines have extremely efficient, complex and beautiful algorithms designed by gems of the industry, but still they may not deliver best results for...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9915
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.