|
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
|
|
|
|
|
I have two calendar extenders.FromDate and ToDate.I have to validate it by using javasript.FromDate wont become greter than ToDate.when fromdate entered is greater than todate,a messagebox will appear..Pls help me
|
|
|
|
|
Please don't cross post. Posting at multiple forums is considered rude. Pick one forum and stick to it.
Cross Post[^]
|
|
|
|
|
Sorry for my mistake..I dont repeat this
Thanks
|
|
|
|
|
I have a ajax tool calendarExtendarFromDate,imgFromDate,textBoxFromDate,calendarExtendarToDate,imgToDate and textBoxToDate,When a date is selected from calendarExtendarFromDate,that date is displayed in textBoxFromDate.Likewise in the case of calendarExtendarToDate.Here is the source code:
--------------------------------------------------------------
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <asp:TextBox ID="txtFromDate" runat="server" ReadOnly="True"> <img id="imgFromDate" runat="server" src="~/images/calendar.png" alt="~/images/calendar.png"/>
<cc1:CalendarExtender ID="CalendarExtenderFromDate" runat="server" CssClass="cal" TargetControlID="txtFromDate" PopupButtonID="imgFromDate"/> </cc1:CalendarExtender
<asp:TextBox ID="txtToDate" runat="server" ReadOnly="True" Enabled="False"<img id="imgToDate" runat="server" src="~/images/calendar.png" alt="~/images/calendar.png"/> <cc1:CalendarExtender ID="CalendarExtenderToDate" runat="server" OnClientDateSelectionChanged="CheckForFutureDate" CssClass="cal" TargetControlID="txtToDate"PopupButtonID="imgToDate"/>
-------------------------------------------------------------
I have radiobuttons..When the radiobutton between is clicked,then only calendarExtendarToDate is enabled.otherwise it becomes in disabled state..I wrote code in jscript as below:
function validate()
{
document.getElementById("imgToDate").disabled=false;
document.getElementById("txtToDate").disabled=false;
}
//call this function in .aspx.cs as below:
rbBetween.Attributes.Add("onClick", "return validate()");
textbox is disabled.When between radio is clicked,then only enabled.But calendarextendar disabled didnt work.Pls help me...
|
|
|
|