Announcement

Collapse
No announcement yet.

Javascript dependence

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Originally posted by gabrielcrowe View Post
    what i think norman is saying, is that your php is not embedded into the page, its called by a script tag.

    replace the script tag with your code and see what happens.
    Ha
    Ok so I should have said that the call to the php call was embedded not the code itself which indeed does resides on the server.

    The point I was trying to make was that you can call php from the browser whilst displaying the page so reducing the time lag.

    Malcolm

    SellerDeck Accredited Partner,
    SellerDeck 2016 Extensions, and
    Custom Packages

    Comment


      #47
      I do hope you agree that the following snippet is php code
      It certainly is PHP code (although it returns a file of JavaScript code which then has to be executed again on the client's PC). What it isn't is "embedded PHP" that returns HTML - the type most people think of when they talk about PHP on the server.

      A couple of bugs. From a search highlighted page, I tried to add a review and got bounced to

      Highlight page name not specified.
      Please wait for your browser to forward you to the next page or click here.



      You also need to use htmlentities($line['review'], ENT_QUOTES) and htmlentities($line['reviewer'], ENT_QUOTES) on the customer input as single quotes in their response will break the JavaScript strings. And it will also stop them embedding hacker HTML.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #48
        My suggested fix (untested partial code only - also removes several redundant lines)
        Code:
        		$pic = "rating" . $line['rating'] . ".gif";
        		$toBeInserted = '<img src="' . $pic . '" />';
         		$toBeInserted .= '<br/>' . htmlentities($line['review'], ENT_QUOTES) . '<br/><br/>';
        		$toBeInserted .= "Reviewed by <i>" . htmlentities($line['reviewer'], ENT_QUOTES);
         		echo "document.write('$toBeInserted </i><br/><br/><br/>');";
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #49
          Originally posted by NormanRouxel View Post
          It certainly is PHP code (although it returns a file of JavaScript code which then has to be executed again on the client's PC). What it isn't is "embedded PHP" that returns HTML - the type most people think of when they talk about PHP on the server.

          A couple of bugs. From a search highlighted page, I tried to add a review and got bounced to

          Highlight page name not specified.
          Please wait for your browser to forward you to the next page or click here.



          You also need to use htmlentities($line['review'], ENT_QUOTES) and htmlentities($line['reviewer'], ENT_QUOTES) on the customer input as single quotes in their response will break the JavaScript strings. And it will also stop them embedding hacker HTML.
          The code is experimental at the moment, thanks for the pointers.

          Malcolm

          SellerDeck Accredited Partner,
          SellerDeck 2016 Extensions, and
          Custom Packages

          Comment


            #50
            For anyone who's wondering what we're talking about here's my 2005 post regarding using PHP within a <Script ...> tag to return JavaScript as a somewhat kludgy way of using PHP on the Perl based pages.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #51
              Just been listening about safari 4 which has much faster java rendering so obviously apple see java as the future.

              Comment


                #52
                yes, the execution speed is quite awesome.

                there are some impressive demos, of 3d spaces and such running on javascript alone.

                its certainly helping a more media rich space.

                Comment


                  #53
                  40 times faster than ie7 they are saying!

                  Comment


                    #54
                    JavaScript

                    Running JavaScript faster than IE7 is not difficult--just try a few browsers like Firefox and Google's "Chrome". Makes IE7 seem like a clapped out tortoise.
                    I think all the different variations on a theme of JavaScript are going to be a big part of the future structure of the "web experience".
                    Steve Griggs.

                    "People in business often miss opportunities, mainly because they usually arrive dressed in overalls and looking like work."



                    www.kitchenwareonline.com
                    www.microwave-repair.co.uk

                    Comment


                      #55
                      It's also much faster than firefox and chrome

                      Comment


                        #56
                        Going back to the original question, I don't want Actinic to become JS dependent for core functionality. We already have several customers who call us because they have cookies disabled and we have no idea how many don't bother to call!
                        Alan Johnson

                        Quality Parrot Cages & Accessories by Parrotize UK
                        Pet Accessories by Animal Instinct

                        Comment


                          #57
                          send them here and tell them to quit whining

                          its going to end up where people need to make 2 sites.

                          What about people browsing with lynx? i'll bet we dont format pages for those poor image-less souls. And how about blind people?

                          there are more blind people in the uk than there are french people, so why do we transslate our sites and yet still fail accessibility

                          i think that JS should stand fast with javascript, and even, go a little further. I mean, since we already use it for some key functions, then why not go the whole hog?

                          if actinic can run without js enabled, then thats fine, but i dont see the problem with adding some flair when we already rely on things like cookies and such.

                          Comment


                            #58
                            Originally posted by animal dreams View Post
                            We already have several customers who call us because they have cookies disabled
                            This may not be a javascript issue.

                            Their security settings may have disabled cookies, which is much more likely.

                            Comment


                              #59
                              Many of my add-ons use JavaScript. There are lots of them out there and I truly cannot recall getting any complaints.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment


                                #60
                                Stumble across this useful script

                                http://xtrafile.com/products/js-aio-packer/

                                Might come in handy considering javascript is becoming more the norm
                                "If my answers frighten you then you should cease asking scary questions"

                                Comment

                                Working...
                                X