473,545 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script-generated code displaying differntly than the exact same code displayed staticly... help!?!?!

Hey there,

Big-time curiosity issue here...

Here's the test code (it's not that long)... it's to display a large
number of image links with captions, ideally pulled in from an
external file (that part's not here -- spotlighting the problem code):

--------BEGIN CODE PAGE------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dt d">
<html>
<head>
<title>Test</title>
<script type="text/javascript">
function testSpans(sbody ) {
var sp, i, j, oneRecord;
sbody = document.getEle mentById(sbody) ;
for (i = 0; i <= 1; i++) {
var bkSpan, bkAa, bkAb, bkAex, bkImg, bkTitle,
bkTypea, bkTypeb, txt, br;
txt = "Text Text";
testImg = document.create Element("img");
testImg.setAttr ibute("src",
"images/test.gif");
testA = document.create Element("a");
testA.setAttrib ute("href",
"test/url/index.htm");
testA.appendChi ld(testImg);
br = document.create Element("br");
testA.appendChi ld(br);
testText = document.create TextNode(txt);
testA.appendChi ld(testText);
testSpan = document.create Element("span") ;
testSpan.setAtt ribute("id", i);
testSpan.style. display = "inline";
testSpan.style. width = "100px";
testSpan.append Child(testA);
sbody.appendChi ld(testSpan);
}
}
function init() {
testSpans('scoo byDoo');
}
</script>
</head>
<body onload="init()" >
<h1>Test</h1>
<hr />
<table><tr><t d id="scoobyDoo"> </td></tr></table>
</body>
</html>
--------END CODE PAGE------------

When it displays, the <span>'s don't line up on the same line like
they should:

IMAGE IMAGE
text text

Instead, it's as if the first span never ends... the image from the
second span displays right after the text in the first, like this:

IMAGE
text IMAGE
text

Using MSIE's "View Partial Source" powertoy, I can see that the
generated HTML is as follows:

--------BEGIN GENERATED HTML------------
<H1>Test</H1>
<HR>

<TABLE>
<TBODY>
<TR>
<TD id=scoobyDoo><S PAN id=0 style="DISPLAY: inline; WIDTH: 100px"><A
href="test/url/index.htm"><IMG height=30 src="images/test.gif"
width=28><BR>Te xt
Text</A></SPAN><SPAN id=1 style="DISPLAY: inline; WIDTH: 100px"><A
href="test/url/index.htm"><IMG height=30 src="images/test.gif"
width=28><BR>Te xt
Text</A></SPAN></TD></TR></TBODY></TABLE>
--------END GENERATED HTML------------

The problem is that *this is right!* Putting this code in a page
displays perfectly, but it doesn't when generated by the JavaScript
shown above.

Anyone have any ideas? A CSS tag that will help? Another way to
dynamically create this data? Anything will be appreciated...

- Akbar

Jul 20 '05 #1
14 2583
Akbar <me@here.com> writes:
--------BEGIN CODE PAGE------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dt d">
I see you use a DOCTYPE that puts IE in standards mode.

When it displays, the <span>'s don't line up on the same line like
they should:

IMAGE IMAGE
text text
They shouldn't with the code you generate, not in standards mode.
<SPAN id=0 style="DISPLAY: inline; WIDTH: 100px">
I see a problem right here. The CSS width property should have no
effect on an inline block.
The problem is that *this is right!* Putting this code in a page
displays perfectly,
If by "this code" you mean the above, then notice that you don't have
a DOCTYPE that puts the browser into standards mode. Add that, and IE
will show it the same way as when generating it with Javascript.
Anyone have any ideas? A CSS tag that will help? Another way to
dynamically create this data? Anything will be appreciated...


Make the blocks display:block and float:left. Then they will line up
the way you want. Or put them into separate td's.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
DU
Akbar wrote:
Hey there,

Big-time curiosity issue here...

Here's the test code (it's not that long)... it's to display a large
number of image links with captions, ideally pulled in from an
external file (that part's not here -- spotlighting the problem code):

--------BEGIN CODE PAGE------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dt d">
<html>
<head>
I usually add these lines into xhtml files:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />

<title>Test</title>
<script type="text/javascript">
function testSpans(sbody ) {
"In XHTML, the script and style elements are declared as having #PCDATA
content. As a result, < and & will be treated as the start of markup,
and entities such as &lt; and &amp; will be recognized as entity
references by the XML processor to < and & respectively. Wrapping the
content of the script or style element within a CDATA marked section
avoids the expansion of these entities."
http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-4.8

So, if you use < or & in your unmarked CDATA function, then it will be
treated and considered as markup.

<script type="text/javascript">
<![CDATA[
.... unescaped script content ...
]]>
</script>

is what I suggest here since you use < in your code.
var sp, i, j, oneRecord;
sbody = document.getEle mentById(sbody) ;
for (i = 0; i <= 1; i++) {
right here, we see the <.
var bkSpan, bkAa, bkAb, bkAex, bkImg, bkTitle,
bkTypea, bkTypeb, txt, br;
txt = "Text Text";
testImg = document.create Element("img");
testImg.setAttr ibute("src",
"images/test.gif");
Not recommendable. setAttribute should be used only when there is no
other attribute possible. Here, the simple

testImg.src = "images/test.gif";

works.

http://www.w3.org/TR/DOM-Level-2-HTM...ml#ID-87762984
testA = document.create Element("a");
testA.setAttrib ute("href",
"test/url/index.htm");
testA.href = "test/url/index.htm";
http://www.w3.org/TR/DOM-Level-2-HTM...ml#ID-88517319
testA.appendChi ld(testImg);
br = document.create Element("br");
testA.appendChi ld(br);
testText = document.create TextNode(txt);
testA.appendChi ld(testText);
or
testA.appendChi ld(document.cre ateTextNode(txt ));

testSpan = document.create Element("span") ;
testSpan.setAtt ribute("id", i);
testSpan.id = i;
http://www.w3.org/TR/DOM-Level-2-HTM...ml#ID-63534901
testSpan.style. display = "inline";
Per definiion, a span is an inline element. So, there is no need for
that here.
testSpan.style. width = "100px";
testSpan.append Child(testA);
sbody.appendChi ld(testSpan);
}
}
function init() {
testSpans('scoo byDoo');
}
</script>
</head>
<body onload="init()" >
<h1>Test</h1>
<hr />
<table><tr><t d id="scoobyDoo"> </td></tr></table>
</body>
</html>
--------END CODE PAGE------------

When it displays, the <span>'s don't line up on the same line like
they should:

IMAGE IMAGE
text text

Instead, it's as if the first span never ends... the image from the
second span displays right after the text in the first, like this:

IMAGE
text IMAGE
text

Using MSIE's "View Partial Source" powertoy, I can see that the
generated HTML is as follows:

--------BEGIN GENERATED HTML------------
<H1>Test</H1>
<HR>

<TABLE>
<TBODY>
<TR>
<TD id=scoobyDoo><S PAN id=0 style="DISPLAY: inline; WIDTH: 100px"><A
href="test/url/index.htm"><IMG height=30 src="images/test.gif"
width=28><BR>Te xt
Text</A></SPAN><SPAN id=1 style="DISPLAY: inline; WIDTH: 100px"><A
href="test/url/index.htm"><IMG height=30 src="images/test.gif"
width=28><BR>Te xt
Text</A></SPAN></TD></TR></TBODY></TABLE>
--------END GENERATED HTML------------

The problem is that *this is right!* Putting this code in a page
displays perfectly, but it doesn't when generated by the JavaScript
shown above.

Anyone have any ideas? A CSS tag that will help? Another way to
dynamically create this data? Anything will be appreciated...

- Akbar


2 other suggestions:
- write a short but meaningful subject line in your post. Just
"Script-generated code displaying differntly" was sufficient
- try to upload your code, page somewhere and then just give the url;
that's always better and so much more convenient as the code can be
tested with various softwares (validations, verifying http headers, link
validators, accessibility validators,etc. .)

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #3
DU,

Lots of great info! Thanks! Some issues tho...

On Sun, 07 Sep 2003 15:11:56 -0400, DU <dr*******@hotR EMOVEmail.com>
wrote:
So, if you use < or & in your unmarked CDATA function, then it will be
treated and considered as markup.

<script type="text/javascript">
<![CDATA[
... unescaped script content ...
]]>
</script>

is what I suggest here since you use < in your code.
var sp, i, j, oneRecord;
sbody = document.getEle mentById(sbody) ;
for (i = 0; i <= 1; i++) {
right here, we see the <.


Tried this, now IE throws Syntax Errors. :( (In Opera7, it doesn;t
do anything at all... hmmmm. Neither does another page that works
fine.. hmmmmmmm.)
testImg.setAttr ibute("src", "images/test.gif");


Not recommendable. setAttribute should be used only when there is no
other attribute possible. Here, the simple

testImg.src = "images/test.gif";

works.


Thanks! Me == newb. Got most of this from an O'Reilly cookbook.
Learning by example...
testSpan.style. display = "inline";


Per definiion, a span is an inline element. So, there is no need for
that here.


This was me trying just about anything to see what might work to fix
it...
2 other suggestions:
- write a short but meaningful subject line in your post. Just
"Script-generated code displaying differntly" was sufficient
'kay.
- try to upload your code, page somewhere and then just give the url;
that's always better and so much more convenient as the code can be
tested with various softwares (validations, verifying http headers, link
validators, accessibility validators,etc. .)


'kay

Thanks again!

- Akbar

Jul 20 '05 #4
On 07 Sep 2003 21:12:04 +0200, Lasse Reichstein Nielsen
<lr*@hotpop.com > wrote:
Akbar <me@here.com> writes:
--------BEGIN CODE PAGE------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dt d">
I see you use a DOCTYPE that puts IE in standards mode.


Actaully, I'm just using the HomeSite default new-page template. :)
When it displays, the <span>'s don't line up on the same line like
they should:

IMAGE IMAGE
text text


They shouldn't with the code you generate, not in standards mode.


Hm. They do when the code is input static-ly versus dynamically. Go
figure...
<SPAN id=0 style="DISPLAY: inline; WIDTH: 100px">


I see a problem right here. The CSS width property should have no
effect on an inline block.


Without the WIDTH property, the text below the image wouldn't wrap to
stay below the image.
The problem is that *this is right!* Putting this code in a page
displays perfectly,


If by "this code" you mean the above, then notice that you don't have
a DOCTYPE that puts the browser into standards mode.


But the first this you said above was that I "use a DOCTYPE that puts
IE in standards mode." Now you say I "*don't* have a DOCTYPE that puts
the browser into standards mode." (Emphasis mine) Which is it? :(
Add that, and IE
will show it the same way as when generating it with Javascript.
What DOCTYPE would you recommend?
Make the blocks display:block and float:left. Then they will line up
the way you want. Or put them into separate td's.


Nope. Tried this and they all displayed in a vert line down the left
side. Wanted them to appear like words on a page, each span walking
from left to right across the page then wrapping at the edge of the
page.

Thanks for you comments!

- Akbar

Jul 20 '05 #5
Akbar <me@here.com> writes:
<SPAN id=0 style="DISPLAY: inline; WIDTH: 100px">
I see a problem right here. The CSS width property should have no
effect on an inline block.


Without the WIDTH property, the text below the image wouldn't wrap to
stay below the image.


With a width property, in standards mode, it won't either, since the
width property of inline elements are ignored.
The problem is that *this is right!* Putting this code in a page
displays perfectly,


If by "this code" you mean the above, then notice that you don't have
a DOCTYPE that puts the browser into standards mode.


But the first this you said above was that I "use a DOCTYPE that puts
IE in standards mode." Now you say I "*don't* have a DOCTYPE that puts
the browser into standards mode." (Emphasis mine) Which is it? :(


Do you put the code into the same page, or into a page of its own?

If I take the generated code that you showed, and put it into a page
of its own, then it displays the way you want. Because the generated
code doesn't have a DOCTYPE, *taht* page is displayed in quirks mode.

If I then copy the DOCTYPE from the original page and add it to the
top of the generated code, then the generated code is shown according
to standards. And it displays the way you don't want it to, but that
the standards mandate.
What DOCTYPE would you recommend?
Any will do, as long as the HTML/XHTML actually follows the DOCTYPE.
To enforce standards mode, you will have to pick a DOCTYPE that triggers
standards mode. I prefer HTML 4.01 (strict) or XHTML 1.1, but it's not
that important, as long as you add a correct URL.

The generated code has tag names in capital letters, so it's not XHTML.
Then I would use:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/REC-html401/strict.dtd">

This page shows the DOCTYPE effects in Opera, which is similar to IE and
Mozilla: <URL:http://www.opera.com/docs/specs/doctype/>

[float:left] Nope. Tried this and they all displayed in a vert line down the left
side. Wanted them to appear like words on a page, each span walking
from left to right across the page then wrapping at the edge of the
page.


That is probably becaue you have wrapped it in a table. A table with one
cell is rarely necessary.

Try looking at this page:
---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/REC-html401/strict.dtd">
<HTML>
<HEAD><TITLE>Te st page</TITLE></HEAD>
<BODY>
<DIV style="border:1 px solid green;width:350 px;height:300px ;">
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicA.png"><BR>
Some Text</A></DIV>
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicB.png"><BR>
Some more text</A></DIV>
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicA.png"><BR>
small text</A></DIV>
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicB.png"><BR>
Text that goes on for miles and miles</A></DIV>
</DIV>
</BODY>
</HTML>
---
The divs (no need to use spans, floats are automatically made block
elements) line up fine, and wrap to the next line when there isn't room
enough.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #6
Replace the first DIVs text wth the fourth's and this code breaks. See
here -> http://www.straffin.com/test/divtest.html

Thank you for your help... I really want to do this right (so it
*works* and is *standard*), but I'm just not seeing how...

- Akbar

On 10 Sep 2003 11:25:50 +0200, Lasse Reichstein Nielsen
<lr*@hotpop.com > wrote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/REC-html401/strict.dtd">
<HTML>
<HEAD><TITLE>Te st page</TITLE></HEAD>
<BODY>
<DIV style="border:1 px solid green;width:350 px;height:300px ;">
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicA.png"><BR>
Some Text</A></DIV>
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicB.png"><BR>
Some more text</A></DIV>
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicA.png"><BR>
small text</A></DIV>
<DIV style="width:10 0px;float:left; ">
<A HREF=""><IMG SRC="http://www.infimum.dk/privat/PicB.png"><BR>
Text that goes on for miles and miles</A></DIV>
</DIV>
</BODY>
</HTML>


Jul 20 '05 #7
Akbar <me@here.com> writes:
Replace the first DIVs text wth the fourth's and this code breaks. See
here -> http://www.straffin.com/test/divtest.html


Ah, well noticed. To avoid that, you must make every box the same
height, by setting the height property of the divs.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #8
On 11 Sep 2003 04:36:27 +0200, Lasse Reichstein Nielsen
<lr*@hotpop.com > wrote:
Akbar <me@here.com> writes:
Replace the first DIVs text wth the fourth's and this code breaks. See
here -> http://www.straffin.com/test/divtest.html


Ah, well noticed. To avoid that, you must make every box the same
height, by setting the height property of the divs.


And I can do that, but when I put this logic into my JavaScript, it
does the same thing the SPANs were doing.

This script --> http://www.straffin.com/test/dynamic.html
generates this HTML --> http://www.straffin.com/test/static.html
but they don't work/look the same. :(

I believe that DU had something whet he mentioned using CDATA, but I
cannot get that to work at all... it just gives syntax errors. There's
enough code that I could pull it out into an external file, but am not
sure how to do so.

Any pointers on the CDATA or external file stuff? :)

- Akbar

Jul 20 '05 #9
DU
Akbar wrote:


This script --> http://www.straffin.com/test/dynamic.html
generates this HTML --> http://www.straffin.com/test/static.html
but they don't work/look the same. :(

You have to first establish what you want here: an HTML 4.01 strict DTD
or an XHMTL 1 transitional DTD. Because I gave you numerous advices
based on the DTD you first chose. If you later remove that DTD, then
such advices if not removed will likely cause validation errors and
script errors.
I believe that DU had something whet he mentioned using CDATA, but I
cannot get that to work at all... it just gives syntax errors. There's
enough code that I could pull it out into an external file,
You do not need to create an external file. Creating an external .js
file (regardless of DTD) is recommendable when the .js file is likely to
be used again for other files; cached files save http connection trips
to the server.

but am not sure how to do so.
Don't worry, I have done this before and I still have an entire working
example in a file.

Any pointers on the CDATA or external file stuff? :)

- Akbar


This code works in Mozilla 1.5b, NS 7.1, Opera 7.20 and MSIE 6 for
Windows. I corrected a lot of misses in your code, removed unnecessary
variables, tuned their declarations and assignments and optimized the
code at several places. The color borders, commented out, are only there
for some visual feedback of the layout.
If you want all your <div>s to be on an horizontal line in MSIE 6 for
Windows as well, then you'll need to make some changes to the code.
Creating <div>s and adding a <br> to anchor objects certainly does NOT
seem to be necessary nor needed: I think it's only there to have the
text right under the image and links all lined up horizontally.

----------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />

<title>Creati ng dynamically an html file</title>

<style type="text/css">
p#validation img {width:88px; height:31px; margin:0 0.5em;}
</style>

<script type="text/javascript">
// <![CDATA[
function testDivs(sbody)
{
for (var iterator = 0; iterator < 7; iterator++)
{
var DOMobjImg = document.create Element("img");
DOMobjImg.src =
"http://www10.brinkster .com/doctorunclear/GRAPHICS/GIF/Wavey.gif";
DOMobjImg.width = "25";
DOMobjImg.heigh t = "29";
DOMobjImg.alt = ":)";
// DOMobjImg.alt = "Relevant meaningful alternate text";
var DOMobjA = document.create Element("a");
DOMobjA.href = "http://www.yahoo.com/";
DOMobjA.title = "Yahoo.com" ;
DOMobjA.appendC hild(DOMobjImg) ;
var br = document.create Element("br");
DOMobjA.appendC hild(br);

DOMobjA.style.m argin = "0 6px";
//DOMobjA.style.b order = "1px dashed green";
DOMobjA.appendC hild(document.c reateTextNode(" Anchor" + iterator));
var DOMobjDiv = document.create Element("div");
/* DOMobjDiv.id = iterator; Why give such div an id? */
DOMobjDiv.style .cssFloat = "left";
DOMobjDiv.style .width = "100px";
// DOMobjDiv.style .border = "1px dotted red";
DOMobjDiv.appen dChild(DOMobjA) ;
document.getEle mentById(sbody) .appendChild(DO MobjDiv);
};
var strTest = " < & ";
}
// ]]>
</script>

</head>
<body onload="testDiv s('scoobyDoo'); ">
<h1>Test</h1>
<hr />
<table border="2" frame="box" width="724" style="margin:0 auto;"><tr><td
id="scoobyDoo"> </td></tr></table>
<p id="validation" ><a href="http://validator.w3.or g/check/referer"><img
src="http://www.w3.org/Icons/valid-xhtml10.png" title="Verify this
page's markup syntax" alt="Valid XHTML 1.0!" /></a> <a
href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss" title="Verify this
page's CSS code" alt="CSS compliant" /></a></p>

</body>
</html>

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #10

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

Similar topics

5
9189
by: deko | last post by:
In regard to running php scripts with cron - Here is a sample script: <?php //debug.php echo "<br> This is a test"; ?> I can call debug.php from a web page on my site like this:
2
4888
by: DeepBleu | last post by:
When one is using an HTML form via a web broswer, the user submits the form contents and these are passed to a CGI Python script on the web server. I need to write a client script that connects to a web site, runs a Python CGI script on the web server AND passes a string to the CGI Python script that the Python CGI script can...
16
2064
by: Luca | last post by:
About one month ago I have inserted in my web site a clickcounter who controls the access to almost every link, but this script who changed the path in every link so the search engines couldn't recognize my links and my web site has lost a lot in search engines ranks; this is the script: <A...
14
1967
by: Pascal Damian | last post by:
My HTML pages have a <SCRIPT SRC=http://remote/script> at the top'ish of each page. Sometimes the remote host (probably due to heavy load or flaky network connectivity) doesn't respond for a long time. This causes the whole page to appear hanging without anything loading. Is there some trick I can use with settimeout() so that if the remote...
1
2592
by: ebrandmark | last post by:
I am trying to load a SCRIPT SRC tag that will result in a document.write into a specific location in my web page but not call for the SCRIPT SRC until the end of the page (so as not to delay the page). The DEFER method won't work because the document.write just starts a new page. I was hoping to leave a DIV where the result should end...
3
6525
by: pantagruel | last post by:
The following does not work in firefox: <script defer="defer"> var x=document.getElementsByName("repositoryNamespace") alert(x.length + " elements!")
11
3078
by: comp.lang.php | last post by:
On one of my sites, I have a TCL CGI script that has a security hole in spite of it having effective server-side validation (the fact that it's CGI IS its security hole). The front end is a PHP script, and I am writing server-side validation onto it, however, it is required to redirect to the TCL CGI script because only a CGI script has the...
17
2751
by: CES | last post by:
All, I was wondering if their is a way of loading an external script fill from within a script?? <script language="javascript" type="text/javascript"> function test(var){ <script language="javascript" src="../scripts/base.js" type="text/javascript" /> } </script> Obviously this would cause n error but this would give you an idea of what...
4
2285
by: 28tommy | last post by:
Hi, I'm trying to find scripts in html source of a page retrieved from the web. I'm trying to use the following rule: match = re.compile('<script + src=+>') I'm testing it on a page that includes the following source: <script language="JavaScript1.2"
4
2150
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is broken in Firefox 1.5.0.1 on OS X. What happens with the Scriptaculous library is this In the html document the author only has to include one...
0
7401
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.