News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Workaround For Problem Posting Code With "Chr (34)"

Started by Visio Guy, April 28, 2008, 08:58:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visio Guy

Hi All,

I've found that code snippets with "Chr (34)" in them causes this error:

Your session timed out while posting. Please try to re-submit your message.
No subject was filled in.
The message body was left empty.


and won't enable you to post.

The easy workaround is to add a space, ie: "Chr (34)"

I've had this problem on the blog as well, must be a PHP thing?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Lars-Erik

O that must be why it wouldn't let me post! I fixed it by inserting a screen shot of my VBA code.
I've tested it on my Wordpress install, but it seems to be no problem, Wordpress wont allow PHP in posts though (not without a plugin).

Anyway, good to know theres a workaround

jastronomy

Think of this like DOS.

Strings must have quotes around them if the whole string is made of up of multiple characters/words that are separated with a space.

String = "My Value"

When programming you can include quotes in two ways:
Lets be crude and use VBS to write 2 Variables inside a HTML formatted file, using: oFile.WriteLine
The title is written without quotes, and the string is written with quotes in two different ways - both are valid.
oFile.WriteLine " <html> "
oFile.WriteLine " <head> "
oFile.WriteLine " <title>" & sTitle & "</title> "
oFile.WriteLine " </head> "
oFile.WriteLine " <body lang=EN-GB link=blue vlink=blue> "
oFile.WriteLine " Method 1: " & """ & sString & """
oFile.WriteLine " Method 2: " & chr(43) & sString & chr(34)
oFile.WriteLine " </body> "
oFile.WriteLine " </html> "


I don't know exactly about PHP; but it's effectively a HTML/on-the-fly with server side ASP/VB/Javascript processing... so they should be similar.

Hope it helps.

william slaney

oFile.WriteLine " Method 2: " & chr(43) & sString & chr(34)

A problem of dyslexia, 43 should be 34

Yacine

Correcting such an old post shows a certain tendency to necrophilia. ;) :D
Yacine

Visisthebest

Still very good to keep old posts updated, sometimes you overlook these small typos losing a lot of time debugging something so straightforward.
Visio 2021 Professional

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 248 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1174KB.
Tokens: post-login.
Cache hits: 13: 0.00214s for 26,766 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]