473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Javascript equivalent of #include or @import?

I know of course that you can use <script src=""></script> in an HTML
document to include javascript code you don't want to spill all over the
page.

I'm wondering if there's a way to include other pieces of javascript
code from *within* javascript.... a la #include in C, @import in Java,
use/require in Perl, include()/require() in PHP, etc....

Thanks,
Weston

~==~
http://weston.canncentral.org/
weston8[at]cann8central.org
(remove eights to email me)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
22 38491
Weston C <west8on[at]cann8central.RemoveEights.org> writes:
I know of course that you can use <script src=""></script> in an HTML
document to include javascript code you don't want to spill all over the
page.
Not understood. Are you talking about
<!-- <script src="..." type="text/javascript"></script> -->
or
<script src="..." type="text/javascript"><!-- --></script>
?
The first does nothing, the second doesn't need the comment.
I'm wondering if there's a way to include other pieces of javascript
code from *within* javascript.... a la #include in C, @import in Java,
use/require in Perl, include()/require() in PHP, etc....


Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:

document.write('<script type="text/javascript src="..."></script>');

After the page has loaded, it becomes harder. Some browsers allow you
to load a script by adding a new script tag to the page using DOM methods,
or by changing the src attribute of an existing tag, or by changing the
content of an existing script tag.
Not all browsers understand all, or any, of these methods, though,
so it's not something to depend on.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
In article <vf**********@hotpop.com>, Lasse Reichstein Nielsen <lr*@hotpop.com>
writes:
After the page has loaded, it becomes harder. Some browsers allow you
to load a script by adding a new script tag to the page using DOM methods,
or by changing the src attribute of an existing tag, or by changing the
content of an existing script tag.
Not all browsers understand all, or any, of these methods, though,
so it's not something to depend on.


Do you know of a browser that doesn't support dynamically loading a script
file? Other than O7?

<URL: http://tinyurl.com/d25q >

I am still beating my head with Opera in general without resorting to an
IFrames/Frames solution. But knowledge of any browser that won't handle the
methods in the above URL would be of great use to me.

--
Randy
Jul 20 '05 #3
hi************@aol.com (HikksNotAtHome) writes:
Do you know of a browser that doesn't support dynamically loading a script
file? Other than O7?
I'm running O7.5 preview, and it works there.
I can do:

var scr = document.createElement("script");
scr.type="text/javascript";
document.body.appendChild(scr);
scr.src = "../../alert.js"; // alerts something to show it has loaded.

and also changing the text of a script element:

document.getElementById("idOfScriptElement").text = "alert('foo')"

You'll just have to wait for it to be released before it becomes
widely used :)
<URL: http://tinyurl.com/d25q >
(Please write what it is a link to. I usually don't follow links like
this without a description).
I am still beating my head with Opera in general without resorting
to an IFrames/Frames solution. But knowledge of any browser that
won't handle the methods in the above URL would be of great use to
me.


That article looks very thorough. I am not familiar with browsers
outside of Netscape, Mozilla/Gecko, IE and Opera (but of those, I have
17 versions installed :). I'll assume that Netscape 2 and 3 won't work
either, nor earlier Operas, but I don't really care enough to test :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #4
Thought:

http://jibbering.com/2002/4/httprequest.html

So, to import a javascript file from inside of javascript:

function include(url)
{
xmlhttp.open("GET", url,true);
xmlhttp.onreadystatechange=function() {
eval(xmlhttp.responseText);
}
xmlhttp.send()
}

I haven't tried this out yet; xmlhttp does not appear to work with
Camino on Mac OS X (Gecko based) so I'm not sure what its coverage is,
and I don't know exactly how it works.
But this looks like a good lead to me...

~==~
http://weston.canncentral.org/
weston8[at]cann8central.org
(remove eights to email me)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #5
In article <3f*********************@news.frii.net>, Weston C
<west8on[at]cann8central.RemoveEights.org> writes:
Thought:

http://jibbering.com/2002/4/httprequest.html

So, to import a javascript file from inside of javascript:

function include(url)
{
xmlhttp.open("GET", url,true);
xmlhttp.onreadystatechange=function() {
eval(xmlhttp.responseText);
}
xmlhttp.send()
}

I haven't tried this out yet; xmlhttp does not appear to work with
Camino on Mac OS X (Gecko based) so I'm not sure what its coverage is,
and I don't know exactly how it works.
But this looks like a good lead to me...


Please quote what you are replying to.

Attempting to dynamically load a script file is going to be a lot more widely
supported than an HTTPRequest object is.

