[Javascript] Mail from Jai Sankar N

Jai Sankar N pnjaisan at yahoo.com
Fri Jul 1 00:29:23 CDT 2005


Hello Paul Novitski Sir,
 
Actully i'm asked wrong question, i.e  How to create the java menu creation instead of "How to create the menu in Javascript ?

Thanking your kind reply.. and u suggessted  URL for Javascript.
 
Jai Sankar N
India.

javascript-request at LaTech.edu wrote:
Send Javascript mailing list submissions to
javascript at LaTech.edu

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.LaTech.edu/mailman/listinfo/javascript
or, via email, send a message with subject or body 'help' to
javascript-request at LaTech.edu

You can reach the person managing the list at
javascript-owner at LaTech.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Javascript digest..."


Today's Topics:

1. Re: (no subject) (Paul Novitski)
2. Internet Explorer, iFrames and JavaScript (Julien Nadeau)
3. RE: A loop for this script? (Roland Dong)
4. RE: Internet Explorer, iFrames and JavaScript
(Falls, Travis D (HTSC, CASD))


----------------------------------------------------------------------

Message: 1
Date: Thu, 30 Jun 2005 10:50:11 -0700
From: Paul Novitski 

Subject: Re: [Javascript] (no subject)
To: JavaScript List 
Message-ID: <6.2.0.14.2.20050630103919.02291a18 at spamarrest.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Jai,

Here are two online reference guides I use frequently:

Gecko DOM Reference
http://www.mozilla.org/docs/dom/domref/

Core JavaScript Guide
http://www.croczilla.com/~alex/reference/javascript_guide/

The latter has a chapter on Regular Expressions.

You wrote, "tell me about java menu creation..." Please note that Java and 
JavaScript are two very different programming languages.

I think the best way to put a question to a listserve like this is:

1) Do the research on the internet, and ask here if you can't find the 
educational materials you need.

2) Try to make it work yourself. When you have problems:

3) Create a web page that illustrates your problem and upload it to a 
public server. Post your specific question to the listserve including a 
link to your sample page.

Regards,
Paul


At 02:21 AM 6/30/2005, Jai Sankar N wrote:
>Hello all ,
>
>How to use and check the regular expressions ? Pls tell me detail and tell 
>me about java menu creation and how to connect with html ?
>
>Avance thanks for for ur help
>
>Best & Regards,
>
>N.Jai Sankar
>India.




------------------------------

Message: 2
Date: Thu, 30 Jun 2005 13:12:34 -0400
From: Julien Nadeau 
Subject: [Javascript] Internet Explorer, iFrames and JavaScript
To: javascript at LaTech.edu
Message-ID: <1330CBC4-9CAB-46E6-8E14-C552FF17C7F4 at junado.com>
Content-Type: text/plain; charset="us-ascii"

Hi,

First of all, as I'm new to this list, let me introduce myself. I'm a 
20 years old student (studying in mechanical engineering) from Quebec 
in Canada. I have been doing web programming (mostly html/css/php/ 
mysql) for the last 3 to 4 years as a hobby, as a freelance and as a 
part time job. I recently turned to JavaScript for some of my 
programming needs, which it filled so far, but I'm also learning 
that, like CSS, JavaScript is extremely browser dependant.

So I have this little script that a friend sent me, which I modified 
to fit my needs, that create a popup window on my site. The popup 
itself is a that can be dragged around the page. I'm using a 
in the main popup's in order to display content. 
Everything is working seemlessly in Safari (v2.0), Firefox (v1.0.4 on 
my Mac) and Firefox on a PC, but somehow, Internet Explorer 6 refuses 
to cooperate.

Basically, here's what my HTML code looks like:





height="36">



onMouseover="isHot=true;if (isN4) ddN4(theLayer);" 
onMouseout="isHot=false;">
Title

(close)






src="">









This is my floating window, and this code is put right after the 
tag.

Here's also an example on how I would call the function to show the 
window:
'Window title');">show

And finally, here's the JavaScript file that's attached to my HTML page:

/* floatingWindow.js */

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

// outInit is used for module to init the variable whichDog
// which is needed in order to use the extended window
function outInit() {
whichDog=isIE ? top.document.all.floatingWindow : 
top.document.getElementById("floatingWindow");
whichFTT=isIE ? document.all.floatingTitleText : 
top.document.getElementById("floatingTitleText");
whichFF=isIE ? document.frames("floatFrame") : 
top.document.getElementById("floatFrame");
//whichFTT= top.document.all.floatingTitleText;
//whichFF= top.document.all.floatFrame;
}

function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
hotDog=isIE ? event.srcElement : e.target;
outInit();
while (hotDog.id!="floatingTitle"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="floatingTitle"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}

function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx + 'px' : nowX 
+e.clientX-offsetx + 'px';
whichDog.style.top=isIE ? nowY+event.clientY-offsety + 'px' : nowY 
+e.clientY-offsety + 'px';
return false;
}

