Help - Search - Members - Calendar
Full Version: browser preference
HTMLHelp Forums > Web Authoring > General Web Design
Mindapolis
Hi, I have seen websites that says works best with a specific browser. Is this a good practice? I have a website that the paypal buy now button will only display in firefox. Is it okay to request users to use firefox?
pandy
No. It's a bad practice stemming from the days of the browser wars.
Darin McGrew
QUOTE
Is this a good practice?
It was bad practice back when I first saw sites telling you to use Netscape Navigator 2. It's still bad practice.

If your site's content/services require certain features, then it's reasonable to require the use of a browser (any browser) that supports those features. But that doesn't seem to be the case here.
Mindapolis
The reason I'm asking is I'm developing a site that has a paypal buy now button and the button displays fine in firefox but not in IE.
Mindapolis
i'm working with the validator right now and what does this error message mean?

Line 363, character 50:

... data: "petName2=<?=$petName2;?>&age2=<?=$age2;?>&breed2=<?=$ ...

CODE

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function AddDog() {
            if (document.checkOut.moreDogs.checked) {
                $.ajax({
                    type: "POST",
                    url: "addDogDetails.php",
                    data: "petName2=<?=$petName2;?>&age2=<?=$age2;?>&breed2=<?=$breed2;?>&nutritionalNeeds2=<?=$nutritional_needs2;?>&specialInstructions2=<?=$special_instructions2;?>",
                    success: function(rData) {
                        $('#order tr#DgLast').after(rData);
                    }
                });
            }
            else {
                $('.NewDogDetails').remove();
            }
        }
    </script>
pandy
QUOTE(Mindapolis @ Apr 17 2012, 02:45 AM) *

The reason I'm asking is I'm developing a site that has a paypal buy now button and the button displays fine in firefox but not in IE.


We understood that. Fix it so it works in IE.


QUOTE(Mindapolis @ Apr 17 2012, 03:01 AM) *

i'm working with the validator right now and what does this error message mean?

Line 363, character 50:

... data: "petName2=<?=$petName2;?>&age2=<?=$age2;?>&breed2=<?=$ ...

CODE

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function AddDog() {
            if (document.checkOut.moreDogs.checked) {
                $.ajax({
                    type: "POST",
                    url: "addDogDetails.php",
                    data: "petName2=<?=$petName2;?>&age2=<?=$age2;?>&breed2=<?=$breed2;?>&nutritionalNeeds2=<?=$nutritional_needs2;?>&specialInstructions2=<?=$special_instructions2;?>",
                    success: function(rData) {
                        $('#order tr#DgLast').after(rData);
                    }
                });
            }
            else {
                $('.NewDogDetails').remove();
            }
        }
    </script>



The validator chokes on your JS. It doesn't validate JS, it sees it as peculiar HTML. Use an external script file.
Darin McGrew
QUOTE
We understood that. Fix it so it works in IE.
And in Chrome, Safari, Opera, etc.
Mindapolis
Ok I'm new to javascript so if this is a stupid question I apologize. When I'm copying that script to an external file, does the following code need to go in the external file?


CODE

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">


QUOTE(pandy @ Apr 16 2012, 09:09 PM) *

QUOTE(Mindapolis @ Apr 17 2012, 02:45 AM) *

The reason I'm asking is I'm developing a site that has a paypal buy now button and the button displays fine in firefox but not in IE.


We understood that. Fix it so it works in IE.


QUOTE(Mindapolis @ Apr 17 2012, 03:01 AM) *

i'm working with the validator right now and what does this error message mean?

Line 363, character 50:

... data: "petName2=<?=$petName2;?>&age2=<?=$age2;?>&breed2=<?=$ ...

CODE

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function AddDog() {
            if (document.checkOut.moreDogs.checked) {
                $.ajax({
                    type: "POST",
                    url: "addDogDetails.php",
                    data: "petName2=<?=$petName2;?>&age2=<?=$age2;?>&breed2=<?=$breed2;?>&nutritionalNeeds2=<?=$nutritional_needs2;?>&specialInstructions2=<?=$special_instructions2;?>",
                    success: function(rData) {
                        $('#order tr#DgLast').after(rData);
                    }
                });
            }
            else {
                $('.NewDogDetails').remove();
            }
        }
    </script>



The validator chokes on your JS. It doesn't validate JS, it sees it as peculiar HTML. Use an external script file.

Mindapolis
I copied and pasted the body of the html document in the validator and I'm still getting a lot of errors dur to the php code that is involved. There were several times when it said there was a missing closing tag so I went through the entire code and made sure every tag had a closing tag but still the buy now button won't appear in internet explorer. Any advice?
Darin McGrew
The validator doesn't know anything about PHP, or Perl CGI, or Java servlets, or any other mechanism for generating HTML. All it knows is HTML.

Don't try to validate the PHP program. Instead, validate the HTML that the program produces.
Mindapolis
Got it working
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.