Since you have a Mac, can you test some of the methods in the article I linked
to?
<URL: http://tinyurl.com/d25q > is an article that lists several ways to try to
dynamically load a .js file - on the fly.
--
Randy
Jul 20 '05 #6
In article <n0**********@hotpop.com>, Lasse Reichstein Nielsen <lr*@hotpop.com>
writes:
hi************@aol.com (HikksNotAtHome) writes:
Do you know of a browser that doesn't support dynamically loading a script
file? Other than O7?


I'm running O7.5 preview, and it works there.
I can do:

var scr = document.createElement("script");
scr.type="text/javascript";
document.body.appendChild(scr);
scr.src = "../../alert.js"; // alerts something to show it has loaded.

and also changing the text of a script element:

document.getElementById("idOfScriptElement").text = "alert('foo')"

You'll just have to wait for it to be released before it becomes
widely used :)


Nice to know that sometime in the next 6 months that it will work in a widely
used version of Opera.

<URL: http://tinyurl.com/d25q >


(Please write what it is a link to. I usually don't follow links like
this without a description).
I am still beating my head with Opera in general without resorting
to an IFrames/Frames solution. But knowledge of any browser that
won't handle the methods in the above URL would be of great use to
me.


That article looks very thorough. I am not familiar with browsers
outside of Netscape, Mozilla/Gecko, IE and Opera (but of those, I have
17 versions installed :). I'll assume that Netscape 2 and 3 won't work
either, nor earlier Operas, but I don't really care enough to test :)


I can save you the trouble of testing in NN2,3 or earlier Operas, it won't work
there. Out of them, the only one I really care to try to make it work in is
Opera.
--
Randy
Jul 20 '05 #7
Lasse Reichstein Nielsen wrote:
Weston C <west8on[at]cann8central.RemoveEights.org> writes:
I'm wondering if there's a way to include other pieces of javascript
code from *within* javascript.... a la #include in C, @import in Java,
use/require in Perl, include()/require() in PHP, etc....


Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:

document.write('<script type="text/javascript src="..."></script>');


The missing delimiter for the "type" attribute aside, this will
firstly definitely[tm] break in NN4 due to the NRLB[1], secondly
break in for-this-point SGML-compliant parsers (finding the ETAGO
delimiter "</" as end of the "script" element it needs to be
enclosed in, thus passing an unterminated string to the script
engine), and is thirdly not required at all if the inclusion is
unconditional. Instead, a simple

<script type="text/javascript" src="..."></script>

suffices in the latter case and will do no harm to noscript users.
If conditional inclusion is required, the best bet is

<script type="text/javascript">
<!--
document.write('<script type="text/javascript" src="..."><\/script>');
//-->
</script>

but the NRLB issue is nevertheless (in)valid, so you better not count
on it. Instead, one should either find a way to write that "script"
element dynamically server-side or disregard all NN4 users (but the
latter is not a wise decision for a commercial site).
PointedEars
___________
[1] Netscape Run-Length Bug: Non-reproducible bug making
NN4 throwing away/overwriting parts of the source code.
Jul 20 '05 #8
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Lasse Reichstein Nielsen wrote:
Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:

document.write('<script type="text/javascript src="..."></script>');


The missing delimiter for the "type" attribute aside,


Bummer!
this will firstly definitely[tm] break in NN4 due to the NRLB[1],
That one I was not aware of. It's worth worrying about if one wants
to support Netscape 4.
secondly break in for-this-point SGML-compliant parsers (finding the
ETAGO delimiter "</" as end of the "script" element it needs to be
enclosed in, thus passing an unterminated string to the script
engine),
That was deliberate. I did not write the surrounding script tags,
and in that case, I don't assume by default that the code is embedded
in HTML/XHTML. So, the code is plain Javascript and will work if
included in an external javascript file.
and is thirdly not required at all if the inclusion is
unconditional.
To solve the original poster's problem, you can't depend on HTML.
The inclusions should be made by the Javascript (presumably so
you can change the inclusion without changing existing pages).

At that, it is probably not as good a solution as could be hoped for,
because the declarations of the included page will not be immediately
available to the file loading it, only to subsequent script elements,
or code running after the included file has been parsed.

suffices in the latter case and will do no harm to noscript users.
If conditional inclusion is required, the best bet is

<script type="text/javascript">
<!--
document.write('<script type="text/javascript" src="..."><\/script>');
//-->
</script>
I wouldn't add <!-- and //-->. I prefer to write correct ECMAScript,
and there is no current browser that requires them.
but the NRLB issue is nevertheless (in)valid, so you better not count
on it.


I'll look into it.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #9
Lasse Reichstein Nielsen wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Lasse Reichstein Nielsen wrote:
Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:

