Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
90% Quality Score
Upvotes Received
7
Posts with Upvotes
7
Upvoting Members
7
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
0 Endorsements
Ranked #818
~26.7K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.

63 Posted Topics

Member Avatar for wonderland

One solution is you can check it's url. if (window.location.href.indexOf('url') >= 0) { //change logo for domain name with 'url' } else { // change logo for the other domain } or you can check it using this method if (document.domain === 'domain') { //change logo for domain name with …

Member Avatar for owen101
0
2K
Member Avatar for amit.chaudhari.71

I'm not sure what you really want but try this. In your JavaScript code, submit the name of your employee via form and perform an ajax call so as to not refresh the page. Requirements: jquery framework (widely used js framework that rocks!) - http://jquery.com/download/ jquery ujs so as to …

Member Avatar for amit.chaudhari.71
0
407
Member Avatar for abby.arnett.12

Is there a requirement whether you could use a framework like jQuery or just the native one?

Member Avatar for Member #905211
0
300
Member Avatar for thetwig

+1 to pritaeas.. I suggest you also want to look at using `$('#contact-form').serializeArray()` method which will return an array of names and values from elements on your form rather than selecting your form elements over and over.

Member Avatar for thetwig
0
339
Member Avatar for aldm

Don't you want to put your code inside the initializer? Codes inside the initializer folder only run once whenever the application starts.

Member Avatar for lambing
0
229
Member Avatar for techyworld

Basically when you click a next button, you pass some parameters (e.g. {:page => 2}) to your backend, then your backend will then do the query on the set of data you are going to display. Let's say per page you display 10 records you do some query like this. …

Member Avatar for lambing
0
208
Member Avatar for timwhelan

In addition, that is a ternary operator in JavaScript, just want to let you know. It saves a lot of lines by the way.

Member Avatar for lambing
0
184
Member Avatar for jeffcogswell
Member Avatar for pooran.c

First of all, you don't need to use javascript to hide the logindiv upon load of the page. You may add a class "hide" or add an inline style to make the container hidden. I'm not sure why is the logindiv is hiding after an error is shown upon looking …

Member Avatar for lambing
0
226
Member Avatar for andyhunter

Why don't you provide a class on the body tag to identify if you are on this page rather than check your current url. e.g. <html> <body class="somesite"> </body> </html> and in your javascript you do this $('#menu a').each(function() { if ($('body.somesite').length) { $(this).addClass('current'); } });

Member Avatar for Member #905211
0
122
Member Avatar for McLaren

Use "this" this - refers to the element who clicked it or you may use the event obj. e.g. (this) console.log('element who clicked', this); e.g. (event) $('.clear_all_slip').click(function(event) { console.log('target', event.target); });

Member Avatar for McLaren
0
146
Member Avatar for venkyb47

I agree to AleMonteiro and gon1387, you should try using what they suggested. Make sure the elements are loaded first before manipulating them.

Member Avatar for venkyb47
0
152
Member Avatar for bobtutos

Badoo has a better way of making those images protected, how, they add some text on the images they render.

Member Avatar for lambing
0
128
Member Avatar for Farhad.idrees
Member Avatar for lambing
0
394
Member Avatar for Riu 2009

Looking at the code, I guess you shouldn't provide the "value" attribute unless you placed something other than an empty string. I'm not sure if that would help though. Another tip, it's a best practice to always validate required fields on your backend. It is not safe to just put …

Member Avatar for jstfsklh211
0
278
Member Avatar for jimmyye0h
Member Avatar for NardCake

I'm not sure what the problem might be, but window.location.href = "http://www.friendster.com" is absolutely working fine across browsers.

Member Avatar for NardCake
0
11K
Member Avatar for ratanji

you could use jquery.validate plugin. You can set different ways of displaying your validation. It's pretty handy and you'll have a consistent look and feel of your validations across the site. http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Member Avatar for Taywin
0
156
Member Avatar for erik216

