Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mouseclick has more actions

Status
Not open for further replies.

kaul1jos

Technical User
Jan 5, 2001
76
NL
Is it possible to program in javascript or plain html to use the following procedure...
onmouseclick: action load a new gif, wait a few seconds and load the next html-page in the same frame.

who can help me with this little problem?
 
If you know what you want your mouse onClick event to be on, I'll assume it's on this button I'm going to demonstrate with --

<input type=button name=doIt value=&quot;Do It&quot; onClick=&quot;startTheProcess();&quot;>

<script language=javascript>
function startTheProcess(){
//load the gif here
setTimeout('changeLocation();',3000);
}

function changeLocation(){
window.location='newPage.htm';
}
</script>

Sorry, I don't know the code to load up the gif image, but I'm sure someone else here can add to what I've posted. The setTimout will wait 3000 milliseconds and then fire the changeLocation() function, which will wisk you away to the 'newPage.htm' location...

you can change that 3000 to whatever you want...

good luck! :)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top