document.write('<script type="text/javascript src="..."></script>');
[...]
secondly break in for-this-point SGML-compliant parsers (finding the
ETAGO delimiter "</" as end of the "script" element it needs to be
enclosed in, thus passing an unterminated string to the script
engine),


That was deliberate. I did not write the surrounding script tags,
and in that case, I don't assume by default that the code is embedded
in HTML/XHTML.


ACK, though it is better to mention the ETAGO issue to prevent
the unexperienced from running into trouble on this.
and is thirdly not required at all if the inclusion is
unconditional.


To solve the original poster's problem, you can't depend on HTML.


| I'm wondering if there's a way to include other pieces of javascript
| code from *within* javascript.... a la #include in C, @import in Java,
| use/require in Perl, include()/require() in PHP, etc....

You can.
The inclusions should be made by the Javascript (presumably so
you can change the inclusion without changing existing pages).
That would not be only of academical value, while causing problems with
dynamically written "script" elements in practice. (No, I do not mean
only the NRLB.)
At that, it is probably not as good a solution as could be hoped for,
because the declarations of the included page
Page?
will not be immediately available to the file loading it, only to
subsequent script elements, or code running after the included file
has been parsed.


Which is exactly the nature of the pendants in other languages mentioned
above.
suffices in the latter case and will do no harm to noscript users.
If conditional inclusion is required, the best bet is

<script type="text/javascript">
<!--
document.write('<script type="text/javascript" src="..."><\/script>');
//-->
</script>


I wouldn't add <!-- and //-->. I prefer to write correct ECMAScript,
and there is no current browser that requires them.


Depends on what you call "current browser". Besides,
there is no "current browser" that supports ECMAScript.
PointedEars
Jul 20 '05 #10
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Lasse Reichstein Nielsen wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Lasse Reichstein Nielsen wrote:
Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:

document.write('<script type="text/javascript src="..."></script>');

[...]
secondly break in for-this-point SGML-compliant parsers (finding the
ETAGO delimiter "</" as end of the "script" element it needs to be
enclosed in, thus passing an unterminated string to the script
engine),
That was deliberate. I did not write the surrounding script tags,
and in that case, I don't assume by default that the code is embedded
in HTML/XHTML.


ACK, though it is better to mention the ETAGO issue to prevent
the unexperienced from running into trouble on this.


It is reasonable. I shall consider wrapping in script tags when
appropriate.

| I'm wondering if there's a way to include other pieces of javascript
| code from *within* javascript.... a la #include in C, @import in Java,
| use/require in Perl, include()/require() in PHP, etc....

You can.
Is there a method that works consistently across modern browsers?
(rules out XMLHTTP, but probably not iframes).
That would not be only of academical value, while causing problems with
dynamically written "script" elements in practice. (No, I do not mean
only the NRLB.)
What other problems are there with dynamically written script elements?
Page?
Script. Doh.
will not be immediately available to the file loading it, only to
subsequent script elements, or code running after the included file
has been parsed.


Which is exactly the nature of the pendants in other languages mentioned
above.


No, when they have an include statement at the top of a script, the
included material is available to the remainder of that script. Using
document.write of a script tag will only make the included material
available to subsequent script tags, not the remainder of the
execution of the one contining the document.write.
Depends on what you call "current browser". Besides,
Anything more recent than Netscape 3?
there is no "current browser" that supports ECMAScript.


Probably correct. The ones I have tested all fail on this script:
<script type="text/javascript">
var z = 1;
if ( 0 <!-- z
) { alert(42); }
</script>
It should execute alert(42) according to the ECMAScript standard.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #11
JRS: In article <ek**********@hotpop.com>, seen in
news:comp.lang.javascript, Lasse Reichstein Nielsen <lr*@hotpop.com>
posted at Fri, 16 Jan 2004 00:25:48 :-

Probably correct. The ones I have tested all fail on this script:
<script type="text/javascript">
var z = 1;
if ( 0 <!-- z
) { alert(42); }
</script>
It should execute alert(42) according to the ECMAScript standard.


That code works in <URL:http://www.merlyn.demon.co.uk/js-quick.htm>,
which uses eval in a fully-loaded page, in my MSIE4.

It also works in a being-loaded page if converted to a string parameter
to eval.

It does nothing in a being-loaded page if inserted as published.

AISB, eval has its uses <g>.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
Jul 20 '05 #12
>>> I'm wondering if there's a way to include other pieces of javascript
code from *within* javascript.... a la #include in C, @import in Java,
use/require in Perl, include()/require() in PHP, etc....


Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:


