Error: invalid regular expression flag
b Source File:
http://localhost/media/javascript/global.js
Line: 4, Column: 19 Source Code:
url: /home/blog,
$("#blog").click(function () {
var url = $(this).attr("href");
$.ajax ({
url: /home/blog,
type: "POST",
success : function (html) {
$("#someDiv").appe...
Hi
i am trying to pass an array to ajax.Here is the code (productOptions is the ARRAY)
data: { action:'add',tblID : tblID, option:productOptions},
as far as i know whith this approach (using objects) jquery do the job BUT i dont get the option parameter at all (EXPLAIN BELOW).
NOTICE :
var productOptions=new Array();
productOp...
Hello,
I am trying to use the alsoResize option.
It works when I write this:
$(obj).resizable({ minHeight: 150, minWidth: 280, alsoResize: '.tab_content'});
but the problem is that it's resizing all 'tab_content' elements in the page.
I want it to be relative to 'obj' which also contains a 'tab_content',
I tried: alsoResize: $('.tab...
Hi all,
I have yet another JS issue ...grrr. Bear with me, I am a hopeless JS newbie.
I am receiving "missing ) after argument list" error in firebug with the code below:
<script type=\"text/javascript\">
function add( answer )
{
$.post('../page.php?cmd=view&id=3523', {user_id: 3523, other_user_id: 2343}, function(d)
$(...
Hi,
I'm loading in content using an iframe via a menu with jquery which is updating
the 'src' attribute of the iframe to then load in the desired page. Each of the
pages have their own javascript includes and heavy content.
The code is as follows:-
$(document).ready(function() {
loadPage('main.php');
});
function loadPage(url) {
...
Hello,
I recently came accross some blog posts about jQuery performance (i.e. http://net.tutsplus.com/tutorials/javascript-ajax/10-ways-to-instantly-increase-your-jquery-performance/) and it was stated in all of them that we should cache the jQuery objects to javascript variables.
What I need to know, though, is if this applies to $(th...
Suppose the event is e. How to know where it happened (as in position)?
I'm also using jQuery.
...
Hi all,
Hope you can help.. am using http://bassistance.de/jquery-plugins/jquery-plugin-validation/ in an ASP.NET MVC project on an address entry form.
I'm really trying to find out whether there is some kind of conflict between the Validation Plugin and webkit browsers (e.g. Safari, Chrome), or between jQuery and webkit browsers, befo...
Hello,
I have this code to try and call a method from my controller in codeigniter,
$("#Blog").click(function () {
var url = $(this).attr("href");
$.ajax ({
url: "index.php/home/category",
type: "POST",
success : function (html) {
$("#right-content").append(html);
}
});
}...
Is it possible to somehow shorten this code:
var i=GetStringFromServer('/url');
if(i){
$('#Div1').hide();
$('#Div2').show();
}
else{
$('#Div1).show();
$('#Div2).hide();
}
In C# I'd simply do this:
bool smth=GetBool();
_el1.Visible=smth;
_el2.Visible=!smth;
Is it possible to mimick the logic in JavaScript?
UPDATE: Thank...
Hi Everyone, I have some java script that work behind a navigation menu, the user clicks the nav button, and some AJAX fires and brings in some HTML, what I want is for if that same link is clicked again then the content that was loaded in by that specific button is removed from the markup.
Does anyone have ideas? My code currently stan...
I have the following values from a form being accessed by jQuery using .val():
var un0 = $("input.e0").val();
var un1 = $("input.e1").val();
var un2 = $("input.e2").val();
var un3 = $("textarea.e3").val();
The original values in those from elements have been added earlier on by a different script that loops the values from AJAX XML da...
Look this code guys:
<script type="text/javascript">
$("#<?=$delete_uid?>").click(function() {
var id = $("#<?=$grid_uid?>").jqGrid('getGridParam','selrow');
alert(id);
if(id == null) {
$.jGrowl("No selected Item");
return;
}
confirm('Caution','Delete current selected item?', function(result) {
...
Hi Guys,
I have a rich:dataTable. I want to hide a row with this code:
<c:if test="#{not empty documents && documents.size!=0}">
<rich:jQuery selector="#_inboxTable_ tr"
query="ready(function() {
jQuery.noConflict();
if ( jQuery(this).find('checkboxStatus').attr('checked', true)) {
...
I am using jquery validation plugin with php on ubuntu.
I am applying validation on my forms like this:
$(obj).find("form").validate();
When I set "email" as class of any text field and I give it a wrong formated email address, it show the following error like this.
Please enter a valid email address.
Question: Above message is ve...
I have a html form. I want to take the input value (a url), extract a number from the url using regex ( '/[0-9]{5,}/') , and then refresh the form value with the number extracted and appended to another url. If I can't find a number - I just want an error to appear in the form box. All using Jquery to avoid page reload.
This is the ex...
Given the following code, jQuery seems to only alert "1" as the value even after the user has selected radiobutton 2. What am I missing here? Shouldn't the trailing jQuery alert "2" when the second radiobutton is selected?
<p>
Coal <input type="radio" name="example" value="1" checked />
Candy <input type="radio" name="example" val...
I've been trying to get this working for the last hour, but I can't for the life of me, so I thought i'd ask here.
I have this code:
<ul id="myCarousel">
<% foreach (var date in entryDates)
{ %>
<li>
<div style="text-align:center;width:60px;">
<span class="headerSpan" id="day_<%=date.ToString("dd-MM-yyyy")%>">abc</span>
<...
Hello,
I have a a link that looks similar to this
<a href="/home/category/blog/1" id="blog">Blog</a>
As you can the link has an ID of 'blog' what I want to do is to create an div on the fly with the ID from the link that was clicked so if the 'blog' is clicked, then the markup would be
<div id="blog">
<!--some content here-->
</div...
I would like to know what's the best way to limit ajax call / time.
I'm running the following js function when the user mouseover a table row.
function load()
{
$.ajax({
type: "GET",
url: "process/ajax.php",
data: "action=action,
success: function(msg)
{
if(msg!='')
...