function ddN4(whatDog){
if (!isN4) return;
N4=eval(whatDog);
N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
N4.onmousedown=function(e){
N4.captureEvents(Event.MOUSEMOVE);
N4x=e.x;
N4y=e.y;
}
N4.onmousemove=function(e){
if (isHot){
N4.moveBy(e.x-N4x,e.y-N4y);
return false;
}
}
N4.onmouseup=function(){
N4.releaseEvents(Event.MOUSEMOVE);
}
}

function hideMe(){
if (isIE||isNN) {
whichDog.style.visibility="hidden";
top.document.getElementById("floatFrame").style.height = 0 + 'px';
} else if (isN4) {
top.document.floatingWindow.visibility="hide";
top.document.floatFrame.style.height = 0 + 'px';
}
}

// int int int int str str
function showMe(pLeft, pTop, pWidth, pHeight, pUrl, pTitle){
if (isIE||isNN) {
whichDog.style.visibility="visible";
whichDog.style.left = pLeft + 'px';
whichDog.style.top = pTop + 'px';
whichDog.style.height = pHeight + 'px';
whichDog.style.width = pWidth + 'px';
whichFTT.innerHTML = pTitle + '\n();return false;" href="http://us.f503.mail.yahoo.com/ym/Compose?box=Inbox&Mid=9579_21427464_176291_2392_7572_0_30428_25425_3191674306&inc=&Search=&YY=65651&order=down&sort=date&pos=0&view=a&head=b#">(close)';
whichFF.style.height = parseInt(pHeight)-26 + 'px';
whichFF.style.width = pWidth + 'px';
whichFF.src = pUrl;
} else if (isN4) {
top.document.floatingWindow.visibility="show";
top.document.floatingWindow.left = pLeft + 'px';
top.document.floatingWindow.top = pTop + 'px';
top.document.floatingWindow.height = pHeight + 'px';
top.document.floatingWindow.width = pWidth + 'px';
top.document.floatingTitleText.innerHTML = pTitle + '\nhref="#" onClick="hideMe();return false;">(close)';
top.document.floatFrame.height = pHeight-24 + 'px';
top.document.floatFrame.width = pWidth + 'px';
top.document.floatFrame.src = pUrl;
}
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

/* end floatingWindow.js */

As I said, this code works flawlessly in both Safari and Firefox.

However, when I test it on Internet Explorer 6, when I call the showMe 
(); function, everything related to whichDog.[anything] works, but 
everything relating to whichFTT or whichFF fails and stops the 
script's execution so I get presented with a nicely sized container 
window, but the title is not altered to what it should be nor is the 
iframe sized appropriately or given any value for the .src attribute.

I've been pulling my hairs out for a few days now and I can't seem to 
figure out what's wrong. Any help would be greatly appreciated!

Thank you very much for taking the time to read through this!

Julien Nadeau
junado at junado dot com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20050630/92f3d6d4/attachment-0001.html

------------------------------

Message: 3
Date: Thu, 30 Jun 2005 14:35:07 -0400
From: "Roland Dong" 
Subject: RE: [Javascript] A loop for this script?
To: "'[JavaScript List]'" 
Message-ID: <000001c57da2$70a03a50$d1620245 at RoDong>
Content-Type: text/plain; charset="us-ascii"

This.cellIndex works well but when I tried to user a timer then it stops
working, for example:
TIMER=setTimeout('document.getElementById(ids[this.cellIndex]).style.visibil
ity="hidden"', 500)

Then the code stops working and complains that "ids is not defined". Why is
that? Any workaround?

Thanks

=========================
var TIMER;
startList = function() {

var ids = new Array("tutorials", "scripting", "validation");

navBar = document.getElementById("nav").rows[0].cells;

for(x in ids){

navBar[x].onmouseover=function() {

document.getElementById(ids[this.cellIndex]).style.visibility="visible"
}

navBar[x].onmouseout=function() {


TIMER=setTimeout('document.getElementById(ids[this.cellIndex]).style.visibil
ity="hidden"', 500)
}
}

}

window.onload=startList;
==========================

-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]
On Behalf Of Mckinney, Lori K
Sent: Wednesday, June 22, 2005 2:54 PM
To: [JavaScript List]
Subject: RE: [Javascript] A loop this this script?

The value of i when your mouseover is called is invalid (3). If your cells
correspond to your array entries, could you use this instead?

navBar[i].onmouseover=function() {

document.getElementById(ids[this.cellIndex]).style.visibility="visible";
};
navBar[i].onmouseout=function() {

document.getElementById(ids[this.cellIndex]).style.visibility="hidden";

-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu]On Behalf Of Roland Dong
Sent: Wednesday, June 22, 2005 1:31 PM
To: '[JavaScript List]'
Subject: RE: [Javascript] A loop this this script?


Thanks Matt, 

I have already tried something like the loop you have but it is not working.
It complains that document.getElementById(ids[i]) has no properties.

Can you take a look the complete code in the following?

DropDown.html
===================================
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">







table.menu
{
font-size:100%;
position:absolute;
visibility:hidden;
}



startList = function() {

var ids = Array('tutorials', 'scripting', 'validation');
navBar = document.getElementById("nav").rows[0].cells;
for (var i=0; i{
    navBar[i].onmouseover=function() {
            document.getElementById(ids[i]).style.visibility="visible";
        };
    navBar[i].onmouseout=function() {
            document.getElementById(ids[i]).style.visibility="hidden";
        };
} // end for

}
window.onload=startList;
//-->




======================================================================



onmouseout="hidemenu('tutorials')" -->

Tutorials


HTMLrow 1,
cell 2row 1, cell 2
XHTMLrow
1, cell 2row 1, cell 2
CSSrow 1,
cell 2row 1, cell 2
XMLrow 1,
cell 2row 1, cell 2
XSLrow 1,
cell 2row 1, cell 2


onmouseout="hidemenu('scripting')" -->

Scripting


JavaScript
href="/vbscript/default.asp">VBScript
DHTML
ASP
ADO



onmouseout="hidemenu('validation')" -->

Validation


Validate
HTML
Validate
XHTML
Validate
CSS
Validate
XML
Validate
WML









====================================













-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]
On Behalf Of Matt Warden
Sent: Wednesday, June 22, 2005 1:13 PM
To: [JavaScript List]
Subject: Re: [Javascript] A loop this this script?

something like:

var ids = Array('tutorials', 'scripting', 'validation');
navBar = document.getElementById("nav").rows[0].cells;
for (var i=0; i{
navBar[i].onmouseover=function() {
document.getElementById(ids[i]).style.visibility="visible";
};
navBar[i].onmouseout=function() {
document.getElementById(ids[i]).style.visibility="hidden";
};
} // end for

Be careful about the order of the ids array, though.

On 6/21/05, Roland wrote:
> 
> I figured that the following script can be written using a for loop. But I
> tried without success. Can anyone throw some light on this? Thank you!
> 
> 
>
============================================================================
>> startList = function() {
> 
>                 navBar = document.getElementById("nav").rows[0].cells;
>                 navBar[0].onmouseover=function() {
> 
> document.getElementById("tutorials").style.visibility="visible"
>                 }
> 
>                 navBar[0].onmouseout=function() {
> 
> document.getElementById("tutorials").style.visibility="hidden"
>                 }
> 
>                 navBar[1].onmouseover=function() {
> 
> document.getElementById("scripting").style.visibility="visible"
>                 }
> 
>                 navBar[1].onmouseout=function() {
> 
> document.getElementById("scripting").style.visibility="hidden"
>                 }
> 
>                 navBar[2].onmouseover=function() {
> 
> document.getElementById("validation").style.visibility="visible"
>                 }
>                 navBar[2].onmouseout=function() {
> 
> document.getElementById("validation").style.visibility="hidden"
>                 }
> }
> window.onload=startList;
> 
> //--> 
> ===============================================
> 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 


-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript



------------------------------

Message: 4
Date: Thu, 30 Jun 2005 14:41:38 -0400
From: "Falls, Travis D (HTSC, CASD)" 
Subject: RE: [Javascript] Internet Explorer, iFrames and JavaScript
To: "'[JavaScript List]'" 
Message-ID:
<951967FCF5C4D211B0610008C75D2AA12C2E80F4 at ct01excmb01.thehartford.com>
Content-Type: text/plain; charset="iso-8859-1"

Do you have a public site that we can see this working/not working in? I
tried to get your code to work that you sent and it doesn't... not even in
fire fox. thanks. :-)


Travis D. Falls | Consultant RAFT.Net IT | 860.547.4070 |
travis.falls at thehartford.com 

-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On
Behalf Of Julien Nadeau
Sent: Thursday, June 30, 2005 1:13 PM
To: javascript at LaTech.edu
Subject: [Javascript] Internet Explorer, iFrames and JavaScript


Hi,

First of all, as I'm new to this list, let me introduce myself. I'm a 20
years old student (studying in mechanical engineering) from Quebec in
Canada. I have been doing web programming (mostly html/css/php/mysql) for
the last 3 to 4 years as a hobby, as a freelance and as a part time job. I
recently turned to JavaScript for some of my programming needs, which it
filled so far, but I'm also learning that, like CSS, JavaScript is extremely
browser dependant. 

So I have this little script that a friend sent me, which I modified to fit
my needs, that create a popup window on my site. The popup itself is a 
that can be dragged around the page. I'm using a in the main
popup's in order to display content. Everything is working seemlessly
in Safari (v2.0), Firefox (v1.0.4 on my Mac) and Firefox on a PC, but
somehow, Internet Explorer 6 refuses to cooperate.

Basically, here's what my HTML code looks like:





height="36">



onMouseover="isHot=true;if (isN4) ddN4(theLayer);"
onMouseout="isHot=false;">
Title
(close)






src="">









This is my floating window, and this code is put right after the tag.

Here's also an example on how I would call the function to show the window:
 , 'Window title');">show

And finally, here's the JavaScript file that's attached to my HTML page:

/* floatingWindow.js */

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

// outInit is used for module to init the variable whichDog

=== message truncated ===




		
---------------------------------
Yahoo! Sports
 Rekindle the Rivalries. Sign up for Fantasy Football
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050630/7e9c636d/attachment.htm>


More information about the Javascript mailing list