473,394 Members | 1,750 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,394 software developers and data experts.

Blogger template rejects javascript loop

Jim
I'm a newbie so I'm probably doing something simple and dumb but I just
can't get Blogger to accept a JavaScript for/next loop.

Here's what I've tried

<Script Language='JavaScript>
{
for (var i = 0; i < 16; i++)
{
Code to do stuff here with checkboxes. But, no matter what I put
here, including nothing, Blogger says this for/loop code is not formed
correctly.
}
}
</Script>

Is there something wrong with my syntax here or is it just a Blogger thing?

Any help would be greatly appreciated.
Nov 14 '07 #1
6 3621
On Nov 14, 4:43 pm, "Jim" <jc...@NOJUNKMAILsbcglobal.netwrote:
I'm a newbie so I'm probably doing something simple and dumb but I just
can't get Blogger to accept a JavaScript for/next loop.

Here's what I've tried

<Script Language='JavaScript>
{
for (var i = 0; i < 16; i++)
{
Code to do stuff here with checkboxes. But, no matter what I put
here, including nothing, Blogger says this for/loop code is not formed
correctly.
}}

</Script>

Is there something wrong with my syntax here or is it just a Blogger thing?
Why are there curly braces surrounding your 'for' loop?

Nov 14 '07 #2
On Nov 14, 4:43 pm, "Jim" <jc...@NOJUNKMAILsbcglobal.netwrote:
I'm a newbie so I'm probably doing something simple and dumb but I just
can't get Blogger to accept a JavaScript for/next loop.

Here's what I've tried

<Script Language='JavaScript>
{
for (var i = 0; i < 16; i++)
{
Code to do stuff here with checkboxes. But, no matter what I put
here, including nothing, Blogger says this for/loop code is not formed
correctly.
}}

</Script>

Is there something wrong with my syntax here or is it just a Blogger thing?
Also, there's no end quote after 'Javascript

....you may want to add that.

Nov 14 '07 #3
Jim
nolo, here is my actual code without the stuff in the middle. My missing
single quote was just a typo.

<Script Language='Javascript'>
//Gets a count
function getcount(form)
{
for ( var i = 0; i < 16; i++)
{
(stuff to do)
}
}
</Script>

Like I said, I'm a newbie and trying to piece javascript out using web
tutors.

Here's the error message from Blogger:
Your template could not be parsed as it is not well-formed. Please make sure
all XML elements are closed properly.
XML error message: The content of elements must consist of well-formed
character data or markup.

All elements are closed. I've checked and double checked. Without the
above code Blogger saves my template.

How would you write this loop.

Thanks,
Jim

"nolo contendere" <si********@fmr.comwrote in message
news:11*********************@o38g2000hse.googlegro ups.com...
On Nov 14, 4:43 pm, "Jim" <jc...@NOJUNKMAILsbcglobal.netwrote:
>I'm a newbie so I'm probably doing something simple and dumb but I just
can't get Blogger to accept a JavaScript for/next loop.

Here's what I've tried

<Script Language='JavaScript>
{
for (var i = 0; i < 16; i++)
{
Code to do stuff here with checkboxes. But, no matter what I put
here, including nothing, Blogger says this for/loop code is not formed
correctly.
}}

</Script>

Is there something wrong with my syntax here or is it just a Blogger
thing?

Why are there curly braces surrounding your 'for' loop?

Nov 14 '07 #5
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 11/14/2007 8:08 PM:
>think about it, read the above again, think about it, and then shut up.

No matter how many times I "think about it" or "read the above again",
it won't change the fact that your reply was useless and irrelevant.

Now, had you bothered to even come close to answering the question, well
it would change some things.
I could explain it to you, but you would not understand.
PointedEars
Nov 15 '07 #6
Thomas 'PointedEars' Lahn said the following on 11/15/2007 5:10 AM:
Randy Webb wrote:
>Thomas 'PointedEars' Lahn said the following on 11/14/2007 8:08 PM:
>>think about it, read the above again, think about it, and then shut up.
No matter how many times I "think about it" or "read the above again",
it won't change the fact that your reply was useless and irrelevant.

Now, had you bothered to even come close to answering the question, well
it would change some things.

I could explain it to you, but you would not understand.
You are a pathetic excuse sometimes.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 15 '07 #7

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

Similar topics

21
by: Sebastian Faust | last post by:
Hi, is a construction like the following possible: template<class view_model> class template_clase { protected: template_clase() {} virtual ~template_clase() {}
3
by: Gianni Mariani | last post by:
I was a little surprised by this: It seems like the code below should not compile but the Comeau 4.3.3 compiler accepts it and the gcc 3.4(prerel) compiler rejects it and MSVC++7.1 ICE's. ...
6
by: Mike Alexeev | last post by:
What is the correct syntax for default values to member function templates? Here is my example: 1 struct A 2 { 3 typedef int typeA; 4 }; 5 6 struct...
1
by: J.T. Conklin | last post by:
I've been working on the configuration infrastructure for the ACE framework which contains code that uses a templatized handle/body idiom with placement new/delete. With g++ 3.4, we found that the...
6
by: Alex | last post by:
I've a problem with following simple code (not really usefull): //--------------------------------------------------------------------------- #pragma hdrstop #include "stdio.h" #include...
11
by: Johan | last post by:
Hi Can somebody explain to me why I get this warning message and how I can solve this warning message. Thanks a lot Johan In member function `void
1
by: Kai-Uwe Bux | last post by:
Hi folks, I would like to know which clause of the standard rules out this: template < typename eval > struct recursive_template { typedef typename eval::enum_type Enum;
1
by: Tarik Monem | last post by:
Here's the code for the index.xml file on the blogger <?xml version="1.0" encoding="<$MTPublishCharset$>"?> <rss version="2.0"> <channel> <title><$MTBlogName remove_html="1"...
1
by: JaceyBlue | last post by:
Hi, I am using a Blogger template and I modified the colors and that's it. You can View Source Code here: http://vipgossip.blogspot.com I'd like to change the black background to this image...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.