Hi
i have some image in slide show on load events. i wants to expand image on mouseover from slide show.
thanks
22 3146 gits 5,390
Expert Mod 4TB
on mouseover just set the size and with of the currently hovered image ... post the code you have done so far.
kind regards
on mouseover just set the size and with of the currently hovered image ... post the code you have done so far.
kind regards
Hello gits
code of fade image is work but i wants to on mouse over the image is expanded -
-
<script language="javascript" type="text/javascript">
-
<!-- Begin
-
// Set slideShowSpeed (milliseconds)
-
var slideShowSpeed = 1500;
-
// Duration of crossfade (seconds)
-
var crossFadeDuration = 3;
-
-
var Pic = new Array();
-
// to add more images, just continue
-
// the pattern, adding to the array below
-
-
Pic[0] = 'images/photo1.jpg'
-
Pic[1] = 'images/photo2.jpg'
-
Pic[2] = 'images/photo3.jpg'
-
Pic[3] = 'images/photo4.jpg'
-
Pic[4] = 'images/photo5.jpg'
-
Pic[5] = 'images/photo6.jpg'
-
Pic[6] = 'images/photo7.jpg'
-
Pic[7] = 'images/photo9.jpg'
-
Pic[8] = 'images/photo10.jpg'
-
Pic[9] = 'images/photo11.jpg'
-
-
// do not edit anything below this line
-
var t;
-
var j = 0;
-
var p = Pic.length;
-
var preLoad = new Array();
-
for (i = 0; i < p; i++) {
-
preLoad[i] = new Image();
-
preLoad[i].src = Pic[i];
-
}
-
function runSlideShow() {
-
if (document.all) {
-
document.images.SlideShow.style.filter="blendTrans(duration=2)";
-
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
-
document.images.SlideShow.filters.blendTrans.Apply();
-
}
-
document.images.SlideShow.src = preLoad[j].src;
-
if (document.all) {
-
document.images.SlideShow.filters.blendTrans.Play();
-
}
-
j = j + 1;
-
if (j > (p - 1)) j = 0;
-
t = setTimeout('runSlideShow()', slideShowSpeed);
-
}
-
window.onload=runSlideShow;
-
// End -->
-
-
-
</script>
-
-
-
-
<div style="position:absolute; top:0; left:0 ">
-
<img src="images/photo9.jpg" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Barauni Refinry">
-
-
</div>
-
thanks
gits 5,390
Expert Mod 4TB
let me give you an example:
[HTML]<html>
<script type="text/javascript">
function zoom_in(ele) {
ele.style.width = '400px';
ele.style.height = '400px';
}
</script>
<body>
<img src="image.gif" onmouseover="zoom_in(this);">
</body>
</html>
[/HTML]
kind regards
Hello gits
Thanks it works fine
i am usinng some frame so i wants to open it in popupwindow on mouseover and onmouse out close popup becouse size of frame where image fadein is very short its maximum width is 170px .
thanks
gits 5,390
Expert Mod 4TB
do you have a solution, or are you asking for one? in that case use window.open() in the shown function and append an image element with a src to the greater image to it ... on mouseover just use window_ref.close() ...
the better solution would be to use an inline div or google for lightbox in case you wnat to have some out of the box fancy stuff ...
kind regards
i have solution of window.open() on mouseover and but i cant understands how can image show thats fade in -
-
new_window.document.open();
-
-
// Text of the new document
-
// Replace your " with ' or \" or your document.write statements will fail
-
new_window.document.write("<html><title>JavaScript New Window</title>");
-
new_window.document.write("<body bgcolor=\"#FFFFFF\">");
-
new_window.document.write("This is a new html document created by JavaScript ");
-
new_window.document.write("statements contained in the previous document.");
-
new_window.document.write("</body></html>");
-
-
// close the document
-
new_window.document.close();
-
}
-
hello
I think i couldn't expalin clearly whats my need.
lets try to explain
i have four frame top,left,cetner and right
some images are display at right frame in fader
my needs onmouseover open a popup window and expand the image
i have code for popupwindow but havn't idea how to display image thats in fader
thanks
gits 5,390
Expert Mod 4TB
i'm not really sure that i get it ... are you looking for something like this:
in your image's onmouseover use: - onmouseover="zoom_window(this);"
-
i assume your function now uses the code you posted above and now gets the ref to the currently clicked image passed to it. so you could use something like the following now: - function zoom_window(ref) {
-
// some of your code
-
new_window.document.write('<img src="' + ref.src + '"/>');
-
// more of your code
-
}
kind regards
If I can jump into this, may I know if the OP wants something what happens in yahoo mail (the new one) when you click on an attachment image?
Hi gits
here is my code which works thats i wnats to do - <script language="javascript">
-
//Function to open PopupWindow and Close PopupWindow
-
function new_window(){
-
new_window = open('fader.asp','new','width=500,height=450,left=10,top=10');
-
}
-
-
function close_window()
-
{
-
new_window.close();
-
}
-
-
</script>
-
-
<div style="position:absolute; top:0; left:0 ">
-
-
<!--
-
Link for opne popup wondow
-
<a onmouseover="window.open('fader.asp','Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=475px,height=420px,top=30,left=20')" >
-
-->
-
-
<img src="images/1.jpg" id="new" onMouseOver="new_window()" onMouseOut="close_window()" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Click to Magnifying Image">
-
<!--</a>-->
-
</div>
But when first time mouse over on image popup window is opend and onmouseout closed but not more without page refresh means it works only one time when mouse over on image after first time error is at line 21 where <img src.............>
line:-21
char:-1
error:-the callee[server[not server application]]is not available and disappeared; all connection are invalid. the call did not execute.
I am creating link onmouseover image window is open but it not close on mouseout
I try with these two to open new window onmouseover and close on mouseout
thanks
Hi this code is working for me -
<script language="javascript">
-
//Function to open PopupWindow and Close PopupWindow
-
-
function new_window() {
-
my_window = window.open('fader.asp','new','width=500,height=450,left=10,top=10');
-
}
-
-
function close_window() {
-
my_window.close();
-
}
-
-
</script>
-
Happy codding
Thanks
Hi
I wants use open image in new winow mouseover on which but can't success - <scripts laguage="javascrpts">
-
function new_window(ImageURL) {
-
my_window = window.open(ImageURL, 'new', 'width=500,height=450,left=10,top=10');
-
}
-
function close_window() {
-
my_window.close();
-
}
-
</script>
-
<div id="new" style="position:absolute; top:0; left:0 ">
-
<img src="images/1.jpg" onMouseOver="new_window('images1/1.jpg')" onMouseOut="close_window()" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Magnifying Image">
-
-
</div>
gits 5,390
Expert Mod 4TB
you have some errors in your code, fix the type in javascript-tag, the script-tag itself etc. write the event-handlers all lowerCase -> for example onmouseover ...
[HTML]<script type="text/javascript">
function new_window(ImageURL) {
my_window = window.open(ImageURL, 'new', 'width=500,height=450,left=100,top=100');
}
</script>
<div id="new" style="position:absolute; top:0; left:0 "> <img src="images/1.jpg" onmouseover="new_window('images1/1.jpg')" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170px" height="170px" title="Magnifying Image">
</div>
[/HTML]
kind regards
Hi
I wants use open image in new winow mouseover on which but can't success - <scripts laguage="javascrpts">
-
function new_window(ImageURL) {
-
my_window = window.open(ImageURL, 'new', 'width=500,height=450,left=10,top=10');
-
}
-
function close_window() {
-
my_window.close();
-
}
-
</script>
-
<div id="new" style="position:absolute; top:0; left:0 ">
-
<img src="images/1.jpg" onMouseOver="new_window('images1/1.jpg')" onMouseOut="close_window()" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Magnifying Image">
-
-
</div>
it open only one image images/1.jpg but my needs to open thats image mouse overon which from slide
thanks
Declare my_window as a global variable in the start of the JavaScript.
When your new_window function is done, the local variable my_window is getting deleted. So the closing function doesn't work.
Remove language attribute from script tag, use type attribute instead ( type="text/javascript").
Use onmouseover instead of onMouseOver. Its not VB script.
And follow as gits suggested.
And I asked you here about the problem but you didn't reply, so there was no need of PM.
Regards,
Harpreet
gits 5,390
Expert Mod 4TB
hi idsanjeev,
don't PM experts, mods or admins regarding your problems unless your are told to do so! consider this a friendly warning by not considering this you risk a formal warning and at least this could result in a temporary ban ... read this guideline ...
kind regards
MOD
ok, i remember it
thanks
But you didn't tell if that thing worked for you or not.
i cant understand thats you wnats to tell hsriat
butt sorry if any guideline had been broken by me
my internet connection is failled so after connecting i am giving
i think i am not able to clear my question
actually the working for new window
but i wants instead of fader.asp open image from slide show mean open window with image mouse over on thats - <img src="images/1.jpg" onMouseOver="new_window()" onMouseOut="close_window()" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Magnifying Image">
thanks
Ok, read the following stuff very carefully now. - The first argument of window.open should be the link (url) to the page which you want to open. Page, in your case is your image. So provide complete link of the image in that attribute.
- In your function new_window(), you have an argument. According to your function, this needs to be the same argument which you have to give to the window.open function. So again, it should be the complete valid link to the image you want to open.
- When you have a function with local variables in it, you can't access those local variables outside that function. If you need to do that, you have to declare them as global variables.
So modify these things in your page:
First: - onmouseover="new_window(this.src)
this.src will refer to the link of the image.
Second: - <scripts type="text/javascript">
-
var my_window;
This will declare my_window as global variable.
Don't tell me to explain this in Hindi now.
i try to do like link
but slide show starts onload and picture expand onMouseOver
thanks
You followed nothing what was said by gits and then me.
What do you want to be improved in this page?
Note: Doctype contains a sign of exclamation ( ! ) in the starting. <!doctype ...... > Post your reply Sign in to post your reply or Sign up for a free account.
Similar topics
4 posts
views
Thread by Tim |
last post: by
|
2 posts
views
Thread by Mekon |
last post: by
|
7 posts
views
Thread by peter |
last post: by
|
reply
views
Thread by aarondouglas28 |
last post: by
|
reply
views
Thread by |
last post: by
|
1 post
views
Thread by www.web20developers.com |
last post: by
| | | | | | | | | | | | |