How can I remove the hash sign (#) from the page's URL ?
I am using the SWFAddress plugin (jQuery) for deep linking purposes.
I need to replace this
localhost/site/#blog
by
localhost/site/blog
(Yes, #blog is just an anchor).
Somehow url rewriting in .htaccess doesn't work
RewriteRule /blog #blog [L]
Any suggestions ?
...
I have a view with the flexigrid component on it. When the view calls the mickey_mouses_controller#new action, the flexigrid component calls mickey_mouses_controller#grid_data action (via localhost:3000/mickey_mouse/grid_data) and returns the relevant json objects correctly.
However, when I submit my view so the ActiveRecord validations...
i am getting all checkboxes that are in an html table using this code and i need to find the current row in the table from the current checkbox.
var checkboxes = $("form :checkbox");
for (i = 0; i <= checkboxes.length; i++) {
var checkbox = checkboxes[i];
///need to get current r...
Im trying to make a system that informs the user of any new private messages, the index method of the messages controller creates to instance variables of @messages and @newmessages, both are used in index.html.erb and i want to make it so that index.js.erb makes the flash message box on my site appear.
Ive got jquery to run a function ...
Is it better (in any way) to use jQuery's getScript to load the external JS than linking the javascripts manually in the html?
...
I heard somewhere that its better to write this:
$(document).ready(function() {
$('a').append('<strong>Hello</strong>');
});
instead of this:
$(document).ready(function() {
$("a").append("<strong>Hello</strong>");
});
But the last one, is the way that its written in the official documentation of jQuery.
So which gives mor...
Basically I want to append <span></span> inside the anchor tag but outside of "home". I guess it should be easy but I just started using jQuery.
So this:
<li class="home"><a href="index.php">home</a></li>
Should end up like this with Jquery:
<li class="home"><a href="index.php"><span>home</span></a></li>
My HTML:
<ul id="navigati...
All that the user is typing must be inserted to a div instead of a input field or a textarea.
Btw. the user don't have to click anywhere to start typing, the user can just do it without any action.
Sorry if it isn't understandable. (I'm not very good at english).
Thanks in advance.
...
I have a simple system that refreshes a div every few seconds:
$(document).ready(function() {
$("#nownext").load("response.php");
var refreshId = setInterval(function() {
$("#nownext").load('response.php?randval='+ Math.random());
}, 20000);
});
Now, because of what the content is, it is more likel...
I want to load in <div class="test"> some content from another URL ex: http://someurl.com/default.aspx.
I tried this code:
$(".test").load( 'http://someurl.com/default.aspx');
But it doesn't work.
With local file it works, but not with http://...
Can somebody help me?
Thanks
...
function load_result()
{
$.getJSON( "http://somesite.com/loadresult.php", function(data) {
if( data == undefined || data == null )
{
console.log( "no data" );
clearTimeout( lr_timeout );
lr_timeout = setTimeout( "load_result()", 2000 );
return;
}
insert_r...
I tried to call bit.ly API using this jQuery script:
$.get('http://api.bit.ly/shorten?login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f52f629d2d71bf07&version=2.0.1&longUrl=www.wordpress.com', function(data) {
alert(data);
});
but firebug said "405 Method Not Allowed". What's wrong? Thanks a lot.
...
Hi
I have in my c# code a class with 3 properties.
public class Sender
{
public string Id {get; set;}
public string html {get; set;}
public string AnotherField {get; set}
}
So I have a list collection.
List<Sender> test = new List<Sender>();
So I return this as a Json result in my view
public Json myView()
{
return Js...
Explanation of scenario:
I have a jquery window that will load up with a map control. This map control is a shared control in an asp.net MVC application. The way I've been told by Jquery developers is to use a $('').load(''); function to call into a controller which returns the control. Is this the best way? If so, how do i use the cont...
I'm using the ASP.NET login control and I'm displaying a jQuery throbber when the submit button is clicked. This works fine, but the throbber is visible if client side validation fails and the button is invisible, so the user cannot re-submit the form. How do I hide the throbber if client side validation fails?
...
Hi this is an example of my code. I want to get the margin-top from all the "divs" contained in the div appointmentContainer.
<div class="appointmentContainer">
<div style="width: 940px; z-index: 8; background-color: yellow; position: absolute; margin-top: 0px;" class="a_162">
<a id="a_162" class="appointments">414<br/></a>
...
i want to get back an array of all:
hidden inputs
text inputs
select inputs
checkboxes
I see this page but it seems like you have to query for checkboxes seperately
is there anyway to have one selector get everything in one array?
...
I'm using jQuery Multiple File Upload Plugin to upload several pictures. But form posts only 1, top, item. Fiddler (POST):
POST /Images/UploadImages HTTP/1.1
Host: localhost:4793
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6
Accept: text/html,application/xhtml+xml,application/xml;q=...
Hi,
I have a multiple select box with options group like:
<select id="sel_salaryrange" name="salaryranges[]" size="8" multiple="1">
<optgroup label="PKR" class="PKR">
<option value="1">15000 - 20000</option>
<option value="2">18000 - 35000</option>
<option value="3" selected="selected">50000 - 100000</option...
$("#submit_js").click(function() {
var commentmsg = $('#comment').val();
$.post(
"user_submit.php",
{comment: $("#comment").val(), aid: imgnum, uid:$("#uid").val()},
function(data){
/*alert(data);*/
//$('#greetings').html('Your choice was submit...