What does the error
Line 136, Character 50, expected ';'
mean?
This is line 136:
leftrightslide[0]='<a href="javascript:ajaxpage('links.htm', 'contentarea');"><img src="itemp/sp-airborne.gif" border=0
Your help is appreciated!
What does the error
Line 136, Character 50, expected ';'
mean?
This is line 136:
leftrightslide[0]='<a href="javascript:ajaxpage('links.htm', 'contentarea');"><img src="itemp/sp-airborne.gif" border=0
Your help is appreciated!
Well, looks to me like you're probably missing a semicolon at the end of the line.
However, it seems more like an error with quotes...
leftrightslide[0]='<a href="javascript:ajaxpage('links.htm', 'contentarea');"><img src="itemp/sp-airborne.gif" border=0...///finishline///....';
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Thanks for the reply! I tried putting a semicolon at the end of the line (no change) and then putting a semicolon at at various places. The error message changed when I eventually enclosed links.htm in semicolons. But then it said error, links.htm undefined.
There's got to be a way to make leftrightslide[0]='<a href="javascript:ajaxpage('links.htm','contentarea');"> act like leftrightslide[0]='<a href="mypage.htm">
leftrightslide[0]='<a href="javascript:ajaxpage(/'links.htm/',/'contentarea'/);">'
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
because that should be backslashes: \'
I got it to work with some help from madlemming at Tech Report:
leftrightslide[0]='a href=\"javascript:ajaxpage(\'contact.htm\', \'contentarea\');\">';
Thanks for everyone's help!
1. Each line must end with a semicolon.
2. Quotes come in pairs, enclosing things.
You cannot, for example, have:
'<a href="image.jpg">;
since you need to END the first single quote.
3. Neither quotes nor semicolons are to be placed randomly... they each have a specific purpose. Placing them in the wrong spot or in the wrong way will create an error. By doing what you said, placing it in the middle of the line, you CAN suppress the error by giving it a semicolon, but that will just create more problems because that semicolon does NOT belong there.
Basically.... semicolons only and always at the end of lines; quotes in pairs, always be sure they are.
I think the confusion here is that you were using javascript to write html that included javascript commands, thereby giving yourself several layers of quotes to deal with.
Glad it works.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Thanks for the the rules. They will come in handy for future problems.
Bookmarks