I'm not sure why would you want to use JavaScript for making a dropdown. You can use css for this one. But here's what you need if you need a script. This is a sample markup: <div id="link-wrapper"> <a href="#" id="link">Hover to show div</a> <div class="hide" id="some-div"> <ul> <li> <a …

Member Avatar for lambing
0
141
Member Avatar for asaidi

Ruby is the best, use Rails it's a web framework and it's super easy to implement. It will change the way you code and it's community is growing bigger. Most of the projects in github are written in ruby :)

Member Avatar for lambing
0
74
Member Avatar for rotten69

here's an article regarding your question that might help you understand primitive vs object data type http://javascriptweblog.wordpress.com/2010/09/27/the-secret-life-of-javascript-primitives/

Member Avatar for Taywin
0
181
Member Avatar for vizz
Member Avatar for vizz
0
376
Member Avatar for Travus

You may override the default containers for the validation which might help you manipulate the provided error message with your own styling. $('.contact').validate({ errorClass: 'invalid', errorElement: 'label', wrapper: '<div class="error-inline" ></div>', }); probably the plugin has default css or markup which causes it to have line breaks

Member Avatar for Travus
0
1K
Member Avatar for rajaravi

What kind of modal window do you want to reload? What are it's content? Be specific, precise and tell more details of the things you want to happen.

Member Avatar for rotten69
0
84
Member Avatar for Violet_82

JavaScript is an essential part of a web site, I think there are no more supported devices that are aren't using JavaScript. just refactoring some code above, but that really works even without testing: $("a.someclass span").click(function(){ window.location.href = $(this).parent().attr('href'); });

Member Avatar for jwelsh
0
142
Member Avatar for kb5220
Member Avatar for blumonde
Member Avatar for smoothe19

you could jQuery's extend method. var obj1 = {"cool":"34.33","alsocool":"45454"}; var obj2 = {"coolness":"34.33"}; $.extend(obj1, obj2); The value of the first object will contain obj2. console.log(obj1); The above statement will log something like this: {"cool":"34.33","alsocool":"45454", "coolness":"34.33"} If you don't want to use jQuery, you can try the native and easy way …

Member Avatar for Airshow
0
237
Member Avatar for rotten69

like_add.php is inside the folder ajax in your server. it will handle your ajax request, it is the backend of your ajax call.

Member Avatar for lambing
0
205
Member Avatar for my3h

using jQuery it easy to get what you need. <tr> <td><?php echo $entry_shippingtype; ?></td> <td> <select name="type" id="category"> <option value="free">Free Shipping</option> <option value="flat">Flat Rate Shipping</option> <option value="weight">Weight Based Shipping</option> </select> </td> </tr> <tr> <td><?php echo $entry_shippingamount; ?></td> <td><input type="text" id="shipping-amount" name="shippingamount" value="<?php echo $shippingamount; ?>" /></td> </tr> On load of …

Member Avatar for Airshow
0
110
Member Avatar for Ritesh_4
Member Avatar for Member #952511

Open a chrome browser and press Ctrl+Shift+I. Then go to console tab and paste your code and hit enter, that should do it.

Member Avatar for lambing
0
169
Member Avatar for rotten69

looking at the code I guess the "coke, pepsi" is not a property of array.drinks object. It's a value of the array.drinks property. If you want to get pepsi or coke, you can try sepp2k suggesstion of using a split method for strings.

Member Avatar for AleMonteiro
0
109
Member Avatar for arunthewolf

getContext is available for html5 only. You should declare the doctype on top of your file. <!DOCTYPE html> <html> <head> </head> <body> </body> </html> hope that works

Member Avatar for lambing
0
241
Member Avatar for rotten69

JavaScript is not as strict as C# or probably java in terms of initializing an array with a specified number of elements.

Member Avatar for sepp2k
0
235
Member Avatar for dinners

I'm still kind of confused with what you want to happen. But here I go, if you wanted to redirect a page using a javascript function, you may call window.location.href = 'url'; Then once you've redirected that user to the page and wanted to run some javascript function base on …

Member Avatar for dinners
0
246
Member Avatar for simplypixie

What is the response you see when you log the response? Check the response in firefox using firebug or chrome's development tool. My guess is, the mail function probably returns some value which adds another response to the 'success'.

Member Avatar for simplypixie
0
305
Member Avatar for spyece

you should trigger the plugin masonry again to resort the page. you can specify a callback function for infinite scroll e.g. $('element').infiniteScroll({}, function(newElements) { // newElements are the set of elements fetched after ajax call // you may retrigger masonry to resort the new set of elements added. var $newElements …

Member Avatar for lambing
0
269
Member Avatar for vijayram

Basically the server is responding with an ERROR that is why every request you did alerts an error message. Check your url in your AJAX call, are you really going to use the value of the input? Why not put the url on some data attribute

Member Avatar for lambing
0
138
Member Avatar for Neetumishra

Use firebug in firefox or chrome's web development tool, see the console tab and you can see the specific error occured.

Member Avatar for lambing
0
96
Member Avatar for lambing

is it possible to access an Iframe without a source in IE8 and setting it's content? (e.g. iframe_obj.contentWindow.document) For example I wanted to get the head tag inside that dynamically created iframe: iframe_obj.contentWindow.document.getElementsByTagName('head') Then setting it's content: iframe_obj.contentWindow.document.getElementsByTagName('head')[0].appendChild(dom_obj);

0
62
Member Avatar for riahc3

use jquery cookie plugin, it's easy to set and retrieve a cookie. https://github.com/carhartl/jquery-cookie it's almost 2kb only. Set an expiring cookie: $.cookie('the_cookie', 'the_value', { expires: 7 }); Set a session cookie: $.cookie('the_cookie', 'the_value'); Retrieve that cookie: $.cookie('the_cookie'); Delete that cookie: $.cookie('the_cookie', null); So simple yet effective. You can store any …

Member Avatar for fobos
0
643
Member Avatar for lambing

Does anyone knows how to make a particular website their default home page when they click the button "Make this site your homepage" using javascript. This sample code works in IE, but other browsers doesn't know this code. [CODE] this.style.behavior = 'url(#default#homepage)'; this.setHomePage('http://localhost/getuptodate/php/getuptodate.php'); [/CODE] Could someone help me in figuring …

Member Avatar for raZEel
0
199
Member Avatar for lambing

Hi guys, I have a page and inside that page I have an iframe which occupies 60% of the page. Now inside this iframe, I have a button that when i click it, it opens up a [B]modal box[/B]. I am currently using jquery ui modal dialog, could anyone help …

0
82
Member Avatar for dougancil

I can't see comment on your code. it's purely images.. and you are using a table. Never use a table in your html layout. Use the div tag instead

Member Avatar for Armadillo
0
248
Member Avatar for cguan_77

try SNIP I think it's the fastest free web hosting site, give you bigger space than any other web hosting sites.

Member Avatar for happygeek
0
109
Member Avatar for desmondo

try this.. 1. Reboot your system 2. Press F8 and go on to safemode 3. Login using the administrator account 4. Go to control panel and look for the useraccounts or right click my computer then go to manage, then look for the users and click on your useraccount. Right …

Member Avatar for jbug
-1
253
Member Avatar for sharonig

Do you know callback in JavaScript? Using callbacks you can popup a form and after it focusing on a particular element. Callbacks are functions executed after performing a particular operation.

Member Avatar for Taywin
0
91
Member Avatar for shadiadiph

Hi, I have done this before, writing a text on a diva.. wow, it's really cool. So how would you do that? First, you must have a div element and a form with an input type text. You must set the width and the height of the div element to …

Member Avatar for lambing
0
704
Member Avatar for Ankur_tces

jquery has its own ajax function, you could try it instead of using a dll file. I do not recommend you to use the '$' alias for jquery function. Instead, declare a new jquery alias variable, let's say var j = jQuery.noConflict(); - this is now equivalent to jQuery(selector); = …

Member Avatar for Ankur_tces
0
177

The End.