|
RajinderKamboj wrote: I can not change existing modules
If you can't make any changes then how are you going to do anything?
The first thing would be to redesign and not use popups. Otherwise you'll need to keep track of windows that are opened and close them during log out or on the close event of the main window
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark,
Thanks for reply. I mean of not change existing modules means I can not change each and every program which is opening the pop-up. I can change some of main programs. Can you please give me soluation for this?
Thanks a lot once again.
Thanks,
RK..
|
|
|
|
|
InderK wrote: Can you please give me soluation for this?
There is no solution if you don't have control over the apps that are opening the windows
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
IS there any way to find out the URL of all opened browsers? Please reply.
Thanks a lot.
RK..
|
|
|
|
|
If you are opening the popup using a common function, then only you can track the windows and close all the popup windows if user clicks on logout.
|
|
|
|
|
Hi,
Greetings everyone!
In my web application in a certain form, I want to show help text for some of the labels. The codes are as following:
<dt style="position:relative;">Pathway<a href="#"><img src="Images/1280835207_information-balloon.png" alt="" border="=0" id="show" onmouseover="showDiv('show');" onmouseout="hideDiv('show','wrapper');" /></a>
<div id="wrapper" style="width:275px; position:absolute; left:180px; " >
<div style="background:url(Images/div_head.png) no-repeat ; width:275px; height:60px;"></div>
<div style="background:#d8d7d3; width:263px; padding:4px; border-left:2px solid #f39716;border-right:2px solid #f39716">hjgfdhfhhh hhhhhhh hhhhhhhh ghhghgj jhjuvhfgf hjfkdg hkijdkf hgtjnglk.</div>
<div style="background:url(Images/div_bot.png) no-repeat; width:275px; height:19px;">
</div>
</div>
</dt>
And the javascript is as follows :
<script type="text/javascript">
function hideDiv(sh,wr)
{
document.getElementById(sh).style.display = '';
document.getElementById(wr).style.display = 'none';
}
function showDiv(wr)
{
document.getElementById(wr).style.display = '';
}
</script>
The problem is that this help text will be shown for some more labels in the same page. You can see that I'm maintaining the position of the help-text div by maintaining it's left position :
position:absolute; left:50px;
So when the label-text is larger then this position will not be applied. Is there a way to dynamically maintain the left position? I mean to say for larger or smaller label-text the position of the help-div will be adjusted automatically. I'm not sure whether I'm successful in making my need clear. Can anyone please help me?
Thanks in advance.
|
|
|
|
|
Pass image object refrence in showdiv fn
onmouseover="showDiv(this,'wrapper');"
And set the left position dynamically
function showDiv(obj,wr) {
document.getElementById(wr).style.left = obj.offsetLeft + 'px';
document.getElementById(wr).style.display = '';
}
|
|
|
|
|
Hi guys.
How can i check Wheather file exist in paricular location or not
i saw some example but its not working.
Your answer would be helpful for me... Thanks
Shafiq
|
|
|
|
|
TRY it out
function CheckFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
FileExist = fso.FileExists("TEST.txt");
if (FileExist == true){
alert("True")
}
else
{
alert("FAIL");
}
}
Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hey koolprasad
Thanks for reply. I already tried this it works only in case of IE (after change security setting in internet option Activexcontrol safe enable=enable which is not safe) and in another browser its not working...
what i am missing or what i need to do to work in all browser, without change in setting becouse client is not going to change in setting.
please share ur Idea
Thanks...
Shafiq
|
|
|
|
|
You can not access client file, unless you use Activex and give special permission. Just think what could happen if javascript are allowed to access client files.
|
|
|
|
|
Hello Friends
I created one msi file and running it in browser.Now when next time I run the browser I want to check that .msi file installed or not through java Script So only I can show up in Browser to install or not.
Thanks In Advance.
Regards
Yogesh
|
|
|
|
|
|
Hello Sir
Thank You nery much for ur reply.
Can U make it little more elaborate that how I can use property of .msi in java script try catch.
As I created that .msi using c#.
I will be very thankful to you.
Regards
Yogesh
|
|
|
|
|
the .msi would need to insall a scriptable "plug-in"
|
|
|
|
|
Hello Sir
I am new to c#.can you please provide me some link or some way where i can check how to install scriptable plugin with MSI?
Thanks & Regards
Yogesh
|
|
|
|
|
Hello devey
I will be very please to you If u provide me some idea how to install scriptable plugin with msi and how will i detect in java script and will that work for each browser?
I will be very thankful to you.
Thanks & Regards
Yogesh
|
|
|
|
|
http://www.codeproject.com/KB/aspnet/AspxProtocol.aspx
http://www.codeproject.com/KB/shell/MouseGestures.aspx
http://www.codeproject.com/KB/cross-platform/NPAPIBrowserPlugin.aspx
http://www.codeproject.com/KB/shell/dotnetbandobjects.aspx
|
|
|
|
|
Hello Sir
Thanks a lot for ur Information.I will look into this to make it workable.
Regards
Yogesh
|
|
|
|
|
I am making a school project based on jsp, i have a page in the solution which shows an animated Redirecting using following code
<br />
var ic = 0;<br />
var s0 = "Redirecting";<br />
var s1 = "Redirecting.";<br />
var s2 = "Redirecting..";<br />
var s3 = "Redirecting...";<br />
function redir() {<br />
ic++;<br />
switch(ic) {<br />
case 1:<br />
$('#text').html(s0);<br />
break;<br />
case 2:<br />
$('#text').html(s1);<br />
break;<br />
case 3:<br />
$('#text').html(s2);<br />
break;<br />
case 4:<br />
$('#text').html(s3);<br />
ic = 0;<br />
break;<br />
default:<br />
$('#text').html(s0);<br />
ic = 0;<br />
}<br />
setTimeout(redir(), 500);<br />
return 0;<br />
}<br />
Problem is the div does not refresh (shows only "Redirecting." without any change) periodically with the text change calls.
Thanks in advance
|
|
|
|
|
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
var ic = 0;
var s0 = "Redirecting";
var s1 = "Redirecting.";
var s2 = "Redirecting..";
var s3 = "Redirecting...";
function redir(ic) {
ic++;
switch(ic) {
case 1:
$('#text1').html(s0);
break;
case 2:
$('#text1').html(s1);
break;
case 3:
$('#text1').html(s2);
break;
case 4:
$('#text1').html(s3);
ic = 0;
break;
default:
$('#text1').html(s0);
}
if(ic > 0){setTimeout("redir("+ic+")", 500);}
return 0;
}
</script>
</head>
<body>
<div id="text1"></div>
<script>
redir(ic);
</script>
</body>
</html>
This works but you really should
change the code to use
use setInterval instead of setTimeout
modified on Saturday, July 31, 2010 2:01 PM
|
|
|
|
|
well thanks mate, cheers
but i have edited your code a bit to just meet that edge:
function redir(ic) {
ic++;
switch(ic) {
case 1:
$('#text1').text(s0);
break;
case 2:
$('#text1').text(s1);
break;
case 3:
$('#text1').text(s2);
break;
case 4:
$('#text1').text(s3);
ic = 0;
break;
default:
$('#text1').text(s0);
}
setInterval("redir("+ic+")", 500);
return 0;
}
</script>
|
|
|
|
|
Shantanu Gupta 1337 wrote: but i have edited your code a bit to just meet that edge:
You have edited your own code which I had modified.
If it were my code it would look like this ...
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
var redir = (function(){
this.ic = 0;
this.ar = arguments;
return function(){
if(++ic == ar.length){ic = 1;};
$('#'+ar[0]).html(ar[ic])};})
("text1","Redirecting","Redirecting.","Redirecting..","Redirecting...")
</script>
</head>
<body>
<div id="text1"></div>
</body>
<script>
setInterval(redir,500);
</script>
</html>
modified on Sunday, August 1, 2010 4:40 PM
|
|
|
|
|
I am trying to, on my homepage show just a sample of what is on my website using a certian number of images. The code I have already is (found code online):
Code in header:
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http:
<!-- Begin
var theImages = new Array()
theImages[0] = 'Images/Nepticulidae/Stigmella_Aurella/Stigmella_aurella_Adult1.jpg'
theImages[1] = 'Images/Lasiocampidae/Drinker/Drinker_Moth_Adult_Male1.jpg'
theImages[2] = 'Images/Geometridae/Pale%20Brindled%20Beauty/Pale_Brindled_Beauty_Tree.jpg'
theImages[3] = 'Images/Noctuidae/Cuculliinae/Early%20Grey/earlygrey_Rossa.jpg'
theImages[4] = 'Images/Noctuidae/The%20Satellite/Satellite_Yellow_Stigma1.jpg'
theImages[5] = 'Images/Nymphilidae/Painted_Lady/Painted_Lady_Road.jpg'
theImages[6] = 'Images/Nymphilidae/Small_Heath/Small_Heath_Resting1.jpg'
theImages[7] = 'Images/Nymphilidae/Meadow_Brown/Irish/Meadow_Brown_Flower.jpg'
theImages[8] = 'Images/Nymphilidae/Owl%20Butterflys/Caligo_Menom/Owl_Butterfly_Resting.jpg'
theImages[9] = 'Images/Pterophoridae/Stenoptilia_pterodactyla/Stenoptilia_pterodactyla_Adult1.jpg'
theImages[10] = 'Images/Pyralidae/Chrysoteuchia%20culmella/Chrysoteuchia_culmella_Adult2.jpg'
theImages[11] = 'Images/Sphinigidae/Eyed_Hawk_Moth/Eyed_Hawk_Moth_Resting1.jpg'
theImages[12] = 'Images/Tortricidae/Tortricinae/Syndemis%20musculana/Syndemis_musculana_Mating.JPG'
theImages[13] = 'Images/Unusual%20Moths/Tony%20Kingston/Popular%20Hawkmoth/Popular%20Hawkmoth%201.jpg'
theImages[14] = 'Images/Unusual%20Moths/Roger%20Skeen/Oleander_Hawk_Moth1.jpg'
theImages[15] = 'Images/Unusual%20Moths/Roger%20Skeen/Bastilla_crameri.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
</script>
Code placed where I want the images displayed:
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http:
<!-- Begin
showImage();
</script>
Because my website is about butterflies and moths, when the image of a species appears, I would like below the image text saying what the species is and when you click the text (want text to be hyperlink), it takes you to a page about that species, target frame for the hyperlink is _self
Anyone know how I could do this?
David McCormick
In the end we're all just the same
|
|
|
|
|
Dave McCool wrote: I would like below the image text saying what the species is and when you click the text (want text to be hyperlink)
it's like this ...
Dave McCool wrote: var theImages = new Array()
Dave McCool wrote: theImages[0] = 'Images/Nepticulidae/Stigmella_Aurella/Stigmella_aurella_Adult1.jpg'
theImages[1] = 'Images/Lasiocampidae/Drinker/Drinker_Moth_Adult_Male1.jpg'
var theImages = new Array() ;
var theText = new Array() ;
var theLink = new Array();
theImages[0] = 'Images/Nepticulidae/Stigmella_Aurella/Stigmella_aurella_Adult1.jpg';
theText[0] = "This is a butterfly?";
theLink [0]= 'HTMLfiles/Nepticulidae/Stigmella_Aurella.html';
theImages[1] = 'Images/Lasiocampidae/Drinker/Drinker_Moth_Adult_Male1.jpg';
theLink[1] = 'HTMLfiles/Lasiocampidae/Drinker.html';
theText[1] = "This butter is fly?"
Dave McCool wrote: function showImage(){document.write('<img src="'+theImages[whichImage]+'">');}
function showImage(){
document.write('<table><tr><td>');
document.write('<img src="'+theImages[whichImage]+'">');
document.write('</td></tr><tr><td>');
document.write('<a href =' + theLink[whichImage] + '>');
document.write(theText[whichImage]);
document.write('</a>');
document.write('</td></tr></table>');
}
this is very close to what you are asking
|
|
|
|