Re: Passing string variable to HTML TITLE tag fails within Netscape but works well within IE.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just what I was looking for --  thank you.    Putting together an entirely
dynamic site was difficult enough -- I need to avoid doing any EXTRA stuff
when ever possible.

Again, thanks.


THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED.
IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER
IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

-----Original Message-----
From: Howard Picken <howard@tasfamily.net.au>
To: php-db@lists.php.net <php-db@lists.php.net>
Date: Wednesday, October 16, 2002 1:51 AM
Subject: RE:  Passing string variable to HTML TITLE tag fails within
Netscape but works well within IE.


>Hi Darrian
>
>Have had similar problems.  I got around it by
>wrapping all posted variables with rawurlencode().
>
>This replace any spaces or special characters with an nasi equiv
>ie space with %20.  IE will ignore it.
>
>GL
>
>Howard
>  -----Original Message-----
>  From: Darrian Walker [mailto:dwalker@healthyproductsplus.com]
>  Sent: Wednesday, 16 October 2002 1:10 PM
>  To: php-db@lists.php.net
>  Subject:  Passing string variable to HTML TITLE tag fails within
>Netscape but works well within IE.
>
>
>  Passing string variable to HTML TITLE tag fails within Netscape but work
>  well within IE.
>
>  I have a single page consisting of inventory items to be sold. When an
>item
>  is selected, it passes the product name to a DETAIL page as part of the
>  TITLE tag for the DETAIL page. My problem is: Netscape does not like the
>  SPACES between the text and refuses to display the DETAIL page.
>
>  Initially, I thought there might be some way to parse the string and add
>the
>  ascii code for SPACE, but I wasn't sure if I was on the right track. Does
>  anyone have a proven solution to this problem?
>
>  I thought the pseudo code might look something like this:
>  <?php
>  function
>  parse_and_change(&grab_string){
>      $string_holder=$grab_string;
>      while stepping through the characters in this $string_holder
>          { if character = " " (or some other representation)
>              replace it with something that doesn't
>              scare netscape or title tag
>          }
>  return $string_holder;
>  }
>  ?>
>
>  <?php
>  if (isset($HTTP_GET_VARS["itemname"])) {
>      $title = (parse_and_change($HTTP_GET_VARS["itemname"] ));
>      }else{
>      $title="Generic Product Title";
>  }
>  ?>
>
>  <html>
>  <title><?php echo $title ?> </title>
>  </html>
>
>
>
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux