Search Results

Search found 1875 results on 75 pages for 'tom irons'.

Page 49/75 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Wordpress Plugin Appends Div before content

    - by Tom
    I'm trying to attach a div from a voting plugin before the content is generated on both the excerpt and the content of a post. Here's what I have in my plugin: if (get_option('ilt_onPage') == '1') { function putILikeThis($content) { if(!is_feed() && !is_single() && !in_category('3') ) { $likethisbox.= getILikeThis('put'); } $content = $likethisbox . $content; return $content; } add_filter('the_content', putILikeThis); } if (get_option('ilt_onPage') == '1') { function putILikeThis1($excerpt) { if(!is_feed() && !is_archive() && in_category('3') ) { $likethisbox.= getILikeThis('put'); } $excerpt = $likethisbox . $excerpt; return $excerpt; } add_filter('the_excerpt', putILikeThis1); } Any ideas on what I'm doing wrong?

    Read the article

  • jQuery ajax returns

    - by Tom
    I think this will be some obvious problem, but I cannot figure it out. I hope someone can help me. So I have a slider with 3 slides - Intro, Question, Submit Now I want to make sure that if the question is answered wrong people cannot slide to Submit. The function to move slide is like this: function changeSlide(slide){ // In case current slide is question check the answer if (jQuery('.modalSteps li.current',base).hasClass('questionStep')){ checkAnswer(jQuery('input[name="question_id"]',base).val(), jQuery('input[name="answer"]:checked',base).val()); } jQuery('.modalSteps li.current',base).fadeOut('fast',function(){ jQuery(this).removeClass('current'); jQuery(slide).fadeIn('fast',function(){ jQuery(slide).addClass('current'); }); }); // In case the new slide is question, load the question if (jQuery(slide).hasClass('questionStep')){ var country = jQuery('input[name="country"]:checked',base).val(); loadQuestion(country); } } Now as you can see on first lines, I am calling function checkAnswer, which takes id of question and id of answer and pass it to the AJAX call. function checkAnswer(question, answer){ jQuery.ajax({ url: window.base_url+'ajax/check_answer/'+question+'/'+answer+'/', success: function(data){ if (!data.success){ jQuery('.question',base).html(data.message); } } }); } The problem i am having is that I cannot say if(checkAnswer(...)){} Because of Ajax it always returns false or undefined. What I need is something like this: function changeSlide(slide){ // In case current slide is question check the answer if (jQuery('.modalSteps li.current',base).hasClass('questionStep')){ if (!checkAnswer(jQuery('input[name="question_id"]',base).val(), jQuery('input[name="answer"]:checked',base).val())){ return false; } } ... So it will prevent the slide from moving on. Now when Im thinking about it, I will probably have slide like "Wrong answer" so I could just move the slide there, but I would like to see the first solution anyway. Thank you for tips

    Read the article

  • Pass HTML form entries into a Javascript array to then be written to a client side cookie?

    - by Tom
    I'm building a bit of a test-case JS application, something very basic, but have run into some problems. I'm trying to use a HTML form for a user to enter a number, which is then written to a Javascript Array. The user then has the option to write that same array to a local (client side) cookie. (I understand the security implications of this - it's a test-case and not for commercial use.) However, I can't make the connection - how can I capture the HTML entry, press 'submit' which will send it to a JS array, where the user can then press a different 'submit' which will write the array to a text file? If anyone can help I'd appreciate it because it's been nearly 6 hours and it's not funny anymore.

    Read the article

  • Success function not being called when form is submitted

    - by Tom Hartman
    Hi, I've been trying to figure out why the following script's success function isn't running. Everything in my form works perfectly, and the form contents are being emailed correctly, but the success function isn't being called. If anyone could review my code and let me know why my success function isn't being called I would very much appreciate it! Here is the HTML form with notification divs, which are hidden via css: <div id="success" class="notification"> <p>Thank you! Your message has been sent.</p> </div> <div id="failure" class="notification"> <p>Sorry, your message could not be sent.</p> </div> <form id="contact-form" method="post" action="" class="jqtransform"> <label for="name">Name:</label> <input name="name" id="name" type="text" class="validate[required] input" /> <label for="company">Company:</label> <input name="company" id="company" type="text" class="input" /> <label for="phone">Phone:</label> <input name="phone" id="phone" type="text" class="input" /> <label for="email">Email:</label> <input name="email" id="email" type="text" class="validate[required,email] input" /> <div class="sep"></div> <label for="subject">Subject:</label> <input name="subject" id="subject" type="text" class="validate[required] input" /> <div class="clear"></div> <label for="message">Message:</label> <textarea name="message" id="message" class="validate[required]"></textarea> <div id="check-services"> <input type="checkbox" name="services[]" value="Contractor Recommendation" /> <div>Contractor Recommendation</div> <input type="checkbox" name="services[]" value="Proposal Review" /> <div>Proposal Review</div> <input type="checkbox" name="services[]" value="Existing Website Review" /> <div>Existing Website Review</div> <input type="checkbox" name="services[]" value="Work Evaluation" /> <div>Work Evaluation</div> <input type="checkbox" name="services[]" value="Layman Translation" /> <div>Layman Translation</div> <input type="checkbox" name="services[]" value="Project Management" /> <div>Project Management</div> </div> <div class="sep"></div> <input name="submit" id="submit" type="submit" class="button" value="Send" /> <input name="reset" id="reset" type="reset" class="button" value="Clear" onclick="$.validationEngine.closePrompt('.formError',true)" /> </form> Here is the javascript: // CONTACT FORM VALIDATION AND SUBMISSION $(document).ready(function(){ $('#contact-form').validationEngine({ ajaxSubmit: true, ajaxSubmitFile: 'lib/mail.php', scroll: false, success: function(){ $('#success').slideDown(); }, failure: function(){ $('#failure').slideDown(); $('.formError').animate({ marginTop: '+30px' }); } }); }); And here is my PHP mailer script: <?php $name = $_POST['name']; $company = $_POST['company']; $phone = $_POST['phone']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $services = $_POST['services']; $to = '[email protected]'; $subject = 'THC - Contact'; $content .= "You received a message from ".$name.".\r\n\n"; if ($company): $content .= "They work for ".$company.".\r\n\n"; endif; $content .= "Here's the message:\r\n\n".$message."\r\n\n"; $content .= "And they are interested in the services below:\r\n\n"; $content .= implode("\r\n",$services); if ($phone): $content .= "\r\n\nYou can reach them at ".$phone."."; else: $content .= "\r\n\nNo phone number was provided."; endif; $headers = "From: ".$name."\r\n"; $headers .= "Reply-To: ".$email."\r\n"; if (mail($to,$subject,$content,$headers)): return true; else: return false; endif; ?>

    Read the article

  • Headers already sent

    - by Tom
    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\atseit\irankiai.php:3) in C:\xampp\htdocs\atseit\irankiai.php on line 211 Is there any way to remove this warning and make cookies work? My 3rd line defines title and 211 line sets cookie.

    Read the article

  • SVN 255 Character Problem

    - by Tom
    Hi Guys, I am using TortiseSVN and we have a problem when we exporting etc because subversion errors. The path has a character limit 255 - so I am not sure if this is the problem [I think it is in Win7 x-64 bit] How do I fix this ? i.e. allow paths for 255 characters ?

    Read the article

  • Count Upwards for ID jQuery

    - by Tom
    Hi Guys, I have the following HTML structure <div id="test-1-yay"></div> ... bunch of code ... <div id="test-2-yay"></div> ... bunch of code ... <div id="test-3-yay"></div> I was wondering how I can use jQuery to basically identify each of these "id's" and then apply some jQuery to them ? I'm new to this so little unsure ? Something like if $('#test-1-yay' || '#test-2-yay' || '#test-3-yay') { do stuff to all ID's } But the prob is I want this to continue as it could go to #test-201-yay, #test-202-yay etc ? Thx

    Read the article

  • Why are the default UI controls in my iPhone app blurred?

    - by Tom H
    Why would the default iPhone interface elements, specifically the UISwitch (unmodified) and a UISegmentedControl appear slightly blurred? I have not changed them or called any private APIs. This blurring occurs when I run it both in the simulator and when I load it on my iPod Touch, so I don't think it's a one off drawing glitch. These elements were created via some code (initWithFrame:) not in interface builder. Here is a screenshot of the blurring in the simulator: http://drp.ly/14rS6a It looks similar on the actual device. Thanks for your help

    Read the article

  • Simple Java to XML example

    - by Tom Brito
    I've read a time ago about generate xml from Java using annotations, but I'm not finding a simple example now. If I want to make a xml file like: <x:element uid="asdf">value</x:element> from my java class: public class Element { private String uid = "asdf"; } Which annotations I should use to perform that? (I have a xml-schema, if this helps the generation)

    Read the article

  • Identifying all types with some attribute

    - by Tom W
    Hello SO; I have an issue with .Net reflection. The concept is fairly new to me and I'm exploring it with some test cases to see what works and what doesn't. I'm constructing an example wherein I populate a set of menus dynamically by scanning through my Types' attributes. Basically, I want to find every type in my main namespace that declares 'SomeAttribute' (doesn't matter what it is, it doesn't have any members at present). What I've done is: For Each itemtype As Type In Reflection.Assembly.GetExecutingAssembly().GetTypes If itemtype.IsDefined(Type.GetType("SomeAttribute"), False) Then 'do something with the type End If Next This crashes the application on startup - the first type it identifies is MyApplication which is fairly obviously not what I want. Is there a right and proper way to look for all the 'real' 'sensible' types - i.e. classes that I've defined - within the current assembly?

    Read the article

  • Link Labels c# - displaying a list of them

    - by tom
    I am trying to add a list of linked lables to a listview. I amd doing so like this foreach (String s in values) { LinkLabel label = new LinkLabel(); label.Text = s; txtBox.Controls.Add(label); } } It keeps adding just one item to the listbox even tho there are more. Any ideas? ps) i can tell there are more items from adding a breakbpoint and using console.writeline when iterating Thanks

    Read the article

  • ASP.NET MVC Routes Login/Logout Problem

    - by Tom
    Hi Guys, Relatively new to ASP.NET MVC and little confused about how to do routing. My problem basically relates to "logged in" and "logged out routes" and having both as "/". i.e. I have home/index for logged out user which appears as "/" but this has got me confused as to how I can have home/home for logged in user and still have "/". I keep getting 127.0.0.1/home/home I could modify like 127.0.0.1/home - but I want it like "/". My confusion relates to the fact that the "/" [127.0.0.1/] is bound in the routes collection to home/index. Does anyone know how I can modify the routes dictionary (which will be binded ONCE at the start) so that the "/" can be shared for logged and non-logged users ? Thanks?

    Read the article

  • How do i get the reg string from the handle integer?

    - by Tom
    Hi, ive got the reg handles (as ints) being outputted, but i need to convert this to the HKLM/bla/bla.... I know that the 5 Root Keys are 0x80000000Y where Y is a value from 0 to 4, but i'm also getting much smaller values which represent nodes lower down in the registry leaves.

    Read the article

  • Anyone NOT using a Web Framework? Why?

    - by tom
    I'm well aware of the many reasons to use a web framework. I'm just wondering whether anyone out there is using absolutely no web framework whatsoever to develop their web projects. I would really love to know the reason(s) why you're not using a web framework. For the sake of this discussion, your programming language of choice does not matter. Some possibilities for discussion: You don't hide behind an ORM. You don't rely on any sort of templating system. You think MVC is a really nice TLA but lacks an essential vowel or two. No need for any additional javascript framework tomfoolery. You just write as much code as possible in your native programming language(s). Summary of reasons thus far: Language learning opportunities. Specific performance reasons (write-intensive transaction processing). Seeking more nuanced control over your data and applications (less abstraction). You're building your own framework! Prove to yourself that you can succeed (or fail) just like the big framework-building gurus. Integration issues with unpopular/legacy technologies (exotic databases or protocols come to mind). Big company, lots of code, no talent nor buy-in present to move to a web framework. Some frameworks really lock you in and cannot perpetually grow along with your needs. These few black sheep don't make it easy to jump outside of the framework, write some custom code, and easily jump back in. When you finally escape the asylum, you'll never look back.

    Read the article

  • Django 1.2 - Pb with a form in a template (WSGIRequest)

    - by Tom
    Hi, I'm trying to display a form on a template, but I get a fantastic error : Caught AttributeError while rendering: 'WSGIRequest' object has no attribute 'get' The error is in this line : {% for field in form.visible_fields %} My view : def view_discussion(request, discussion_id): discussion = get_object_or_404(Discussion, id=discussion_id) form = BaseMessageForm(request) return render(request,'ulule/discussions/view_discussion.html', { 'discussion':discussion, 'form':form, }) My form : class BaseMessageForm(forms.Form): message_content = forms.CharField(widget=forms.HiddenInput()) My template : <form action="" method="post"> {% csrf_token %} {% for field in form.visible_fields %} <div class="fieldWrapper"> {% if forloop.first %} {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} {% endif %} {{ field.errors }} {{ field.label_tag }}: {{ field }} </div> {% endfor %} <p><input type="submit" value="Send message" /></p> </form> Thanks a lot for your help !

    Read the article

  • SWIG_NewPointerObj and values always being nil

    - by Tom J Nowell
    I'm using SWIG to wrap C++ objects for use in lua, and Im trying to pass data to a method in my lua script, but it always comes out as 'nil' void CTestAI::UnitCreated(IUnit* unit){ lua_getglobal(L, "ai"); lua_getfield(L, -1, "UnitCreated"); swig_module_info *module = SWIG_GetModule( L ); swig_type_info *type = SWIG_TypeQueryModule( module, module, "IUnit *" ); SWIG_NewPointerObj(L,unit,type,0); lua_epcall(L, 1, 0); } Here is the lua code: function AI:UnitCreated(unit) if(unit == nil) then game:SendToConsole("I CAN HAS nil ?") else game:SendToConsole("I CAN HAS UNITS!!!?") end end unit is always nil. I have checked and in the C++ code, the unit pointer is never invalid/null I've also tried: void CTestAI::UnitCreated(IUnit* unit){ lua_getglobal(L, "ai"); lua_getfield(L, -1, "UnitCreated"); SWIG_NewPointerObj(L,unit,SWIGTYPE_p_IUnit,0); lua_epcall(L, 1, 0); } with identical results. Why is this failing? How do I fix it?

    Read the article

  • Defined outlets, connected them, they all returns (null)

    - by Tom
    Hi! I'm trying to play with a WebView. I made an outlet: IBOutlet UIWebView *browser; Defined it as a property: @property (nonatomic, retain) IBOutlet UIWebView *browser; Synthethized it: @synthesize browser; Finally, I connected it in Interface Builder, really it is. Then I try to do something with it i.e.: [browser loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apple.com"]]]; Or also: Etape *etape = [[Etape alloc] init]; NSString *html = [etape generateHTMLforEtape:[current_etape objectAtIndex:0]]; [browser loadHTMLString:html baseURL:nil]; [etape release]; I get no errors, I tried to Build & Analyse, no notices or warnings or errors.. I've been searching for one whole day, please help me :/ Thanks a lot! EDIT: Here's screenshots of my connections for my WebView: EDIT: That is how I call the view: DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]]; dvController.workflow_id = parent_id; Etape *etape = [[Etape alloc] init]; dvController.etapes = [etape getEtapes:parent_id]; [etape release]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release];

    Read the article

  • Can somebody explain this remark in the MSDN CreateMutex() documentation about the bInitialOwner fla

    - by Tom Williams
    The MSDN CreatMutex() documentation (http://msdn.microsoft.com/en-us/library/ms682411%28VS.85%29.aspx) contains the following remark near the end: Two or more processes can call CreateMutex to create the same named mutex. The first process actually creates the mutex, and subsequent processes with sufficient access rights simply open a handle to the existing mutex. This enables multiple processes to get handles of the same mutex, while relieving the user of the responsibility of ensuring that the creating process is started first. When using this technique, you should set the bInitialOwner flag to FALSE; otherwise, it can be difficult to be certain which process has initial ownership. Can somebody explain the problem with using bInitialOwner = TRUE? Earlier in the same documentation it suggests a call to GetLastError() will allow you to determine whether a call to CreateMutext() created the mutex or just returned a new handle to an existing mutex: Return Value If the function succeeds, the return value is a handle to the newly created mutex object. If the function fails, the return value is NULL. To get extended error information, call GetLastError. If the mutex is a named mutex and the object existed before this function call, the return value is a handle to the existing object, GetLastError returns ERROR_ALREADY_EXISTS, bInitialOwner is ignored, and the calling thread is not granted ownership. However, if the caller has limited access rights, the function will fail with ERROR_ACCESS_DENIED and the caller should use the OpenMutex function.

    Read the article

  • TCP 3 way handshake

    - by Tom
    Hi, i'm just observing what NMAP is doing for the 3 ports it reports are open. I understand what a half-scan attack is, but what's happening doesnt make sense. NMAP is reporting ports 139 are 445 are open..... all fine. But when i look at the control bits, NMAP never sends RST once it has found out the port is open, It does this for port 135- but not 139 and 445. This is what happens: (I HAVE OMITTED THE victim's replies) Sends a 2 (SYN) Sends a 16 (ACK) Sends a 24 (ACK + PST) Sends a 16 (ACK) Sends a 17 (ACK + FIN) I dont get why NMAP doesnt 'RST' ports 139 and 445??

    Read the article

  • CSS image for submit button - clicking image must submit form

    - by Tom
    Please help, I have a form on wordpress. I want the user to be able to click an image instead of the standard submit button. I have the image appear and the submit button disappear - but nothing happens when I click on the image. This is the code I am using: .formBuilderForm .formBuilderSubmit { clear: both; text-align: right; display:block; width:228px; height:49px; background: url(my image url) no-repeat; text-indent:-999em; Before you say "google it" or try search: I have tried the methods mentioned here: http://www.queness.com/post/798/5-techniques-to-style-buttons-using-images-and-css I've read similar posts such as this on stackoverflow but they don't solve my frustratingly simple problem. How to change input button image using CSS? Thanks for your help.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >