ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Help With Safecracker & Javascript It produces

March 22, 2011 1:01pm

Subscribe [4]
  • #1 / Mar 22, 2011 1:01pm

    Spicer Matthews

    2 posts

    Hi All,

    Just started to play with Safecracker since I understand it is replacing the Stand-Alone Entry Form. Had never used it before. It is pretty cool.

    I am having one issue. Maybe a stupid mistake. When Safecracker adds the javascript magic at the bottom of the form it writes the url to the javascript with “&” instead of “&” and of course the web server is not happy with that. So it is getting encoded somewhere.

    <a href="http://example.com/index.php?ACT=35&ampui=core,widget,mouse,position,draggable,resizable,button,dialog,datepicker&plugin=scrollable,scrollable.navigator,ee_filebrowser,markitup,thickbox&ampv=1298488869">http://example.com/index.php?ACT=35&ui=core,widget,mouse,position,draggable,resizable,button,dialog,datepicker&plugin=scrollable,scrollable.navigator,ee_filebrowser,markitup,thickbox&v=1298488869</a>

    Screen Shot: http://www.cloudmanic.com/~spicer/skitch/souce-code-20110322-085408.jpg

    Any ideas?

    Thanks.
    ~Spicer

  • #2 / Mar 22, 2011 1:15pm

    Mark Huot

    587 posts

    Spicer, the & should, actually, be encoded as *amp; as your example shows. What kind of errors are you getting? Is the Javascript not loading? If so you may also want to check your Firebug/Inspector to see if there are any Javascript errors on the page.

  • #3 / Mar 22, 2011 1:50pm

    Spicer Matthews

    2 posts

    Howdy,

    Thanks for the fast reply.

    http://www.cloudmanic.com/~spicer/skitch/url-20110322-094621.jpg

    Error: “The URI you submitted has disallowed characters.”

    Works just fine when I replace the “amp” with “&”. I think it is getting messed up on the “;” in “&”

    http://www.cloudmanic.com/~spicer/skitch/url-20110322-094815.jpg

    Thanks.

  • #4 / Mar 22, 2011 1:53pm

    Mark Huot

    587 posts

    Ah, but how did you get to that first screenshot? Did you copy and paste the URL directly from viewing the source?

    Firefox/Safari/IE/etc… should all be smart enough to translate the *amp; in the source into an actual & in the URL when they request the file. Is the script not loading into your HTML page?

  • #5 / Mar 23, 2011 7:53am

    John Henry Donovan

    12339 posts

    Thanks Mark,

    Spicer Matthews, could you also tell us what version of EE and SC you are using?

  • #6 / Mar 24, 2011 5:37pm

    Spicer Matthews

    2 posts

    Thanks for the help gang. I think I found some sort of bug but I can not recreate it, nor do I remember what version I was on.

    So I upgraded to the latest version of chrome and all problems went away. Also, I did not have the problem in other browsers.

    Problem solved…...sort of.

    Thanks.

  • #7 / Mar 25, 2011 10:05am

    Sue Crocker

    26054 posts

    Good that it’s working for you again… if you do need to re-open this particular thread, feel free to.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases