Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-11-2008, 11:47 PM
jendelaniaga jendelaniaga is offline
Junior Coders
 
Join Date: Jul 2008
Location: Malaysia
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Question XML error message

My blog (http://jendelaniaga.blogspot.com)

Hi admin.
This is my first visit to your forum after using some of the scripts from your site. I have problem with some of them which was causing an error message showed up during preview i.e;
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 entity name must immediately follow the '&' in the entity reference.


I was trying to use the autumn and shaking button scripts but failed. Any help you might offer is very much appreciated.

Thanks
Reply With Quote
  #2  
Old 07-12-2008, 12:04 AM
thetestingsite's Avatar
thetestingsite thetestingsite is offline
The Guy That Moderates
 
Join Date: Sep 2006
Location: St. George, UT
Posts: 2,795
Thanks: 3
Thanked 156 Times in 154 Posts
Default

Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.


Usually that error has to do with links in the page that are passing variables. For example:

Code:
link.php?id=1&do=something
Should be written as so:

Code:
link.php?id=1&do=something
Hope this helps.
__________________
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
The Testing Site | Atomic Yeti
Reply With Quote
  #3  
Old 07-14-2008, 06:45 AM
jendelaniaga jendelaniaga is offline
Junior Coders
 
Join Date: Jul 2008
Location: Malaysia
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default Thanks and sorry

Hi Mod.
Thanks for your reply and sorry for the forgotten link.
Let me try this again.

link to the DD script
1.Shake Image script
2.Autumn leaves

These both scripts and some others produce the exactly same error message during the preview;
"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 entity name must immediately follow the '&' in the entity reference."

Your attention and update on this matter is very very much appreciated.

Last edited by jendelaniaga; 07-14-2008 at 06:49 AM. Reason: adding error message
Reply With Quote
  #4  
Old 07-23-2008, 11:57 AM
jendelaniaga jendelaniaga is offline
Junior Coders
 
Join Date: Jul 2008
Location: Malaysia
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi everybody.
Regarding the previously posted error message, it's fixed by replacing the '&&' character on the script to '&' Thanks to moderator. But another error message displayed during preview i.e;
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.

I'm not good at all with the computer language make it impossible for me to figure out what else should be done to make the script works on my site.

BTW, this is the original script I'm trying to use.
Code:
<style>
.shakeimage{
position:relative
}
</style>
<script language="JavaScript1.2">

/*
Shake image script (onMouseover)- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

//configure shake degree (where larger # equals greater shake)
var rector=3

///////DONE EDITTING///////////
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}

</script>
It's a script for "shaking image"

Hoping that someone could lend me a hand on this matter.
Thanks
Reply With Quote
  #5  
Old 07-23-2008, 03:30 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
Default

It might be the © symbol. Try replacing it with the word copyright:

Code:
/*
Shake image script (onMouseover)- 
copyright Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #6  
Old 07-23-2008, 05:20 PM
jendelaniaga jendelaniaga is offline
Junior Coders
 
Join Date: Jul 2008
Location: Malaysia
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi John.
Thanks for the advice but it didn't work. Maybe I'll just surf the entire forum for the similar problem (if there is any).
Thanks again.
Reply With Quote
  #7  
Old 07-23-2008, 08:13 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
Default

Well you shouldn't really be using xml, but that may not be an option with your blog package. Generally though, if a script is in an external file, it will not cause problems like that.

With xml, you can also use cdata comment blocks to tell the browser not to parse the script as xml:

http://www.w3schools.com/XML/xml_cdata.asp

One other thought I had is that - I don't know which agent is giving you those errors. Depending upon the agent, the errors you are reporting may have no effect upon the rendering of the page or upon the execution of the script.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #8  
Old 07-24-2008, 05:57 AM
jendelaniaga jendelaniaga is offline
Junior Coders
 
Join Date: Jul 2008
Location: Malaysia
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi John!! Thanks for the infos. I've tried using the cdata comment blocks. yup!! There was no more xml error message but, an attention mark appeared at the bottom-left corner of my browser indicating the syntax error and the image that supposed to shake didn't.
I'll check with my blog agent (blogger) on what should be done to make it possible to use this script on my site. Many thanks for spending your precious time on this problem, John.

P.S. In a glance i found that the w3schools.com is quite informative site that I can start learning XML from the beginning. Thanks for sharing.
Reply With Quote
  #9  
Old 07-24-2008, 07:52 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
Default

Well you are making progress! That new warning/error you got is just a common garden variety javascript error. If you put the script back on the page and let me know what image it is supposed to shake, I can probably fix that.

A little word of caution about w3schools. I've always found their information accurate, but there have been several complaints around here - nothing specific, of some inaccuracies (I think some of this at least is some kind of resentment about how popular the site is though). I have noticed cases where information that only applies to IE was given without making it as clear as I would like to see that it only applied to IE.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #10  
Old 07-24-2008, 12:08 PM
jendelaniaga jendelaniaga is offline
Junior Coders
 
Join Date: Jul 2008
Location: Malaysia
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi again john.
Your reply was really encouraging!! Do you really think that I'm making progress by having this 'syntax error'? Hopefully you're right, John.
Ok, lets get to the business. I pasted the script once again in the site and the codes in the image of the letter "J" under 'PENGENALAN'. (Don't ask why I want to animate this letter yeah ).

Else, I can just animating the letters using gif's animator like how i did with the letter 'H' but the file is several times bigger than it's original. I'll be very thankful if you can make this script works, John.

Any help you would offer is very very much appreciated.
Thanks.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:36 PM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.