/    Sign up×
Community /Pin to ProfileBookmark

java script pop window image rollover problem

hi i have this java scripting in my page and i would like to have the image that is loaded into the window have another roll over image i cannot figure out where to put the code letalone what to write!!!!!!

Please help ? ? ? ?

<SCRIPT LANGUAGE=”JavaScript”>
<!– hide this script from old browsers

// This script opens a new browser window and writes
// HTML to display an image with a title and caption

function show_phototallsold( pFileName, pTitle, pCaption, pCaption2) {

// specify window parameters
photoWin = window.open( “”, “painting”, “width=600,height=950,status,screenX=10,screenY=10,left=10,top=10”);

// wrote content to window
photoWin.document.write(‘<html><head><title>’ + pTitle + ‘</title></head>’);
photoWin.document.write(‘<BODY BGCOLOR=#000000 TEXT=#FFFFCC LINK=#33CCFF VLINK=#FF6666>’);
photoWin.document.write(‘<center>’);
photoWin.document.write(‘<font size=+3 face=”arial,helvetica”><b>’ + pCaption + ‘</b></font><br>’);
photoWin.document.write(‘<img src=”‘ + pFileName + ‘”><br>’);
photoWin.document.write(‘<font size=+1 face=”arial,helvetica”><b>’ + pCaption2 + ‘</b></font><br>’);
photoWin.document.write(‘<font face=”arial,helvetica”>’);
photoWin.document.write( ‘”‘ + pTitle + ‘” painting &copy; 2005 Brad Williams<br>’);
photoWin.document.write(‘Enquiries, <a href=”mailto:[email protected]“>[email protected]</a>’);
photoWin.document.write(‘<p></font></body></html>’);
photoWin.document.close();

// If we are on NetScape, we can bring the window to the front
if (navigator.appName.substring(0,8) == “Netscape”) photoWin.focus();

}

// done hiding from old browsers –>
</SCRIPT>

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Mr_JJul 09.2005 — Can you be more specific when you say

have another roll over image[/QUOTE]

Do you mean when the mouse is over the image in the popup it changes to another and onmouseout changes back?

If it simply changes once when the mouse is over the image change this line

photoWin.document.write('<img src="' + pFileName + '"><br>');

to

photoWin.document.write('<img src="' + pFileName + '" onmouseover="this.src='pic2.jpg'"><br>');
Copy linkTweet thisAlerts:
@coddyauthorJul 10.2005 — thats exactly what i wanted if i wanted to make

photoWin.document.write('<img src="' + pFileName + '" onmouseover="this.src='pic2.jpg'"><br>');

to this

photoWin.document.write('<img src="' + pFileName + '" onmouseover="this.src=' + pFileName2 + '"><br>');

is that right

which would make my code to activate

the script

<a href=" + pFileName + "

onClick="show_photo(' + pFileName + ', ' + pFileName2 + ', ' + pTitle + ', ' + pCaption +', ' + pCaption2 + '); return false"><img src="blah/blah/blah.jpg" width="370" height="120" border="0"></a>
Copy linkTweet thisAlerts:
@Mr_JJul 10.2005 — Might be best to include the escaped single quotes for the file name

photoWin.document.write('<img src="' + pFileName + '" onmouseover="this.src=[B][COLOR=RED]'[/COLOR][/B]' + pFileName2 + '[B][COLOR=red]'[/COLOR][/B]"><br>');
×

Success!

Help @coddy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...