Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 33/584 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • Wrapping 3 objects or less inside a while / foreach in PHP

    - by DarkGhostHunter
    Simple question. I have an array of 21 elements, and show every three of them inside a <div> block. The code is something like this: <?php $faces= array( 1 => 'happy', 2 => 'sad', (sic) 21 => 'angry' ); $i = 1; foreach ($faces as $face) { echo $face; $i++; } ?> The problem lies when this array doesn't have 21 elements, sometimes it gets 24, an other times 17. How I wrap every three of them, and wrap alone the rest? I came up with using switch and case, but that works only when there are 21 elements only. I think I could count them beforehand and put a closing in the last one (even if it is a group of one element).

    Read the article

  • JavaScript constructors inside a namespace

    - by Joe
    I have read that creating a namespace for JavaScript projects helps to reduce conflicts with other libraries. I have some code with a lot of different types of objects for which I have defined constructor functions. Is it good practice to put these inside the namespace as well? For example: var shapes = { Rectangle: function(w, h) { this.width = w; this.height = h; } }; which can be called via: var square = new shapes.Rectangle(10,10);

    Read the article

  • Checkbox not checking inside div in Firefox

    - by mike
    Weird problem. I don't know if anyone can shed some light on this? I have a checkbox inside a div. It works fine in IE but not Firefox. I have to click the space around the checkbox that is occupied by the div (sort of like a label) for the checkbox to tick on and off. Directly clicking the checkbox does not show it as ticked on or off, even though in firebug it is showing that it is in a checked state and an unchecked state. Only in FF does this happen.....

    Read the article

  • Wrapping multiple images inside a <div> in jQuery

    - by alekone
    hello! I need to find all the images inside a div, and wrap a div around them. here's the code I come up with, but that's not working! any ideas? thanks! jQuery(function(){ my_selection = []; $('.post').each(function(i){ if ($(this).find('img').length > 1 ){ my_selection.push(['.post:eq(' + i + ')']); } }); $( my_selection.join(',')).wrapAll('<div class="wrapper"></div>'); });

    Read the article

  • How to change the background color of a h:inputText control inside a rich:Panel

    - by kiransri
    I need to change the background color of some h:inputText controls inside a rich panel based on a condition. This is to distinguish these controls as readonly. I tried using styleClass and style properties but both did not work. styleClass is ignored and style colors only half of the textbox. 1) styleClass code : In css : .readonlycontrol { background-color: #C0C0C0; } In .xhtml page: <rich:panel styleClass="inputpanel"> <f:facet name="header" > <h:outputText value= "#{cardreqmsg.apptinfo}"/> </f:facet> <h:panelGrid columns="4" cellpadding="2" border="0"> <h:inputText id ="name" styleClass="readonlycontrol" readonly="true"/> ......... 2) style code: <h:inputText id ="name" readonly="true" style="background-color:#C0C0C0"/> Any help would be greatly appreciated

    Read the article

  • oracle call stored procedure inside select

    - by CC
    Hi everybody. I'm working on a query (a SELECT) and I need to insert the result of this one in a table. Before doing the insert I have some checking to do, and if all columns are valid, I will do the insert. The checking is done in a stored procedure. The same procedure is used somewhere else too. So I'm thinking using the same procedure to do my checks. The procedure does the checkings and insert the values is all OK. I tryied to call the procedure inside my SELECT but it does not works. SELECT field1, field2, myproc(field1, field2) from MYTABLE. This kind of code does not works. I think it can be done using a cursor, but I would like to avoid the cursors. I'm looking for the easiest solution. Anybody, any idea ? Thanks alot. C.C.

    Read the article

  • Gridview inside UpdatePanel refresh

    - by Attilah
    I use a GridView to represent data from a table in my DB. the GridView has some template fields whose content are determined before displaying the Grid ( I use the RowDataBound event to determine content of template fields before displaying the GridView). The page displays a list of records from the table records and then, the recording process starts. after the process is over, the template fields should be updated. how do I automatically refresh the GridView after the process is finished ? it should be noted that the GridView is contained within an control and that I continuously poll the server using a Timer control that executes "GridView1.DataBind()" at the server level every 60 seconds. since the GridView is inside an UpdatePanel, calling DataBind() method on it doesn't seem to call the RowDataBound event. How can I solve this ?

    Read the article

  • Objective-C: Cannot Change Value of Instance Variable Inside a Function

    - by user262325
    Hello everyone, I cannot change the value of an instance variable inside a function. I have defined a class: // info.h #import <Foundation/Foundation.h> @interface NSMyObject : NSObject { NSInteger i; } -(void) setI:(NSInteger)v; @end #import "info.h" @implementation NSMyObject -(void) setI:(NSInteger)v ; { i=v; } - (void)dealloc { [super dealloc]; } @end I call a function 'myFunction' with parameter temObj which is a NSMyObject instance. myFunction(temObj);//temObj is NSMyObject In the function, I can change the value of the instance variable of parameter obj. -(void)myFunction:(NSMyObject*) obj; { [obj setI:0]; } ... expecting this to change the content of temObj. But when I check the results of operation on obj in function myFunction the value of temObj.i has not changed. Welcome any comment Thanks

    Read the article

  • Java - Loading dlls by a relative path and hide them inside a jar

    - by supertreta
    Hi guys, I am developing a Java application that should be release as a jar. This program depends on c++ external libraries called by JNI. To load them, I use the method System.load with an absolute path and this works fine. However, I really want to "hide" them inside the jar, so I have created a package to collect them. This forces me to load an relative path - the package path. By this approach, I let the user run the jar in any directory, without being worried about linking the dll's or bored with a previous installation process. This throws the expected exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library How can I get this working? Thanks for your help!

    Read the article

  • How can i bind a Database field value to a hidden field inside a gridview

    - by Dorababu
    I use the following to bind a field from the table to a hidden field inside a gridview but i am getting the error as System.Data.DataRowView' does not contain a property with the name 'AccountType'. This is how i assigned <asp:TemplateField> <ItemTemplate> <asp:HiddenField ID="hdnAccntType" runat="Server" Value='<%#Eval("AccountType") %>' /> </ItemTemplate> </asp:TemplateField> Is it correct or i have to make any corrections

    Read the article

  • Getting "too many rows" error inside a "for" cursor loop

    - by Will
    I have a trigger that contains two cursors loops, one nested inside the other like this: FOR outer_rec IN outer_cursor LOOP FOR inner_rec IN inner_cursor LOOP -- Do some calculations END LOOP; END LOOP; Somewhere in this it is throwing the following error: ORA-01422: exact fetch returns more than requested number of rows I've been trying to determine where it's coming from for an hour or so.. but should this error never happen? Also.. I am assuming the inner loop automatically closes and opens itself again every time the outer loop goes the next record, i hope this is correct.

    Read the article

  • ASP.NET Setting Flash file path for Object tag inside a usercontrol

    - by Shyju
    I have a an ASP.NET user control where i wanto run a flash movie using flashplayer.How can i set the path of flash movie file properly so that this would work in all pages irrespective of the folders. ie; it should work inside a page in FolderA and a page in FolderASub1 which is in FolderA and a page in the Root folder too.My Flash file resides in a Folder called FlashGallery in root.My User control resides in a Subfolder in Root. I am not sure how can use ~ here .Since its(Object tag to play flash) not a server control. And infact i cant place the full relative path too. Anythoughts ?

    Read the article

  • Execution sequence inside a jquery event handler

    - by user576358
    I have a big issue with the execution squence inside this jquery handler : Was wondering if anyone has come accross this before: I have a simple form: <form action='foo.cgi' id='myForm' > <input type=text name='name' /> <input type=submit value='Find it!'/> </form> when user clicks on Find it! would like to change the cursor to 'progress' before the data is returned through an ajax call: $(document).ready(function(){ $("#myForm ").submit(function(){ $("body").css("cursor", "progress") ; htmlobj=$.ajax({url:server_url,..........); } } However: The cursor [line 2 above ] does not change until data is returned through ajax - Seems like line 3. gets executed before 2. Any help is greatly appreciated

    Read the article

  • GM_xmlhttpRequest inside unsafeWindow

    - by streetparade
    Hy, i need the content of a web page, in greasemonkey. i wrote a function like this. unsafeWindow.testpage = function() { GM_xmlhttpRequest( { method: "GET", url: "http://www.test.com/xml/xml.php", headers: { "User-Agent": "Mozilla/5.0", "Accept": "text/xml" }, onload: function(response) { alert(response.responseText); } }); } If i execute the above it just logs that GM_xmlhttpRequest cannot be executed inside a unsafewindow. How can i get the content of http://www.test.com/xml/xml.php in a unsafe window? What i expect is that the content of http://www.test.com/xml/xml.php is returned in alert box How can i do that?

    Read the article

  • ruby on rails sub directory inside in the 'Views' main directory

    - by Kum
    Hello, am a newbie in ruby on rails and am stuck with a simple problem of routing. I have my controller 'sub' and the 'Views' folder containing the add,edit,new erb files. In my routes file, i have 'map.resources :subs'. Until now, everything is fine. Problem: I moved the add,edit,new erb files into a subfolder called 'admin' inside the 'Views' main directory. I have no idea how to call those erb files from that 'admin' subdir. By default, it is looking for /app/views/subs/index.html.erb, and i want it to look in /app/views/subs/admin/index.html.erb Please can anyone tell me how to do this. Many many thanks

    Read the article

  • calling javascript function inside orkut iframe

    - by tsetsik
    Hi guys, I'm having a web game loaded in orkut application via iframe so there are the orkut iframe and mine iframe inside the xml. Everything is ok, but now I need to have a button for inviting some friends and wall posts from some features. I didn't find a way for including the orkut javascript in the game's code so the first thing that pops into my mind was to call a custom function in the xml by using: window.parent.myFunction(); but it gives me error: permission denied. I've tried some other ways of reaching that function but the error is the same. Does anybody know a way of doing that or this can't be done ?

    Read the article

  • jQuery dont see onclick event on link inside infowindow in google maps v3

    - by Charles
    i have such problem that jQuery onclick event dont see click on link inside google map in infowindow. Thats how my infowindow link looks like: <a href="http://example.com/#ui-accordion-accordion-header-7" class="pull-right move-to-acc" id="itemH">See Details</a> Under map i have acordion list with detailed information about point so im trying to catch click on that link : jQuery("#itemH").click(function(event){ alert("qq"); }); When i click on marker infowindow open and i click on link but alert dont show up - im just moved to div #ui-accordion-accordion-header-7 What im doing wrong ? Thx for help

    Read the article

  • Passing parameters among views in a navigation frame INSIDE a custom control

    - by NetWriter
    I created a silverlight 3 application with a navigation frame and 3 views: search, add and edit. I used the app file to pass parameters among the 3 pages, eg: ((App)Application.Current).SNIPSELECTED = currentSnip; Then in the receiving page: currentSnip = ((App)Application.Current).SNIPSELECTED; currentSnip is a SnipItem object: public class SnipItem { public string itemID {get;set;} public string category {get;set;} public string itemDescription {get;set;} public string codeSnip {get;set;} } This worked fine until I decided to make this entire application into a user control and put that inside a second silverlight application with its own navigation frame and app file. The app files are getting confused. The first app file with all my parameter passing is not being read. I know how to pass a simple parameter between views in the first application without the app file (in a query string), but how about these custom types like my currentSnip above?

    Read the article

  • How to access function inside PHP OOP

    - by Industrial
    Hi everyone, What do I need to do to call $this-two() from inside my function innerOne? Is that possible with PHP OOP? Here's the error I am recieving: Fatal error: Using $this when not in object context Here's how my code looks: class myClass { function one(){ function innerOne() { // Some code $this->two($var1, $var2); } // Some code innerOne(); } function two($var1, $var2) { // Does magic with passed variables return $var1 . $var2; } } Thanks a lot!

    Read the article

  • TSQL - create a stored proc inside a transaction statement

    - by Chris L
    I have a sql script that is set to roll to production. I've wrapped the various projects into separate transactions. In each of the transactions we created stored procedures. I'm getting error messages Msg 156, Level 15, State 1, Line 4 Incorrect syntax near the keyword 'procedure'. I created this example script to illustrate Begin Try Begin Transaction -- do a bunch of add/alter tables here -- do a bunch of data manipulation/population here -- create a stored proc create procedure dbo.test as begin select * from some_table end Commit End Try Begin Catch Rollback Declare @Msg nvarchar(max) Select @Msg=Error_Message(); RaisError('Error Occured: %s', 20, 101,@Msg) With Log; End Catch The error seems to imply that I can't create stored procs inside of transaction, but I'm not finding any docs that say otherwise(maybe google isn't being freindly today).

    Read the article

  • Problem in building a tab bar inside navigation controller

    - by Heba
    Hello Everyone! I am really frustrated and I rally hope that you will help me to solve this problem! I'm trying to build a tab bar inside a navigation controller. I used this template provided by WiredBob. My problem is that I want to add more bar items to the tab bar, but I keep getting crash! From the log: 2010-05-24 00:15:43.469 NavTab[9315:207] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "AnnView" nib but didn't get a UITableView.' Also, I tried to fix the size of the a view in IB to fit in with the tab bar, but I couldn't! It was unchangeable. Thanks in advance :-)

    Read the article

  • Dependent Dropdown inside Joomla

    - by kernel
    I was trying to implement the Ajax method for deploying dependent drop down select boxes inside Joomla. The Problem is that if you call an ajaxRequest to run a php with the query that populates the second drop down depending on the result of the first, this is out of the joomla framework and you can't use anything from the joomla functions. So I need to copy into the new file all the details of my dbase login + to write down the html+php to populate the options. I was thinking whether there is an easier solution to this problem. Maybe the Joomla framework supports something like this. Any ideas?

    Read the article

  • In PHP: How to call a $variable inside one function that was defined previously inside another funct

    - by Sam
    I'm just starting with Object Oriented PHP and I have the following issue: I have a class that contains a function that contains a certain script. I need to call a variable located in that script within another function further down the same class. For example: class helloWorld { function sayHello() { echo "Hello"; $var = "World"; } function sayWorld() { echo $var; } } in the above example I want to call $var which is a variable that was defined inside a previous function. This doesn't work though, so how can I do this?

    Read the article

  • Changing class of h2 inside specific div

    - by user1985060
    I want to make it so that everytime you click on an 'h2' tag, the 'input' inside gets selected and the 'h2' tag changes background, but if another 'h2' tag is clicked, the current highlight and 'input' selection changes accordingly. problem is that I have 3 different that do the same and with my code all the 3 forms are affected rather one. How do i limit my changes to only be contained to that form. Here is some code for clarification ' <form> ... <h2 onclick="document.getElementById(1001).checked='True' $('h2').removeClass('selected'); $(this).addClass('selected'); "> CONTENT <input type="radio" name="radio" id="1001" value="1001" /> </h2> ... </form>

    Read the article

  • CSS and JQuery: spaces inside image name break code of url()

    - by Shyam
    Hi, I have a page that is supposed to display a larger version of an image when hovered over a thumbnail. I have a 'div' with an ID and the JQuery code is as following: $(document).ready(function(){ $('img').hover(function() { var src = $("#im" + this.id).attr("src"); $('#viewlarge').css('backgroundImage','url(' + src +')'); return false; }); }); The images I use, are generated by a Ruby script that "generate" an image with a similar, yet different id. However, sometimes, photo's are uploaded that have "spaces" inside. My developer tools tell me that the background-image is not set correctly, yet the image path is correct and the browser don't have problems finding the image. My question is, can I somehow sanitize the url 'src', so spaces won't be a problem? I am aware of doing this server side, yet I would like to know how to do this with JQuery/JS too. Thanks!

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >