?
Solved

Firefox, POST '#' symbol

Posted on 2011-03-15
3
Medium Priority
?
389 Views
Last Modified: 2013-12-13
Hello,

We currently had one of our programmers create a simple web inventory search application. After searching for part numbers and returning results, you are allowed to 'ADD' parts that you want by email.

Before going on to the email form, the part numbers are sent using POST. The email form should display all of the parts that were added but part numbers with a '#' symbol do not show up. This works fine in IE but not in Firefox.

I am told by the programmer that Firefox uses the '#' symbol as a separator therefore nothing can be done. Is this true? I'm sure there are ways to work around this and any advice or information would be greatly appreciated.

Thanks,
Kei
0
Comment
Question by:sflory
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Expert Comment

by:sjklein42
ID: 35140184
In the part number, you can first do a string replace of naked '#' symbols with '#'


http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 35140269
'#' is a reserved symbol and should be encoded in URIs.  http://en.wikipedia.org/wiki/Percent-encoding  You shouldn't count on it continuing to work in IE and it may not work in Chrome, Safari, or Opera either.  Here's the PHP page for doing that: http://us2.php.net/manual/en/function.urlencode.php
0
 
LVL 16

Expert Comment

by:sjklein42
ID: 35140367
Oh, the '#' is in the URL.  That makes more sense.  I couldn't figure out why it would be causing a problem in HTML.

As @DaveBaldwin correctly pointed out, in an URL, you would replace naked '#' symbols with '%23'

So instead of this:

www.mydomain.com/inventory.cgi?part=ABC#DEF

you would have this:

www.mydomain.com/inventory.cgi?part=ABC%23DEF

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question