noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 18/219: remove href=javascript:void(0) + Html


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 18/219: remove href=javascript:void(0) + HtmlInput::generate_id replaced by uniqid
Date: Mon, 18 Dec 2017 13:22:28 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 09336b256a47de10ce1612872465fbac1de73043
Author: Dany De Bontridder <address@hidden>
Date:   Sun Jul 23 13:16:58 2017 +0200

    remove href=javascript:void(0)  + HtmlInput::generate_id replaced by uniqid
---
 include/lib/html_input.class.php | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php
index 3aaf145..bb794ad 100755
--- a/include/lib/html_input.class.php
+++ b/include/lib/html_input.class.php
@@ -503,14 +503,14 @@ class HtmlInput
      address@hidden $p_class CSS class of the button
      address@hidden $p_symbole raw symbole to add to the action message
      */
-    static function 
button_action($action,$javascript,$id="xx",$p_class="button",$p_symbole="")
+    static function 
button_action($action,$javascript,$id=NULL,$p_class="button",$p_symbole="")
     {
-        if ($id=="xx"){
-            $id=HtmlInput::generate_id("xx");
+        if ($id==NULL){
+            $id=uniqid("xx");
         }
-               $r="";
-               $r.='<input type="button" id="'.$id.'" class="'.$p_class.'" 
onclick="'.$javascript.'" value="'.$p_symbole.h($action).'">';
-               return $r;
+        $r="";
+        $r.='<input type="button" id="'.$id.'" class="'.$p_class.'" 
onclick="'.$javascript.'" value="'.$p_symbole.h($action).'">';
+        return $r;
 
     }
     /**
@@ -521,7 +521,7 @@ class HtmlInput
      */
     static  function image_click($p_image,$p_js,$p_message)
     {
-        $ret=sprintf('<a class="nav" style="display:inline" 
href="javascript:void(0)" title="%s"><img src="image/%s" onclick="%s"></a>',
+        $ret=sprintf('<a class="nav" style="display:inline" title="%s"><img 
src="image/%s" onclick="%s"></a>',
                 $p_message,$p_image,$p_js);
         return $ret;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]