Click here to Skip to main content
15,888,330 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionhow to post webform asynchronously(with image upload) without using server side control Pin
Member 770211029-Jun-13 1:45
Member 770211029-Jun-13 1:45 
AnswerRe: how to post webform asynchronously(with image upload) without using server side control Pin
Dennis E White1-Jul-13 5:15
professionalDennis E White1-Jul-13 5:15 
Questionjava script Pin
noorh00727-Jun-13 7:24
noorh00727-Jun-13 7:24 
AnswerRe: java script Pin
Dennis E White27-Jun-13 7:38
professionalDennis E White27-Jun-13 7:38 
QuestionWhat do you think of this? Pin
Super Lloyd27-Jun-13 3:17
Super Lloyd27-Jun-13 3:17 
AnswerRe: What do you think of this? Pin
Dennis E White27-Jun-13 7:31
professionalDennis E White27-Jun-13 7:31 
GeneralRe: What do you think of this? Pin
Super Lloyd27-Jun-13 15:20
Super Lloyd27-Jun-13 15:20 
QuestionOnpage pagination is not working Pin
Md Shariful Islam Saful26-Jun-13 8:01
Md Shariful Islam Saful26-Jun-13 8:01 
I have a pagination page.At the first time, data and pagination links are generated from the server and shown them in my view.I have a drop down list.For every next time I want change the data and pagination links whenever dropdown list is changed without loading the page with jquery,ajax,json.I have successfully changed the data and links.I have created the pagination links as per first time server returns.But this time i can't trigger the ul>li>a element.I don't know why !!!.But the same js2 code works for the pagination which the server returns.

Html:server returns

HTML
<div class="pagination">
    <ul>
       <li class="disabled"><a >1</a></li>
       <li><a href="http://localhost:8070/poralekha/home/universities/5">2</a></li>
    </ul>
 </div>

This works .

JS1:for pagination:

JavaScript
var pagination=" ";
  pagination+="<ul >";

  for(var i=1; i<=data['varsities'].length ;i++)
    {
        pagination+="<li class='disabled'>";
        pagination+="<a href='#' class='page'  >";
        pagination+=i;
        pagination+="</a>";
        pagination+="</li>";

    }
   pagination+="</ul>";

  $('.pagination').html(pagination );


here class='page' has been used for just get the value of i when .page is clicked

Js2:common for both pagination

JavaScript
$(".pagination > ul >li > a").click(function(event){
       event.preventDefault();
       alert("This index is clicked.");
   });

or

JavaScript
$(".page").on('click', function(event){
          event.preventDefault();
          alert(" clicked.");
      });


In short i want trigger when .page is clicked. I am just about to be mad with this.How can i solve this plz? Thanks.

modified 26-Jun-13 16:12pm.

AnswerRe: Onpage pagination is not working Pin
Dennis E White26-Jun-13 15:14
professionalDennis E White26-Jun-13 15:14 
QuestionUsing a switch statement to count variables in an array Pin
tristarterror24-Jun-13 11:09
tristarterror24-Jun-13 11:09 
AnswerRe: Using a switch statement to count variables in an array Pin
fixthebugg24-Jun-13 11:35
fixthebugg24-Jun-13 11:35 
AnswerRe: Using a switch statement to count variables in an array Pin
lmf232s24-Jun-13 12:07
lmf232s24-Jun-13 12:07 
AnswerRe: Using a switch statement to count variables in an array Pin
Manfred Rudolf Bihy24-Jun-13 20:06
professionalManfred Rudolf Bihy24-Jun-13 20:06 
QuestionVariables not showing correctly in HTML Pin
tristarterror24-Jun-13 9:17
tristarterror24-Jun-13 9:17 
AnswerRe: Variables not showing correctly in HTML Pin
dusty_dex24-Jun-13 9:45
dusty_dex24-Jun-13 9:45 
GeneralRe: Variables not showing correctly in HTML Pin
tristarterror24-Jun-13 10:16
tristarterror24-Jun-13 10:16 
GeneralRe: Variables not showing correctly in HTML Pin
dusty_dex24-Jun-13 10:55
dusty_dex24-Jun-13 10:55 
Questionhow make a skype call by getting a phone number from textbox Pin
Pasqualissimo23-Jun-13 12:20
Pasqualissimo23-Jun-13 12:20 
QuestionMSN style links Pin
Bart23-Jun-13 10:20
Bart23-Jun-13 10:20 
AnswerRe: MSN style links Pin
thanh_bkhn23-Jun-13 16:09
professionalthanh_bkhn23-Jun-13 16:09 
GeneralRe: MSN style links Pin
Bart25-Jun-13 10:22
Bart25-Jun-13 10:22 
QuestionHow to show info marker google maps when clicked in outside map? Pin
Akbarblack22-Jun-13 4:12
Akbarblack22-Jun-13 4:12 
AnswerRe: How to show info marker google maps when clicked in outside map? Pin
Dan Randolph23-Jun-13 8:55
Dan Randolph23-Jun-13 8:55 
GeneralRe: How to show info marker google maps when clicked in outside map? Pin
Akbarblack10-Dec-13 20:32
Akbarblack10-Dec-13 20:32 
QuestionShopping Cart Qty Button - I need to make it faster Pin
jkirkerx21-Jun-13 11:16
professionaljkirkerx21-Jun-13 11:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.