473,503 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refresh

Hey everyone,

I was just wondering is the refresh process in browsers able to be
scripted upon.

Feb 2 '06 #1
8 1428
¿qué?
Feb 2 '06 #2
ok smart ass! I need to work with the refresh functionality of
browsers. Can it be done?

Feb 2 '06 #3
DoomedLung wrote on 02 feb 2006 in comp.lang.javascript:
ok smart ass! I need to work with the refresh functionality of
browsers. Can it be done?


Please explain what you are talking about.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 2 '06 #4
Hey... what I want to know is can you stop a page from reload?

Feb 2 '06 #5
DoomedLung wrote on 02 feb 2006 in comp.lang.javascript:
Hey... what I want to know is can you stop a page from reload?


Please quote what you are replying to. This is usenet not email.
If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers. <http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 2 '06 #6

Evertjan. wrote:
DoomedLung wrote on 02 feb 2006 in comp.lang.javascript:
Hey... what I want to know is can you stop a page from reload?


Please quote what you are replying to. This is usenet not email.
If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers. <http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Hey, sorry for the inconvenience..I'm new to usenet.

Ok at the moment I'm in the middle of writting a script that rewrites a
html page from an event handler that supplies the image url and title
for the page. Once the user fires the event in Firefox the
functionality works fine until the user presses the Reload button then
the dynamic image disappears!

