Like on this page: http://finance.google.com/finance, once you enter in a search query, it will have a little DHTML box that appears with some info, how can I duplicate this?
TIA!
Like on this page: http://finance.google.com/finance, once you enter in a search query, it will have a little DHTML box that appears with some info, how can I duplicate this?
TIA!
You could use an Iframe:
Code:<a href="http://www.mamma.com/" target="win">Open</a> <br><iframe name="win"></iframe>
- Mike
Any ideas on how I can get it to appear like on another layer. Like a popup box.Originally Posted by mburt
If you are talking about the auto suggest then that's AJAX not DHTML, Simple DHTML cannot send data back and forth the server(except using the hidden iframe technique). Try reading this: http://www.dynamicajax.com/fr/AJAX_S...1_290_312.html
Try this:
Code:<html> <head> <script> //er... this is a combination of Twey and jscheuer1's script function getFile(filename) { oxmlhttp = null; try { oxmlhttp = new XMLHttpRequest(); oxmlhttp.overrideMimeType("text/xml"); } catch(e) { try { oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { return null; } } if(!oxmlhttp) return null; try { oxmlhttp.open("GET",filename,false); oxmlhttp.send(null); } catch(e) { return null; } return oxmlhttp.responseText; } function getData(file){ return getFile(file) } </script> </head> <body> <div style="border:1px solid black;width:200px;height:200px;overflow:scroll"> <script>document.write(getData('http://www.mamma.com'))</script> </div> </body> </html>
- Mike
mburt: First thing: that will not work because:
1) it does not have a server side page to make the HTTP query,
2) document.write just overrides the whole page, use innerHTML instead,
3) to make queries over domains you need cross domain ajax(you cannot simply use http://mamma.com/ until it is your domain).
That code will not work believe me. And by the way that code is not correct. mburt: you better read this: Hello World in AJAX
document.write doesn't override the whole page within the <body>. it simply adds whatever is necessary. I will take into account what you have said though.document.write just overrides the whole page, use innerHTML instead
- Mike
That link I included could be useful for you.![]()
Okay, thanks.![]()
- Mike
Thanks for all of the feedback!
I already have my AJAX framework in place, and its sending the data back and forth, however, I was unable to get the box or window to appear and "float" over my page, like the Google page had shown.
Bookmarks