dcsimg
www.webdeveloper.com
Results 1 to 10 of 10

Thread: using Ajax, Javascript and CSS... problem

  1. #1
    Join Date
    Feb 2004
    Posts
    92

    using Ajax, Javascript and CSS... problem

    I am using AJAX to let people checking out to add a new address to have the products shipped to, they click on add a new address and it pops up a window using overlib the javascript program, which is not a new browser window but it does use the CSS on the main page.

    They go through the setup of the new address then when they click 'save' it gives them a success message and tells them to click here to update the address list.

    I have it when they click on that, then Ajax goes in the back ground and gets a new list of the addresses and updates the <span tag to show those.

    It works, however, the css or style tags do not seem to work.
    After it did not work, I tried using style tags and putting the main code from the class in it and removing the class field in the <td cell.
    That did not work either.

    Any idea as to why it would not work?

  2. #2
    Join Date
    Sep 2008
    Location
    Mexico
    Posts
    786
    My crystal ball is very cloudy this morning.... could you post a link to the problem? Then someone might be able to lend a hand.

  3. #3
    Join Date
    Feb 2004
    Posts
    92
    Sure...

    You'll have to create a free account, feel free to, then just let it auto delete, no need to keep it or even put real data, we won't require you to validate your email either so feel free to put a fake but properly formatted email address in there;
    http://www.wholewellnessclub.net/powerhouse
    That is my account so you can create an account there.
    once there click "Join our Club"
    select join for free, after you create the account you can login then click on any of the order links and add a product to the shopping cart then click on the Checkout now, and you'll see what I'm talking about when you click on the Add an Address link

    If you have any questions, please let me know.
    Richard

  4. #4
    Join Date
    Sep 2008
    Location
    Mexico
    Posts
    786
    Thanks, but I have no desire to join your club.
    Maybe you'll find somebody else willing to though!
    Good luck!

    Just a thought.... it could be helpful to fix your html (191 Errors, 79 warnings) and css BEFORE going any further.
    Might be just a silly quirk of mine, but I believe that any page that has that many errors for whatever reason really should receive some attention before you ask for help.

  5. #5
    Join Date
    Feb 2004
    Posts
    92
    where do you see 191 Errors, 79 warnings ?
    Thanks
    Richard

  6. #6
    Join Date
    Sep 2008
    Location
    Mexico
    Posts
    786

  7. #7
    Join Date
    Feb 2004
    Posts
    92
    Ok, maybe I'm old school, but how in the world is this an error:
    Line 401, column 69: XML Parsing Error: EntityRef: expecting ';'
    …sclub.net/index.cgi?pg=products&pcode=301&tp=0&sess_id=0cae3f7c326c7e31d83e39

    it shows the e in pcode=301 is where the error is...
    That is all part of a link inside an:
    HTML Code:
    <a href="insidehere.html?howcanthis=1&causeanerror"></a>
    link... That makes no since to me.

    Any thoughts on that one? there are a TON of errors like that one, all inside href links.

    thanks again.
    Richard

  8. #8
    Join Date
    Sep 2008
    Location
    Mexico
    Posts
    786
    Old school would catch it right away... "&" in an address needs to be "&amp;" in XHTML... instructions are right on the validation page. Some of this is coming from your javascript.... fix it there. if the "&" is from a php output.... either correct it in the script or change the arg_separator.output to "&amp;" in your php.ini file or via .htaccess. Sorry, but spelling and punctuation count more in xhtml and xml than in html4.

    Use swfobject or something similar to embed your flash... old school again.

  9. #9
    Join Date
    Feb 2004
    Posts
    92
    Thank you for that. I have been writing my own HTML websites since 1995 and I don't ever recall using encoded html... with that said, I never used code validators, I only looked at the html in all the browsers I had installed to see if there were issues. That is the only way I did it.

    Anyhow, I guess since I am self taught that is why there are so many errors.

    Anyhow, I still do not understand most of these errors.
    what does this mean:
    Line 438, column > 80: XML Parsing Error: AttValue: " or ' expected
    Here is the line it has a problem with:
    …"Click to verify BBB accreditation and to see a BBB report." style="cursor:po…

    Here is the whole line it has a problem with:
    HTML Code:
    <script language="JavaScript">
    		document.write('<img align="right" title="Click to verify BBB accreditation and to see a BBB report." style="cursor:pointer;cursor:hand;" onclick="window.open(\\'https://www.bbb.org/online/consumer/cks.aspx?id=$_bbbId\\',\\'BBB\\',\\'width=600,height=500,top=50,left=50,menu=no,location=no,statusbar=no,resizable=yes,scrollbars=yes\\'); return false;" border=0 src="$_imgurl/images/bbbsealh1US.gif" alt="Click to verify BBB accreditation and to see a BBB report."/>');
    		</script>
    Where can I find what those errors mean?
    Thank you.
    Richard

  10. #10
    Join Date
    Sep 2008
    Location
    Mexico
    Posts
    786
    XHTML has a few different rules than HTML, is a little stricter, but more flexible...
    The validators aren't perfect and are sometimes misleading in descriptions of a problem... the only way to use a validator effectively is to fix the errors starting at the top of the list... some "errors" aren't really errors, but are seen as such due to real errors in syntax that came before them. It is probably finally picking up a ";" to go with all the "&".

    Most people are self-taught in html/xml/xhtml/css. There wasn't anybody around to start teaching this stuff as it started. I learned the "hard way" too, and started teaching some of it part-time about a decade ago using my own notes and experience. New things to learn every day for all of us!
    Last edited by opifex; 11-26-2009 at 09:16 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles