Jump to content

Recommended Posts

Having trouble displaying data in an input field in Internet Explorer, Opera, and Apple Safari browsers but works fine in Firefox and Netscape.

The field is located in the websites shopping cart and gets its data via $_GET method when an item is added to the cart.

Any help as to why it wont display in IE at least would be greatly appreciated.

 

 

<input name="grand" type="text" id="grand" value="
<?php
if (($_GET['loc'] == "lcl") || ($ship_ref == 'lcl'))
{
echo '$'. ($grandTotal = number_format($totalCost, 2, ".", ","));
}
elseif (($_GET['loc'] == "nat") || ($ship_ref == 'nat'))
{
echo '$'. ($grandTotal = number_format($totalCost+4.50, 2, ".", ","));
}
elseif (($_GET['loc'] == "rul") || ($ship_ref == 'rul'))
{
echo '$'. ($grandTotal = number_format($totalCost+6.50, 2, ".", ","));
}
else
{
echo '$'. number_format($totalCost, 2, ".", ",");
} ?>" size="10" class="grandTotal" style="border:0pt none;" readonly />

 

 

IE shows <input name="grand" type="text" id="grand" value="$30.90" size="10" class="grandTotal" style="border:0pt none;" readonly />

so its there, I took out  class="grandTotal" style="border:0pt none;" readonly to see if that was it, but no, just displays an empty box in IE

 

FF shows <input name="grand" type="text" id="grand" value="$30.90" size="10" class="grandTotal" style="border:0pt none;" readonly /> and displays the value as expected.

thats not possible, if the only html source is:

 

<input name="grand" type="text" id="grand" value="$30.90" size="10" />

 

it will display... there must be something else going on.

 

 

please post all of the html source

Damn, just found the problem, it was because I had started the php on a new line....

doesnt work:

<input name="grand" type="text" id="grand" [b]value="
<?php[/b]
if (($_GET['loc'] == "lcl") || ($ship_ref == 'lcl'))
{

 

does work:

<input name="grand" type="text" id="grand" [b]value="<?php[/b]
if (($_GET['loc'] == "lcl") || ($ship_ref == 'lcl'))
{

 

someone slap me

 

Thanks for the help, sorry to have troubled you.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.