| Author |
Topic Search Topic Options
|
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Topic: No blink refresh Posted: 09 November 2003 at 7:49am |
|
Im looking to refresh data in an IFrame or textbox using javascript without it blinking constantly! Does anyone know how to achieve this?
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 November 2003 at 7:57am |
Its not possible! I tried everything. I was making a chat app, in the end i just used flash (well swish max  ).
|
 |
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Posted: 09 November 2003 at 8:04am |
Someone told me you could get an iframe and a textbox, make the iframe hidden, keep refreshing the iframe, then use JS to retrieve the data from the iframe into the textbox.
Anyone know how to do this?
|
 |
Flamewave
Senior Member
Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 November 2003 at 11:08am |
|
You could probally do the same thing using a html div and the innerHTML javascript command, and it would probally look a lot nicer then using textbox too.
|
|
- Flamewave
They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
|
 |
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 November 2003 at 12:38pm |
|
Anyone got any code examples of how to achieve this
|
 |
Flamewave
Senior Member
Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 November 2003 at 12:51pm |
<iframe id="refreshframe"></iframe> <div id="newcontent"></div> <script> flip_div('refreshframe', 'newcontent'); function flip_div(sorce,target) { //code to refresh the iframe goes here
//set the innerhtml of the div to the iframe contents document.getElementById(target).innerHTML = document.getElementById(sorce).innerHTML; } </script>
Something along those lines should do the trick. You may need to tweak it a bit to get it to work with iframes, as I've only used this to go between divs, then you'll just have to set a javascript timer to execute the function every so often.
|
|
- Flamewave
They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
|
 |
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 November 2003 at 2:52pm |
|
Thank you very much, will be trying it out later. I need to learn javascript!
|
 |
pmormr
Senior Member
Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
|
Post Options
Thanks(0)
Quote Reply
Posted: 10 November 2003 at 4:01pm |
|
me 2
|
|
|
 |