Killersites Community: build a content management system javascript issue - Killersites Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

build a content management system javascript issue

#1 User is offline   Joker 

  • Group: Member
  • Posts: 10
  • Joined: 22-June 10

Posted 16 March 2012 - 08:25 PM

Hi guys, I have an issue that I'm coming up with on the content management system setup, I have built out a pretty decent (I think anyways lol) cms from this setup, & have found an issue that is kinda baffling me... I know why, but not sure what to do about fixing it....

if I type

"info &nbsp; hello <h1 id="bummer">"

in a wysiwyg, or a textbox (maybe even a oneline, not sure) I will get in a print_r($_POST)

Array
(
[uri] => ticketing
[block] => content_maincontent
[field] => info
[nbsp;_hello_ "bummer">
)

I know it has to do with the javascript that builds the datastring, but how to resolve this issue?

var dataString = 'uri=' + uri + '&block=' + block + '&field=' + content;

thanks! Scott
0

#2 User is offline   Joker 

  • Group: Member
  • Posts: 10
  • Joined: 22-June 10

Posted 16 March 2012 - 08:42 PM

also just for info to help, when I do a print_r(array_keys($_POST)); I get:


Array
(
[0] => uri
[1] => block
[2] => field
[3] => nbsp;_hello_


showing that it actually made another array value because of the & in the field.
0

#3 User is offline   Ben 

  • View blog
  • Group: Administrators
  • Posts: 5,412
  • Joined: 19-December 08
  • LocationChico, CA

Posted 17 March 2012 - 08:14 AM

Take a look here: http://www.killersit...h__1#entry26818
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
0

#4 User is offline   Joker 

  • Group: Member
  • Posts: 10
  • Joined: 22-June 10

Posted 17 March 2012 - 12:12 PM

Thanks Ben, I'll give those fixes a try. Php I'm pretty fluent in, javascript I'm still a bit shaky on... :) I hope to give you a copy of my completed project to browse & give constructive criticism on. Thanks for creating a great tutorial.
0

#5 User is offline   Joker 

  • Group: Member
  • Posts: 10
  • Joined: 22-June 10

Posted 17 March 2012 - 11:18 PM

got it working great now, used the {id: id, field: content} method.

Thanks again for the help
Scott
0

#6 User is offline   Ben 

  • View blog
  • Group: Administrators
  • Posts: 5,412
  • Joined: 19-December 08
  • LocationChico, CA

Posted 17 March 2012 - 11:53 PM

Good to hear. I'm glad you found the series useful. =)
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users