Error in the code

Discussion in 'CSS' started by aspirationz, Sep 12, 2008.

  1. #1
    Hi,

    I run a blogger blog which renders fine when loaded on Firefox however when I open the same page in IE, I get an error saying 'Invalid Character' and the line points to this particular piece of code.

    <form action='http://www.feedburner.com/fb/a/emailverify' method='post' onsubmit='window.open(\'http://www.feedburner.com\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true' target='popupwindow'>


    Could someone please let me know as to whats the problem with the code and rectify the code in accord to blogger
     
    aspirationz, Sep 12, 2008 IP
  2. rikun

    rikun Peon

    Messages:
    85
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try converting all the single quotes to double quotes, except the ones in the javascript call. Also, remove all the "\" before the single quotes in the javascript.

    <form action="http://www.feedburner.com/fb/a/emailverify" method="post" onsubmit="window.open('http://www.feedburner.com', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true;" target="popupwindow">

    Also, what's the "return true" for anyway? I don't think you need it. If you do, try putting both the "window.open" and "return true" in a javascript function that you can call from onsubmit.

    Hope that works for you.
     
    rikun, Sep 12, 2008 IP
  3. aspirationz

    aspirationz Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I tried implementing the code you had mentioned. Its working but I'm still getting an error on the same line while opening the page on IE.

    Could you please load http://www.intheorbit.com and check out as to what the problem is...The moment the page starts loading on IE, an error symbol starts flashing at the bottom left corner and finally when the page has been completely loaded a message flashes just beside the error symbol stating "Done but with errors."

    It would be really great if you could let me know as to where the problem lies.

    Thanks
    Ashutosh
     
    aspirationz, Sep 13, 2008 IP
  4. rikun

    rikun Peon

    Messages:
    85
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sorry, I really can't find what else could be wrong. I suggest moving all the css to a css file to make things easier to look through. Also, try removing the previous javascript to narrow down where the problem could be. IE isn't very accurate when it comes to javascript errors. Most of the time it says the error is on a certain line, when the real error is 10 lines before. If you remove all the javascript and the error goes away, then you know the actual error lies somewhere in the code you removed.

    I also suggest using the code that I posted previously, because the way you do it doesn't show up properly in firebug. This is what firebug sees:

    <form target="popupwindow" true;="" scrollbars="yes,width=550,height=520\');return" \="" ,="" popupwindow\="" www.feedburner.com\="" http:="" onsubmit="window.open(\" method="post" action="http://www.feedburner.com/fb/a/emailverify">

    It might not be the error, but it might cause errors further down the road.

    Sorry I couldn't be more help. I tried using firefox's firebug to see what the problem was, but it gave me no errors.
     
    rikun, Sep 14, 2008 IP