Search Results

Search found 2474 results on 99 pages for 'patrick scott'.

Page 73/99 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • How can I simulate a click event via script?

    - by Scott B
    I have a jquery accordion style menu that I'd like to add some shortcut links to across the top. When one of these shortcuts is clicked, it should have the same effect as if the user clicked the corresponding a tag that serves as that panel's header... Here's some code... <div> Application Shortcuts > <a href="" onclick="simulateAclick("generalSettings")>Open General Settings</a> </div> <ul class="menu collapsible"> <li class='header'><a href='#' id="generalSettings">General Settings</a> <ul class='acitem'>...stuff goes here... In the example above, clicking on "Open General Settings" toggles the "acitem" UL's child elements visible. I'd just like to simulate a click on that element, from a link at the top of my app...

    Read the article

  • WordPress > Cannot get custom meta settings to change once set...

    - by Scott B
    The script below adds a custom meta box to the WordPress page editor interface. It lists two specific categories, "noindex" and "nofollow", which my custom theme automatically installs when the theme is activated. It works fine for selecting and assigning the categories to the page. However, if the user unchecks either of them, the settings do not stick. Once selected, they cannot be removed from the page, regardless if they are unchecked when the page is saved. <?php function my_post_categories_meta_box() { add_meta_box('categorydiv', __('Page Options'), 'post_categories_meta_box_modified', 'page', 'side', 'core'); } function post_categories_meta_box_modified($post) { $noindexCat = get_cat_ID('noindex'); $nofollowCat = get_cat_ID('nofollow'); if(in_category("noindex")){ $noindexChecked = " checked='checked'";} if(in_category("nofollow")){ $nofollowChecked = " checked='checked'";} ?> <div id="categories-all" class="ui-tabs-panel"> <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> <li id='category-<?php echo $noindexCat ?>' class="popular-category"><label class="selectit"><input value="<?php echo $noindexCat ?>" type="checkbox" name="post_category[]" id="in-category-<?php echo $noindexCat ?>"<?php echo $noindexChecked ?> /> noindex</label></li> <li id='category-<?php echo $nofollowCat ?>' class="popular-category"><label class="selectit"><input value="<?php echo $nofollowCat ?>" type="checkbox" name="post_category[]" id="in-category-<?php echo $nofollowCat ?>"<?php echo $nofollowChecked ?> /> nofollow</label></li> </ul> </div> <?php } add_action('admin_menu', 'my_post_categories_meta_box'); ?>

    Read the article

  • How do I "step over" jQuery code while debugging?

    - by Scott Rippey
    While stepping through a script that uses jQuery, I just want to test the code I wrote. I don't want to step into the jQuery file -- I'm not debugging jQuery, just my own file. Are there any ways to tell a debugger to not step into the jQuery file? I use Visual Studio + Internet Explorer, as well as Firefox + Firebug for stepping through code ... and both seem to love to step through dozens of jQuery statements. For example, say I have a script like this: $("div").each(function() { $(this).hide(); }); I would like to press "step into" and not see the implementation of ".each()" etc... In C#, this is possible by using the [DebuggerStepThrough()] attribute on a class. But that doesn't help with JavaScript.

    Read the article

  • Resetting a while loop

    - by Patrick Beardmore
    I have found a confusing thing in a php script I am writing to generate some javascript. Here it is below, slightly simplified. The second while loop won't run unless I comment out the entire first while loop. Can anyone explain why? Many thanks. <?php $listid = 2; //DEMO ONLY $result1 = mysql_query("SELECT words.wid,words.wordmd5,words.word FROM words,instances WHERE words.wid = instances.wid AND instances.lid = \"$listid\""); $result1copy = $result1; $count1 = 1; while( $row = mysql_fetch_object( $result1 ) ) { print "words_left[$count1] = \"".$row->word."\";\n"; //Increment the array counter (starts at 1) $count1++; } ?> //Some javascript <?php $count2 = 1; while( $row = mysql_fetch_object( $result1copy ) ) { print " $count2 then $row->wordmd5 "; $count2++; } ?>

    Read the article

  • Going from web browser to web request

    - by Patrick
    I am working on a program that automates tasks in a browser like entering text, clicking, etc and right now everything is working fine when using the Web Browser tool in Visual Studio 2010. What I'd like to know is how should I approach converting all of this so I can use send requests instead of the browser? I heard its a lot more efficient and a lot better if you are going to be using multi threading but I have so much code that already works now and am not sure how I should do this without scraping quite a bit of it.

    Read the article

  • should i move the config file from codeigniter directory

    - by Patrick
    I've just published my site, created with codeigniter. the entire directory is in my public folder, including the config file (in public/system/application/config). I just wanted to double check: do I have to move this file to another, non public, directory? I think codeigniter doesn't allow any direct access, but I am not 100% sure.. thanks, P.

    Read the article

  • Why doesn't these links work in IE7 ?

    - by Patrick
    hi, I don't understand why I cannot click the tags on top in IE7 on this website: http://www.sanstitre.ch/drupal/portfolio?tid[0]=38http://www.sanstitre.ch/drupal/portfolio?tid[0]=38 It says javascript error but I debugged with Firefox and I don't get any error... Could you give me some help ?

    Read the article

  • HTML - Javascript: I cannot click on the links on top in IE7

    - by Patrick
    hi, I cannot click on the links (tags) on top of the page in IE7. I tried to change z-index of the elements but it doesn't work. Could you tell me what's wrong with it ? http://www.sanstitre.ch/drupal/portfolio?tid[0]=38 The mouse click is handled by jQuery function .click() I'm sure javascript works because" Hide - Alphabetical Order menus" work thanks

    Read the article

  • problem using 'as_json' in my model and 'render :json' => in my controller (rails)

    - by patrick
    Hi everyone. I am trying to create a unique json data structure, and I have run into a problem that I can't seem to figure out. In my controller, I am doing: favorite_ids = Favorites.all.map(&:photo_id) data = { :albums => PhotoAlbum.all.to_json, :photos => Photo.all.to_json(:favorite => lambda {|photo| favorite_ids.include?(photo.id)}) } render :json => data and in my model: def as_json(options = {}) { :name => self.name, :favorite => options[:favorite].is_a?(Proc) ? options[:favorite].call(self) : options[:favorite] } end The problem is, rails encodes the values of 'photos' & 'albums' (in my data hash) as JSON twice, and this breaks everything... The only way I could get this to work is if I call 'as_json' instead of 'to_json': data = { :albums => PhotoAlbum.all.as_json, :photos => Photo.all.as_json(:favorite => lambda {|photo| favorite_ids.include?(photo.id)}) } However, when I do this, my :favorite = lambda option no longer makes it into the model's as_json method.......... So, I either need a way to tell 'render :json' not to encode the values of the hash so I can use 'to_json' on the values myself, or I need a way to get the parameters passed into 'as_json' to actually show up there....... I hope someone here can help... Thanks!

    Read the article

  • Guidance on using drop in DLLs

    - by Scott Chamberlain
    I have been giving the task to rewrite a internal utility in .net for my work. One of program requirements the new system has is have a dll that implements a set of interfaces and have the program call the DLL. Now this dll will be changed out a lot per deployment. My question is what is the best way to do it from a development standpoint? Do I add a template DLL (one that only has the interfaces but no implementation) to the project references like I would do any other dll that I would use. Or do I need to use somthing like this every time I want to use code from the dll? var DropIn = System.Reflection.Assembly.LoadFrom("DropInDll.dll"); var getActions = DropIn.GetType("Main").GetMethod("GetActions"); List<IAction> ActionList = (List<IAction>)getActions.Invoke(null, null);

    Read the article

  • Ojective C Class or struct?

    - by Scott Pendleton
    I have a class Song with properties Title, Key, Artist, etc. There are no methods. I loop through a database of song information and create a Song object for each, populating the properties, and then store the Song objects in an NSArray. Then I thought, why not just have a struct Song with all those same properties instead of a class Song. Doing so would eliminate the class files, the #import Song line in the using class's .m file, and the need to alloc, init, release. On the other hand, I'd have to put the struct definition in every class that might need it. (Unless there's some globally accessible location -- is there?) Also, can a struct be stored in an NSArray?

    Read the article

  • jQuery jPicker colorpicker: How to convert from 8 digit (w Transparency) to standard 6 digit hex?

    - by Scott B
    I've got a jPicker installed and running fine; its a pretty sweet script. However, the value it returns to my input box is 8 digit hex. I need it to return 6 digit hex. Rather than post-process the 8 digit into 6, I'd rather just hack into the script and force 6 digit. Alternately, I'd be ok with hooking into the change event of the jPicker to intercept the value its sending to the input element and doing the conversion there just before it updates the input with the hex. Here's my code: $(function() { $('#myThemeColor').jPicker(); /* Bind jPicker to myThemeColor input */ $("#carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible: 6, speed: 700 }); And here's the code I'm working with to intercept the myThemeColor input's change event, but its not firing at all. $('#myThemeColor').change(function() { alert(this.val()); /* does not fire on any action */) if($(this).val().length == 8) { $(this).val(function(i, v) { return v.substring(0, 6); }); } });

    Read the article

  • Creating a SQL lookup

    - by Scott
    I’m in the process of cleaning up a database table. Due to the way some of the data needed to be processed, now I need to go back and perform a “reverse lookup” on the data. For example, a field for one of the records is set to “car” and I need to set that record’s tranportmode field to “1” (for “car”). The lookup tables are already created. I just need to do the reverse lookup part. The cleansed tables will only have the numeric lookup value.

    Read the article

  • MySQL select column length in php

    - by Patrick
    Hello! How do i get the actual max length of a specified column in php? For instance, this table: id - int(11) name - string(20) I want in php to select the maximum number of characters that a field can have, like SELECT length(name) from table1 and it should then return 20 (since its the maximum number of characters for that field).

    Read the article

  • Background text in a Bootstrap WELL

    - by patrick
    I have a problem putting a text in the background of a Bootstrap well. I first posted the problem in this question, but that was a too simple representation of my problem. I'm looking for an effect created in this jFiddle, a text in the background of a menu. The example works how I want to to work, but when I put this in a Bootstrap Well I get this (http://jsfiddle.net/aBqw8/21/). The background text disappears, it's probably behind the Well. When I remove the background color from the well I can see the text. If I remove the "position:relative" from the span it shows the title, but then it interferes with the menu, which is what I am trying to avoid. Thanks for your help!

    Read the article

  • mongodb java driver - raw command?

    - by Scott
    Is it possible to execute raw commands as javascript through the Java driver for MongoDB? I'm tired of wrapping everything in Java objects using Rhino, and would happily sacrifice performance for the convenience of passing javascript directly through to the DB. If not, I can always use sleepymongoose or something, but I don't really want to add yet another language (python) to the stack at this point. Any insights are appreciated.

    Read the article

  • Should I name the files in my solution all lowercase for SEO?

    - by Scott
    I read that an SEO best practice is to use lowercase urls. Should I name my asp.net webforms project files lowercase as well? Visual Studio doesn't name default documents in new projects all lowercase. I'm not sure it matters since browsing to http://www.mysite.com/mypage.aspx will still work even if your page is named MyPage.aspx. Can somebody enlighten me on this?

    Read the article

  • jQuery Fade a div off the screen

    - by Scott B
    In my app, I have a temporary div that is shown each time the app is saved (see markup below). I'm using jQuery 1.4.2 and would like to know the command that will fade this div off the screen after 3 seconds... <script src="../wp-content/themes/mytheme/jquery-1.4.2.min.js" type="text/javascript"></script> if ($_REQUEST['saved']) echo '<div id="message" class="updated fade"><p>'.$themename.' settings saved.</strong></p></div>';

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >