Solved

Firefox, POST '#' symbol

Posted on 2011-03-15
3
387 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 83

Accepted Solution

by:
Dave Baldwin earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
The viewer will learn how to count occurrences of each item in an array.
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…

734 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