Now I gather as much that it's not displaying the image because the
image doesn't actually exsist... so I'm kinda stuck on dealing with the
reload issue in FireFox. here is the code:
function largeImg(imgSrc, title){
var w = window;
var d = w.document;
d.write('<html><head><title>'+title+'</title>');
d.write('<sc'+'ript>');
d.write('function doTitle(){document.title="'+title+'";}');
d.write('function centerIt(){');
d.write('theDiv = document.getElementById("theImage");');
d.write('centerHeight = document.body.clientHeight / 2 -
document.getElementById("imgName").height / 2;');
d.write('theDiv.style.top = centerHeight;}');
d.write('</sc'+'ript></head>');
d.write('<body onload="doTitle(); centerIt();" onResize="centerIt();"
bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0"
marginwidth="0">');
d.write('<center>');
d.write('<div id="theImage" style="position:relative;
text-align:center">');
d.write('<img id="imgName" name="imgName" src="'+imgSrc+'"
alt="'+title+'" title="'+title+'" border="0">');
d.write('<br><br>');
d.write('<div style="text-align:center; font-family:Verdana, Arial,
Helvetica, sans-serif; font-size:10px; color:#000000";>');
d.write('<a href="javascript:history.back()" title="Go back to
'+title+'">Go back</a> | <a href="#" title="Take the Playboy UK Free
Tour">Take the Playboy UK Free Tour</a><div></div></center>');
d.write('</body></html>');
d.close();
}

<a href="enable.html" onClick="largeImg('imgs/tgpA/large/large1.jpg',
'Document Ten'); return false;">
<img src="imgs/tgpA/thumbs/thumb1.jpg" alt="..." title="..."
width="90" height="120" border="0"></a>

Any guidance would be much appreciated

Feb 2 '06 #7
DoomedLung wrote on 02 feb 2006 in comp.lang.javascript:

Hey, sorry for the inconvenience..I'm new to usenet.

Ok at the moment I'm in the middle of writting a script that rewrites
a html page from an event handler that supplies the image url and
title for the page. Once the user fires the event in Firefox the
functionality works fine until the user presses the Reload button then
the dynamic image disappears!

Now I gather as much that it's not displaying the image because the
image doesn't actually exsist... so I'm kinda stuck on dealing with
the reload issue in FireFox. here is the code:
function largeImg(imgSrc, title){
var w = window;
var d = w.document;
d.write('<html><head><title>'+title+'</title>');


Why would you want to write a new clientside dynamic page?
And why not the onclick in the <img> itself?
And why not use css all over?

Much better, in my view, is to make use of the DOM,
redesign the page
and fill an existing img with a new picture, like:

======================
<img id='pic' style='display:none;'>

<div id='tit'></div>

<img src="imgs/tgpA/thumbs/thumb1.jpg" onClick=
"largeImg('imgs/tgpA/large/large1.jpg','Document Ten')"
style ='width:90px;height:120px'
id='thumb'>
...<script...
function largeImg(imgSrc, title){
var pic = document.getElementById('pic')
var thumb = document.getElementById('thumb')
var tit = document.getElementById('tit')
pic.src = imgSrc
window.title = tit.innerHTML = title
document.body.style.backgroundColor = 'navy'
document.body.style.color = 'yellow'
pic.style.display = 'block'
thumb.style.display = 'none' // if you wish
}
======================

not tested

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 2 '06 #8

Evertjan. wrote:
DoomedLung wrote on 02 feb 2006 in comp.lang.javascript:

Hey, sorry for the inconvenience..I'm new to usenet.

Ok at the moment I'm in the middle of writting a script that rewrites
a html page from an event handler that supplies the image url and
title for the page. Once the user fires the event in Firefox the
functionality works fine until the user presses the Reload button then
the dynamic image disappears!

Now I gather as much that it's not displaying the image because the
image doesn't actually exsist... so I'm kinda stuck on dealing with
the reload issue in FireFox. here is the code:
function largeImg(imgSrc, title){
var w = window;
var d = w.document;
d.write('<html><head><title>'+title+'</title>');


Why would you want to write a new clientside dynamic page?
And why not the onclick in the <img> itself?
And why not use css all over?

Much better, in my view, is to make use of the DOM,
redesign the page
and fill an existing img with a new picture, like:

======================
<img id='pic' style='display:none;'>

<div id='tit'></div>

<img src="imgs/tgpA/thumbs/thumb1.jpg" onClick=
"largeImg('imgs/tgpA/large/large1.jpg','Document Ten')"
style ='width:90px;height:120px'
id='thumb'>
..<script...
function largeImg(imgSrc, title){
var pic = document.getElementById('pic')
var thumb = document.getElementById('thumb')
var tit = document.getElementById('tit')
pic.src = imgSrc
window.title = tit.innerHTML = title
document.body.style.backgroundColor = 'navy'
document.body.style.color = 'yellow'
pic.style.display = 'block'
thumb.style.display = 'none' // if you wish
}
======================

not tested

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Hey dude, thanks for the advice and your speedy response...

Now that you mentioned the DOM I don't why I didn't think of it in the
first place...

Cheers :o]

Feb 2 '06 #9

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

Similar topics

3
12886
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
4
8225
by: Yogi_Bear_79 | last post by:
Self Taught here so please bear with me. I have the labelRestrictSites as private on the MainForm.cs. I then access the labelRestrictSites.Text thru the public string LabelRestrictSites from...
1
10834
by: Marco Maroni | last post by:
How to force image refresh on client browser ? Is ti possible to force the refresh of the same image (tha was changed server-side) to the client, without user press Contrl+F5 in IE ? - Marco
9
7705
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
0
1667
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
7
22674
by: Brian | last post by:
hello, I am looking for a way to auto refresh a web page that I created, but also let the user choose to stop the auto refresh. I can not figure out how to stop the auto refresh. Any help would...
12
6001
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
10
2712
by: Bill Nguyen | last post by:
I would like to be able to get an active browser window to refresh the URL (reload) every 5 minutes. Is it possible in VB.NET? Thanks Bill
0
1762
by: chetu | last post by:
I have two pivot tables, but when my macro refreshes the pivot tables it refreshes all, but I want it to pick say for example; Say range "B8" of pivot table 1 is 60, I want the range "x2" of pivot...
4
2533
by: Simon | last post by:
Dear reader, If I change the content of a field in an event procedure and in the same procedure I do a refresh, the refresh has no effect. The code in the event is as follows:
0
7064
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...
0
7261
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,...
1
6974
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...
0
7445
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...
0
5559
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,...
1
4991
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...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.