Jump to content

Problem with jquery, html, php


haku87

Recommended Posts

var test = $("#abc").html();

alert(test); //debugging purpose

 

$.ajax({

type: "GET",

url: ".././backend_php/management_php/createQuiz.php",

            data: "quizname="+test

........... more code ....

 

 

i get the textarea text using javascript stored into a variable called test.

when i alert the content in variable test.

the newline character still inside

 

However, when i passed the variable through GET (ie. "createQuiz.php?quizname= "+test

the newline character disappear when i insert into database.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.