Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
jquery mobile update div tag
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jenna_s  
View profile  
 More options Nov 3 2012, 3:42 pm
From: jenna_s <jenna.sim...@gmail.com>
Date: Sat, 3 Nov 2012 12:42:50 -0700 (PDT)
Local: Sat, Nov 3 2012 3:42 pm
Subject: jquery mobile update div tag

Hi,

I'm hoping there's Rails developers who are working with jquery mobile and
can help me out with this simple thing. I'm trying to update a div on a
page with an Ajax call and it doesn't work. If I call jquery directly from
the browser, the div gets updated. However, if I call it through a remote
call, the div remains unchanged. Here's my code:
<div data-role="content">
  <div class="content-primary">
    <div class="mydiv">something</div>
    <div><a href="#" onclick="$('.mydiv').html('hello');">click</a></div>
<!-- this works -->
    <div><%= link_to foobar_url, :remote => true, :method => :put,
'data-ajax' => 'false' do %>click<% end %></div> <!-- this doesn't-->
  </div>
</div>
def foobar
  respond_to do |format|
    format.mobile { render :layout => false }
  end
end
$('.mydiv').html('world'); // in foobar.mobile.erb

I don't understand jquery that well, let alone jquery mobile. I tried
adding .page() and .trigger('create') like I've found on some posts, but
that didn't do anything. Also, I made sure that the cache tag was not used.

TIA,
J


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
thil  
View profile  
 More options Nov 5 2012, 12:04 am
From: thil <thil.1...@gmail.com>
Date: Sun, 4 Nov 2012 21:04:58 -0800 (PST)
Local: Mon, Nov 5 2012 12:04 am
Subject: Re: jquery mobile update div tag

Hi,

Can you post error your getting that will help you where exactly error is?.
And Instead of link have you tried simple Ajax call like $.ajax() .


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jenna_s  
View profile  
 More options Nov 8 2012, 2:17 am
From: jenna_s <jenna.sim...@gmail.com>
Date: Wed, 7 Nov 2012 23:17:37 -0800 (PST)
Local: Thurs, Nov 8 2012 2:17 am
Subject: Re: jquery mobile update div tag

Thanks for replying. There is no error. The Ajax content is sent back to
the browser but it doens't get executed. What exactly is the simple Ajax
call syntax?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »