Advertisement
DrupalCustom

javascripptt

Jan 31st, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function () {
  2.   $("#edit-status-list").change(function() {
  3.   var selectedStatus = $(this).find(":selected").text();
  4.   var charExists = ((window.location.href).indexOf('?') >= 0) ? true : false;
  5.  
  6.  if(charExists){
  7.  var split = (window.location.href).split('?');
  8.  var loc = split[0];
  9.  
  10.  loc = loc+"?status="+selectedStatus;  
  11.  self.location.href= loc;
  12.  
  13.  }
  14.  
  15.  else{
  16.   var locf = window.location.href+"?status="+selectedStatus;   
  17.   self.location.href= locf;
  18.  
  19.   }
  20.  
  21.   });
  22. });
  23.  
  24.  
  25.  
  26. $(document).ready(function () {
  27.   $("#create-freeway-project").submit(function() {
  28.     $(":submit", this).attr("disabled", "disabled");
  29.    
  30.   });
  31.  
  32.  
  33. });
  34.  
  35.     $(".common_link_class").click(function() {
  36.     alert("Hello");
  37.       // Set a click counter.
  38.       var count = ($(this).data("clicks") || 0) + 1;
  39.       $(this).data("clicks", count);
  40.      
  41.       // When someone clicks once just let them go on.
  42.       if ($(this).data("clicks") >= 1) {
  43.         // We could do some cleverness here but i dont feel like it at the moment...
  44.       }
  45.      
  46.       // More than one click and we dont do anything.
  47.       if ($(this).data("clicks") >= 2) {
  48.         // You could also leave a rude message here like ... actually i won't say :D
  49.         return false;
  50.       }
  51.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement