473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Trying to implement Google Suggest kind of a thing, need help

So this is what i'm trying to do. I have a textbox in a <td> of a table and as you type the results should start to show right underneath in a group of 5. So i put a div under the textbox in the same td and make it invisible on the page load. As the user types, the 5 results are shown in a dynamically created table inside the div. Now the problem i am facing is that these results are pushing all my other elements of the main table down as this td becomes bigger.
Is there a way i could overlap this dynamic created table over the existing td of the main table or something else so it doesn't affect the elements in my main table.
Expand|Select|Wrap|Line Numbers
  1. <table>.... <tr> 
  2. <td><input type=text onkeyup=loadresults() />
  3.        <div id=searchresults>
  4. ////// Here i insert a dynamic table with the results
  5.       </div>
  6. </td>
  7. <tr>
  8.  
Any help would be greatly appreciated.
TIA
Sep 3 '07 #1
4 1247
pbmods
5,821 Expert 4TB
Heya, Tia.

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.
Sep 3 '07 #2
markrawlingson
346 Expert 100+
The best solution for these types of scripts is to set the div layer position:absolute; when you 'show' it. It will then "float" over top of the rest of the items on your page without shoving them down to make room to display the layer on the page.

I'd also recommend setting the width of the layer = to the same width as the input box, set the top position of the layer = the top position of your input box minus the input boxes height.. and the left position of the layer = to the left position of the input box.
Sep 3 '07 #3
The best solution for these types of scripts is to set the div layer position:absolute; when you 'show' it. It will then "float" over top of the rest of the items on your page without shoving them down to make room to display the layer on the page.

I'd also recommend setting the width of the layer = to the same width as the input box, set the top position of the layer = the top position of your input box minus the input boxes height.. and the left position of the layer = to the left position of the input box.

Thanks man, it works now. I learned a new thing called "float" tonight :)

Also i apologise pbmods for not reading the REPLY GUIDELINES. will do so in the future.

cheers!
Sep 3 '07 #4
markrawlingson
346 Expert 100+
No problem at all. If you have any other questions feel free to post them as well!
Sep 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Charles Law | last post by:
This is going to seem like a basic OO question, but it comes up and bites me every now and again. Suppose we have a multi-tiered protocol to implement, what is the logical, OO way to design the...
1
by: napsters | last post by:
Google uses some javascript for their Google Suggest service (http://www.google.com/webhp?complete=1&hl=en). When you type 'whatever', the script (http://www.google.com/ac.js, or, more readable,...
32
by: sandy | last post by:
I have a hobby website at: http://www.montana-riverboats.com which also resolves as: http://montana-riverboats.com ...without the www. One address has a Google page rank of three. The other...
15
by: puzzlecracker | last post by:
does anyone know how to implement this function efficiently?
16
by: Andrew Baker | last post by:
I am trying to write a function which provides my users with a file filter. The filter used to work just using the VB "Like" comparision, but I can't find the equivilant in C#. I looked at...
6
by: TulasiKumar | last post by:
hi all, i have one requirement in my project.The requirement is i want to fix some domain sites in TcpIp like proxy servers behaviour.When ever end user passing the inforamtion of that domain...
1
by: theburnetts | last post by:
I have a complex class heirarchy where all of my classes inherit from a single base class (BaseObject) and this BaseObject class inherits from XPBaseObject. XPBaseObject is a 3rd party base class...
1
by: pradev | last post by:
Hello Friends, I have been working on ASP.NET for the last 2 and half years. The bad part of my experience is I have been working alone on all of the projects and there was no peer around who...
27
by: jm | last post by:
I am having trouble understanding the purposes of an interface, even though the concept of interfaces is around me all the time (user interface, for example). I'm just not understanding software...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.