Just a little POST/GET FYI ...
Beau Schwabe
Posts: 6,573
Perhaps this is old news to some of you, but it hung me up last weekend...
When you post or get data i.e. ....
http://{Some valid IP address}:{Some valid Port Number}/{text}
... some characters in the 'text' can cause problems. for example a # (pound sign) if you send something like...
http://192.168.0.1:3333/This is a test
... it will come through just fine, however if you send something like ...
http://192.168.0.1:3333/This is test #5
... the # plus anything to the right of it will truncate, so on the receiving end all you see is...
This%20is%20test%20
... Anyway, just an FYI I thought I would share, and my own suspicion why I'm having similar issues with 'Smart Phone' data submissions. I'll setup a test page this weekend to show you an example.
When you post or get data i.e. ....
http://{Some valid IP address}:{Some valid Port Number}/{text}
... some characters in the 'text' can cause problems. for example a # (pound sign) if you send something like...
http://192.168.0.1:3333/This is a test
... it will come through just fine, however if you send something like ...
http://192.168.0.1:3333/This is test #5
... the # plus anything to the right of it will truncate, so on the receiving end all you see is...
This%20is%20test%20
... Anyway, just an FYI I thought I would share, and my own suspicion why I'm having similar issues with 'Smart Phone' data submissions. I'll setup a test page this weekend to show you an example.

Comments
Can't you just send %23 for the "#"?
-Phil
-Phil
HTML
<form action="post.htm" method="post"> <div class="content"> <h2>Submit</h2> <label for="name">Name:</label> <input type="text" name="name" /> <input type="submit" name="submit" value="Submit" /> <div id="placeholder"></div> </div> </form>FireFoxIE
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>POSTing to the Server</title> <script language="javascript" type="application/javascript"> function htmlEncode(target) { var tag = document.getElementById(target); var str = escape(tag.value); tag.value = str; return true; } </script> </head><body> <div style="width:600px;margin:auto;"> <form id="post" name="post" method="get"> <input id="led" type="text" name="led" /> <input type="submit" name="Submit" onClick="return htmlEncode('led')" value="Click Me!" /> </form> </div> </body>DataToSend = DataToSend.replace(/#/g,"%23");
The code below would normally live on a traditional server and send data to a custom server such as the Spinneret.
<!doctype html> <meta http-equiv='X-UA-Compatible' content='IE=EmulateIE7' > <!-- Emulate Internet Explorer version 7 compatibility --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>POSTing to the Server</title> <script LANGUAGE='JavaScript'> function FormSubmit(form) { var PageID = "[Parallax Test]"; // Create an ID, so the server knows the data source // var DataToSend = PageID // Initialized Data to Send // DataToSend += "["+form.Comment.value+"]"; // append Data to send // form.Comment.value = ""; // Clear field, so that when the server returns us // // the next person in line does not see the data. // DataToSend = DataToSend.replace(/#/g,"%23"); // replace all # signs with %23 // WindowID = window.open("http://24.253.241.231:8890/"+DataToSend,"_self",""); // Send data to server // } </script> </head><body> <div style="width:600px;margin:auto;"> <form id="post" name="post" method="get"> <P align=center> <input type="button" name="Submit" onClick="FormSubmit(this.form);" value="Click Me!" /> Please leave your comments in the box below.<br> <textarea rows=10 cols=60 id=Comment name='Comment'></textarea> </P> </form> </div> </body>