i trying assign class tag via jquery, resulting in error through firebug says "invalid assignment left-hand side" on fourth line below. <cfoutput> $('.pngfix a').each(function(index) { var hreflink = $(this).attr("href"); if (hreflink.tolowercase() = '../audio.cfm') { $(this).addclass('audioimg'); } }); </cfoutput> looking around online, looks syntax problem, don't seem see it... any tips? thanks if (hreflink.tolowercase() = '../audio.cfm') that attempts assign value, rather check equality. change = operator == .
i need display gallery of photos. here template: @(photos: list[photo]) @title = { <bold>gallery</bold> } @main(title,"photo"){ <ul class="thumbnails"> @for(photo <- photos) { <li class="span3"> <a href="#" class="thumbnail"> <img src="@photo.path" alt=""> </a> </li> } </ul> } and here controller method: public static result getphotos() { return ok(views.html.photo.gallery.render(photo.get())); } and here photo bean : @entity public class photo extends model { @id public long id; @required public string label; public string path; public photo(string path, string label) { this.path = path; this.label = label; } private static finder<long, photo> find = new finder<long, photo>( long.class, photo.class); public static list<phot...
i have created public facing website allows login using username/password, or twitter, or facebook. when logging in twitter first time (for example), user created in database nickname matching twitter screen name. want nickname always unique. the problem in cases user nickname exists, user can't added. unsure accepted approach problem, solution can see far ask user override nickname, doesn't seem elegant. the reason nickname needs unique not code issue, interface issue, example there forums , want each user uniquely identified nickname. are there other methods can suggest dealing problem? edit: @ request of of replies clarify example: lets have user named joe bloggs member on website. not member of twitter or facebook. nickname on site joebloggs. then, joe bloggs comes along, , wants sign in twitter account. twitter name joebloggs, when signs in twitter, system attempts automatically set nickname joebloggs. however, nickname exists. normal or best practice ...
Comments
Post a Comment