Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (25 May 2013 - 09:50 PM) Hi, Agyat What's New?
@  yordan : (25 May 2013 - 07:59 PM) Yay, Shoutbox Is Back! Yahooo!
@  agyat : (24 May 2013 - 05:15 PM) O Dear, Where Are You? Without Your Words This Sb Is ..
@  agyat : (23 May 2013 - 01:23 AM) Wow! Mr. Sb Back Home.
@  OpaQue : (23 May 2013 - 12:44 AM) Ting
@  OpaQue : (24 April 2013 - 02:44 PM) I guess, Time to run Mycent script.
@  OpaQue : (24 April 2013 - 02:43 PM) wow.. not much spam. except habatt posting lot of links.. :P
@  yordan : (23 April 2013 - 01:04 PM) You're welcome, agyat. Nice to have been helpful. Second lesson: try full words, "you" instead of "EW".
@  agyat : (23 April 2013 - 05:03 AM) @YORDAN: tHANK EW FOR YOUR FIRST LESSON.   :D
@  yordan : (22 April 2013 - 09:43 PM) @agyat : "why don't you help me", or "please help me", or "please teach us"
@  yordan : (22 April 2013 - 09:42 PM) welcome back, velma
@  velma : (22 April 2013 - 07:51 AM) **yawns** Good to be back, wonder what is going on here :)
@  agyat : (22 April 2013 - 03:50 AM) Oh! so, why don't help me learn english..
@  yordan : (21 April 2013 - 08:38 PM) The goal mentioned by shiu : "learning english, learning computer"
@  agyat : (21 April 2013 - 06:31 PM) WHAT GOAL?
@  yordan : (20 April 2013 - 10:39 AM) yes, that's our goal. simultaneouly learning English and teaching/learning computer using.
@  shiyu : (20 April 2013 - 07:30 AM) learning english,learning computer
@  yordan : (19 April 2013 - 01:11 PM) Oh, I see, it's just a trick in order to force people looking at your texte. Somehow smart, maybe.
@  agyat : (19 April 2013 - 02:54 AM) And of course I know it is not SEO friendly.
@  agyat : (19 April 2013 - 02:52 AM) There may be two possible answers for that ....


1) Shout was posted using mobile keypad.

2) To force people read content carefully and/or with more concentration.

Replying to Dynamically Change The Background Image On Mouse Effects!


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Posted 17 July 2010 - 11:14 PM

Background changes in fronpage view but does not in browser view or even after publishingDynamically Change The Background Image On Mouse Effects!

This was just what I needed to change background image and seemed to be  easy .

I am placing 5 links on a dwt template page and appling template to a number of pages on site.

Everything works fine until I try to view in a browser. Tried both IE and firefox. I each case a messsage come up that it can not find page. The browser is looking for a file ending in .Link

I am not sure if a link page is supposed to have been generated. There is no link page in web folder

What have I missed?


Posted 14 January 2010 - 02:47 PM

RE: change image on mouseover

 assign id to image [<img id="img" src="source.Jpg"/>]

make your alternate image with the <img id="img2" style="display: none; " src="source2.Jpg"/>

onmouseover="getElementById('img').Style.Display='none'; getElementById(img2).Style.Display='inline'; "

 

Hope that this helps, even if the post is a little older...

-reply by Johnathan

Posted 04 January 2010 - 05:46 PM

Thank youDynamically Change The Background Image On Mouse Effects!

Hello, this  site rocks.

 Thanks very much for your sharing the code, JS isnt easy and its appreciated your help!

-reply by Ramses

 


Posted 19 August 2009 - 01:52 PM

Change Image OnclickDynamically Change The Background Image On Mouse Effects!

I Have 5 Images placed in one line and I have Onmouseover, onmouseout,onclick event on each image, a have href for each image

I want to change images on Onmouseover, onmouseout,onclick events

 , onmouseout,Onmouseover event works fine but

My problem is  in my  onclick event image changes once I click image it changes but as that page is loaded it again switch back to original image

How can I overcome it

-question by Rahul Hanchate

Posted 27 June 2008 - 08:31 AM

Wouldn
Dynamically Change The Background Image On Mouse Effects!

I'm useless at javascript, but wouldn't it be something like

OnClick="this.Style.Background='red.Gif'"

But after trying that, it didn't work :P anyone have a quick solution to changing a style element directly through an 'on' command without having to use your own functions?

I'm currently trying to make a 'pushed-look' to my CSS buttons using onClick.

Posted 13 December 2007 - 09:41 PM

If it could change the background image of a DIV, I can see a use for it. Anyone have any code for that?

-Lance

Jack Cheng

Posted 21 March 2006 - 10:05 PM

It is nice, but is there any other applicable uses to this other than to irritate your users with crazy, inconsistent, and confusing backgrounds?

shiv

Posted 21 March 2006 - 12:02 AM

stun ur visitor with a new bg image on every mouse click of his!

easy code to dynamically change the background image.

[note=szupie]Copied from http://www.scriptwor...it.php?id=30296[/note]

control the background image using the links on your site. control the color using onMouseOver, onMouseOut, onClick, and a combination of all of them.

place the code below between the and tags within the HTML page where you want the link to appear. edit the link text provided to point at the page you would like to open.



Option 1:
use this to change the background color when user places mouse over the link.


<a href="link.htm" onMouseOver="document.body.background='red.gif'">Link Text</a>


Option 2:
use this to change the background image when user removes mouse from over the link (onMouseOut).

<a href="link.htm" onMouseOut="document.body.background='green.gif'">Link Text</a>


Option 3:
use this to change the background image when user clicks the link (onClick).

<a href="link.htm" onClick="document.body.background='blue.gif'">Link Text</a>



Option 4:
use this to change the background image twice, once when the user places the mouse over the link then again when the user takes the mouse off the link (onMouseOver and onMouseOut).

<a href="link.htm" onMouseOver="document.body.background='red.gif'" onMouseOut="document.body.background='green.gif'">Link Text</a>


Option 5:
use this to change the background image three times, once when the user places the mouse over the link, again when the user takes the mouse off the link, and again when the user clicks on the link (onMouseOver, onMouseOut, and onClick).


<a href="link.htm" onMouseOver="document.body.background='red.gif'" onMouseOut="document.body.background='green.gif'" onClick="document.body.background='blue.gif'">Link Text</a>



njoy!

shiv

Review the complete topic (launches new window)