Rats. I'm trying to script in PhotoShop, which uses Javascript, and
it sure is a waste to have to copy code around instead of just
including it. I guess it's a limitation of not seeing all potential
uses of a language before hand. Oh well.
Jul 20 '05 #13
On Fri, 16 Jan 2004 20:43:32 -0500, gendem <ge****@yahoo.com> wrote:
Rats. I'm trying to script in PhotoShop, which uses Javascript, and
it sure is a waste to have to copy code around instead of just
including it. I guess it's a limitation of not seeing all potential
uses of a language before hand. Oh well.


PhotoShop? Did you mean DreamWeaver?

---
http://seven.postmodern.com
seven at post modern dot com
If sending an email, +add+ the word
"newsgroup" to the subject line to
temporarily avert the spam filter.
Jul 20 '05 #14
To load any file into the current page from the server use :
<!--#include file="[filename]"-->This is server side code.Javascript runs on
the client so unless everyone who is going to visit your website has the
java files on their computers, what you want would not work!"gendem"
<ge****@yahoo.com> wrote in message
news:in********************************@4ax.com...
I'm wondering if there's a way to include other pieces of javascript
code from *within* javascript.... a la #include in C, @import in Java,
use/require in Perl, include()/require() in PHP, etc....

Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:


Rats. I'm trying to script in PhotoShop, which uses Javascript, and
it sure is a waste to have to copy code around instead of just
including it. I guess it's a limitation of not seeing all potential
uses of a language before hand. Oh well.

Jul 20 '05 #15
I use the following to include any file on the server :

<!--#include file="yourfilenamehere.js"-->

I'm not sure what support you need to run it. I use ASP for my server side
programming but this
isn't asp.
Anyway, try it, if your server has even minimal support it should work.
Remember, this is happening on the server. Javascript runs on the client. I
fail to see how
using javascript document.read or write is going to work unless everyone who
visits your web page has the
files on their computers!

"gendem" <ge****@yahoo.com> wrote in message
news:in********************************@4ax.com...
I'm wondering if there's a way to include other pieces of javascript
code from *within* javascript.... a la #include in C, @import in Java,
use/require in Perl, include()/require() in PHP, etc....

Not in general, no. If you want to include it while the page is being
loaded, you can use document.write to write a new Javascript tag:


Rats. I'm trying to script in PhotoShop, which uses Javascript, and
it sure is a waste to have to copy code around instead of just
including it. I guess it's a limitation of not seeing all potential
uses of a language before hand. Oh well.

Jul 20 '05 #16
Simon Wigzell wrote:
To load any file into the current page from the server use :
<!--#include file="[filename]"-->This is server side code.Javascript runs on
the client so unless everyone who is going to visit your website has the
java files on their computers, what you want would not work!


Before offering javascript advice, one should learn the difference
between java and javascript.

Before posting to a usenet newsgroup, one should read its FAQ.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #17
Oh please pardon me for my typo - I said "java" not "javascript" in my
second use of the term. Do you disagree with the substance of my post? Is
there a word for shits like you who go around trying to prove their
superiority by picking on typos in other peoples posts? I've been
programming for 15 years thanks very much. I'm trying to help someone, what
are you doing you miserable maggot?
"Randy Webb" <hi************@aol.com> wrote in message
news:TL********************@comcast.com...
Simon Wigzell wrote:
To load any file into the current page from the server use :
<!--#include file="[filename]"-->This is server side code.Javascript runs on the client so unless everyone who is going to visit your website has the
java files on their computers, what you want would not work!


Before offering javascript advice, one should learn the difference
between java and javascript.

Before posting to a usenet newsgroup, one should read its FAQ.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #18
It's all explained here :

http://www.htmlgoodies.com/beyond/ssi.html

Hope this helps.
Jul 20 '05 #19
Simon Wigzell wrote:
"Randy Webb" <hi************@aol.com> wrote in message
news:TL********************@comcast.com...
Simon Wigzell wrote:

To load any file into the current page from the server use :
<!--#include file="[filename]"-->This is server side code.Javascript
runs on
the client so unless everyone who is going to visit your website has the
java files on their computers, what you want would not work!
Before offering javascript advice, one should learn the difference
between java and javascript.

Before posting to a usenet newsgroup, one should read its FAQ.

Oh please pardon me for my typo - I said "java" not "javascript" in my
second use of the term.
If you consider java a typo for javascript.........

javasrcipt is a typo, java instead of javascript is not.
Do you disagree with the substance of my post?
Since you talked about "java files", and the question was about
javascript then yeah I disagree with you. As for changing it to
javascript instead of java, then I still disagree with the "substance"
because it offers no solution to the problem, not even close.
Is there a word for shits like you who go around trying to prove their
superiority by picking on typos in other peoples posts? I've been
programming for 15 years thanks very much.
You have been programming 15 years and don't know the difference between
java and javascript? (other than to try to pass it off as a typo?).
I'm trying to help someone, what are you doing you miserable maggot?


