Solved

No click sound refresh

Posted on 2003-10-22
26
552 Views
Last Modified: 2012-06-22
Hi all, I need help here.

Is there a page refresh script that will not cause a "click" sound every time it refresh?
Please kindly help me thank. I am using IE6.0

0
Comment
Question by:lynn80
  • 15
  • 7
  • 3
  • +1
26 Comments
 
LVL 1

Expert Comment

by:Sligowaths
ID: 9598503
try this

<script>

function changePage(newURL) {
location.replace(newURL);
}

<script>


<a href="javascript:changePage('http://www.example.com');">example1</a>

<a href="#" onClick="javascript:changePage('http://www.example.com');">example2</a>

<a href="javascript:void(0);" onClick="javascript:changePage('http://www.example.com');">example3</a>


Tiago Serafim
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 9598582
Actually only way is to run a .reg file
Not something you users would want I bet

An alternative is to use an xml dataisland, get the data from there and use innerHTML to update
0
 

Author Comment

by:lynn80
ID: 9598684
Sligowaths,

sorry I forgot to mention my page is auto refresh every 6 seconds, how to use your code for this?


<script>

function changePage(newURL) {
location.replace(newURL);
}

<script>


<a href="javascript:changePage('http://www.example.com');">example1</a>

<a href="#" onClick="javascript:changePage('http://www.example.com');">example2</a>

<a href="javascript:void(0);" onClick="javascript:changePage('http://www.example.com');">example3</a>
0
 

Author Comment

by:lynn80
ID: 9598691
mplungjan,

how? have any examples?

thanks
0
 

Author Comment

by:lynn80
ID: 9599358
hello? Help please
0
 

Author Comment

by:lynn80
ID: 9600324
Hello?? is it not possible to do it or can't help at all???
0
 

Expert Comment

by:frankenstrat
ID: 9600488
Due to security reasons, IE will now allow javascript to access the click sound in order to control it.
0
 

Author Comment

by:lynn80
ID: 9600516
how????
0
 

Expert Comment

by:frankenstrat
ID: 9600632
The click sound is a system setting and allowing access to it through a web scripting language would open up a whole new set of problems for Microsoft. The click sound is just something you will have to live with and if you think it will annoy your visitors to hear the click sound, kindly suggest that they turn down their speakers.

Cheers
Ken
0
 

Author Comment

by:lynn80
ID: 9600759
Hi Ken,

But I saw some site do it without the click sound.. I wonder how script language they use?
0
 

Expert Comment

by:frankenstrat
ID: 9600880
If you can tell the address of the site, then I will take a look for you
0
 

Author Comment

by:lynn80
ID: 9601012
http://www.meetic.com

a dating site, free to join. When you go in notice the left panel of there menu where they stats how many users online.. every 6 second the iframe will refresh quietly.. Please take a look thanks.
0
 

Expert Comment

by:frankenstrat
ID: 9601306
try

function reload() {
   setTimeout("location.href='mypage.php'",6000);
   }

or more simply

onload="setTimeout("location.href='mypage.php'",6000);"

in the body tag
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:lynn80
ID: 9601396
I tried:

<script>
function reload() {
   setTimeout("location.href='mypage.php'",6000);
   }
</script>

It doesn't refresh.

I tried this got syntax error.
<body onload="setTimeout("location.href=mypage.php,6000);">
0
 

Expert Comment

by:frankenstrat
ID: 9601428
You forgot a couple of quotes, try this;
<body onload="setTimeout("location.href='mypage.php'",6000);">
0
 

Author Comment

by:lynn80
ID: 9601457

I am still getting syntax error on this line

<body onload="setTimeout("location.href='mypage.php'",6000);">

is it because of the 2 " " ?

0
 

Expert Comment

by:frankenstrat
ID: 9601491
Yup
<body onload=setTimeout("location.href='mypage.php'",6000)>
0
 

Author Comment

by:lynn80
ID: 9601520
hmm.. no luck man.. it doesn't reload sliently, have you visited the site? What language are they using?
0
 

Expert Comment

by:frankenstrat
ID: 9601888
They are using javascript.
0
 

Author Comment

by:lynn80
ID: 9602089
oh.. so can you help with javascript?
0
 

Author Comment

by:lynn80
ID: 9604555
thats what I am here for.............
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 9604686
stmh = setTimeout('window.location.reload()',90000)
in an iframe
0
 

Author Comment

by:lynn80
ID: 9604829
Hi,

put this code in the function?

stmh = setTimeout('window.location.reload()',90000)


sorry, I don't know much about java I am a php programmer..
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 135 total points
ID: 9605916
They have an iframe and in that iframe they have the code
<script>
stmh = setTimeout('window.location.reload()',90000)
</script>

that will reload the page every 9 seconds using javaSCRIPT. Java is another animal all together
0
 

Author Comment

by:lynn80
ID: 9606488
Hey thank you, this works!!

Thanks alot~~!
0
 

Author Comment

by:lynn80
ID: 9606588
This work on non inframe also!! Totally slient refresh!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now