Correcting incompetent, unknowledgable idiots like you.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #20
Hi Simon

The scripting I do has no server; Adobe has implemeneted javascript as
a cross-platform scripting language to control Photoshop CS, it works
in much the same way as vb and applescript do in this case. There is
no server, no browser, nothing to do with the web at all, sorry if I
wasn't clear.

SSI and the other techniques work for web pages, but not for anything
else. The lack of an equivalent command to use/require in perl or
#include in C is what I'm looking for, and from the sounds of it, that
doesn't exist.

Thanks anyway
To load any file into the current page from the server use :
<!--#include file="[filename]"-->This is server side code.Javascript runs on
the client so unless everyone who is going to visit your website has the
java files on their computers, what you want would not work!
"gendem" <ge****@yahoo.com> wrote in message
news:in********************************@4ax.com.. .
>>> I'm wondering if there's a way to include other pieces of javascript
>>> code from *within* javascript.... a la #include in C, @import in Java,
>>> use/require in Perl, include()/require() in PHP, etc....
>>
>> Not in general, no. If you want to include it while the page is being
>> loaded, you can use document.write to write a new Javascript tag:


Rats. I'm trying to script in PhotoShop, which uses Javascript, and
it sure is a waste to have to copy code around instead of just
including it. I guess it's a limitation of not seeing all potential
uses of a language before hand. Oh well.


Jul 20 '05 #21
Jeez Randy, lighten up.

On Sat, 24 Jan 2004 19:09:50 -0500, Randy Webb
<hi************@aol.com> wrote:
Simon Wigzell wrote:
To load any file into the current page from the server use :
<!--#include file="[filename]"-->This is server side code.Javascript runs on
the client so unless everyone who is going to visit your website has the
java files on their computers, what you want would not work!


Before offering javascript advice, one should learn the difference
between java and javascript.

Before posting to a usenet newsgroup, one should read its FAQ.


Jul 20 '05 #22
gendem <ge****@yahoo.com> writes:
The scripting I do has no server; Adobe has implemeneted javascript as
a cross-platform scripting language to control Photoshop CS, it works
in much the same way as vb and applescript do in this case. There is
no server, no browser, nothing to do with the web at all, sorry if I
wasn't clear.
Ah, yes. The power of a completely abstract language ...
SSI and the other techniques work for web pages, but not for anything
else. The lack of an equivalent command to use/require in perl or
#include in C is what I'm looking for, and from the sounds of it, that
doesn't exist.


.... along with the penalties for not assuming anything about the
context it runs in. Since ECMAScript is completely agnostic about the
environment it runs in, it can't have an include method build in. That
would require making assumptions about, e.g., files and directories,
in order to work.

So, it must be the job of the host environment to make include options
available. Browsers haven't typically done that in Javascript itself,
because it is possible to go throug HTML or the DOM. In your case, you
don't have that possibility.

If they try to make documents self-contained, then it won't make sense
to allow dynamic includes of external scripts. Then your document
wouldn't work if mailed to someone else, unless you also include the
external file. For, e.g., PDF, that would be a problem. So, maybe
there is no way, but you should ask some Adobe specialists, because it
is not a general Javascript problem.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #23

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: effendi | last post by:
Hi Can any tell me what is the javascript equivalent of CSS border? I would like to change the border of my cell when it is set on focus. I have tried onFocus="style.border='3px'" but it is not...
14
by: horos | last post by:
hey all, I'm a heavy perl user, not so much a java script user, and was wondering... perl has an extremely nice utility called Data::Dumper, which allows you to dump out the contents of an...
7
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; ...
0
by: anonymous | last post by:
Hey all, I sent this as a response to someone else's problem, but then I thought it might be useful to more people so I'm starting a new thread to share and discuss it. I found a great JavaScript...
3
by: polychrom | last post by:
What is Javascript equivalent for this VBScript line: Set WshShell = Nothing Thanks.
21
by: shelleybobelly | last post by:
I'm looking to return DATE ONLY for yesterday's date. No seconds, milliseconds. Formatted either yyyy/mm/dd or mm/dd/yyyy. VB does it so easily Date()-1 will return 03/27/2007 if today is...
3
by: John | last post by:
In Access via "Menu->File->Get external data' I can import an Outlook folder. I can't find the VB equivalent for doing the same. Anyone an idea? thanks, john
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.