Daily Archives

Articles indexed Friday May 14 2010

Page 18/116 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Disabling Text field with Javascript when value in drop down box is from mysql

    - by SteveJ313
    Hi I have a simple script in HTML, using a dropdown menu. When the value 1 is selected, the user can write in the text field, if value 2 is selected, it disables the text field. However, i changed the values of the dropdown menu, so that one value was from a mysql table(using PHP) and the other remained 'option value='1''. Yet now neither text field is disabled. Below is the code. `<script type="text/javascript"> function findselected() { if (document.form.selmenu.value == <?php echo $id; ?>) { document.form.txtField.disabled=true; // return false; // not sure this line is needed } else { document.form.txtField.disabled=false; // return false; // not sure this line is needed } } ` And the PHP section if(mysql_num_rows($SQL) == 1) { echo "<select name='selmenu' onChange='findselected()'>"; echo "<label>TCA_Subject</label>"; while ($row=mysql_fetch_array($SQL)) { echo "<option value='$id'>$thing</option>"; echo "<option value='2'>Choice 2</option>"; } } echo "<option value=$userid>'Choice 1'</option>"; ?> <option value='2'>Choice 2</option>"; </select> I have tried taking the second option value out of the loop, putting it into html, editing the variable in the javascript function. There is not a fault with the PHP as it is retrieving the right results and displaying it, yet the text field doesnt become disabled. Does anyone know of a possible solution? Thanks

    Read the article

  • Web Server with phpMyAdmin

    - by Kumar P
    We have web development company, We using RHEL 5 as local (proxy) server with few windows XP client machines. Now i want to make my Server machine as Web Server ( LAN only ), with mysql and phpMyAdmin. I installed httpd,php,mysql by yum. How to install phpMyAdmin ? And Where i want to installl ? Now i want to make my client machines can create php files in web folder, Also use mysql and phpMyAdmin. How can i do it ? Give me clear steps to do it .

    Read the article

  • HELP: MS Virtual Disk Service to Access Volumes and Discs on Local Machine.

    - by Jibran Ahmed
    Hi, here it is my code through which I am successfully initialize the VDS service and get the Packs but When I call QueryVolumes on IVdsPack Object, I am able to get IEnumVdsObjects but unable to get IUnknown* array through IEnumVdsObject::Next method, it reutrns S_FALSE with IUnkown* = NULL. So this IUnknown* cant be used to QueryInterface for IVdsVolume Below is my code HRESULT hResult; IVdsService* pService = NULL; IVdsServiceLoader *pLoader = NULL; //Launch the VDS Service hResult = CoInitialize(NULL); if( SUCCEEDED(hResult) ) { hResult = CoCreateInstance( CLSID_VdsLoader, NULL, CLSCTX_LOCAL_SERVER, IID_IVdsServiceLoader, (void**) &pLoader ); //if succeeded load VDS on local machine if( SUCCEEDED(hResult) ) pLoader->LoadService(NULL, &pService); //Done with Loader now release VDS Loader interface _SafeRelease(pLoader); if( SUCCEEDED(hResult) ) { hResult = pService->WaitForServiceReady(); if ( SUCCEEDED(hResult) ) { AfxMessageBox(L"VDS Service Loaded"); IEnumVdsObject* pEnumVdsObject = NULL; hResult = pService->QueryProviders(VDS_QUERY_SOFTWARE_PROVIDERS, &pEnumVdsObject); IUnknown* ppObjUnk ; IVdsSwProvider* pVdsSwProvider = NULL; IVdsPack* pVdsPack = NULL; IVdsVolume* pVdsVolume = NULL; ULONG ulFetched = 0; hResult = E_INVALIDARG; while(!SUCCEEDED(hResult)) { hResult = pEnumVdsObject->Next(1, &ppObjUnk, &ulFetched); hResult = ppObjUnk->QueryInterface(IID_IVdsSwProvider, (void**)&pVdsSwProvider); if(!SUCCEEDED(hResult)) _SafeRelease(ppObjUnk); } _SafeRelease(pEnumVdsObject); _SafeRelease(ppObjUnk); hResult = pVdsSwProvider->QueryPacks(&pEnumVdsObject); hResult = E_INVALIDARG; while(!SUCCEEDED(hResult)) { hResult = pEnumVdsObject->Next(1, &ppObjUnk, &ulFetched); hResult = ppObjUnk->QueryInterface(IID_IVdsPack, (void**)&pVdsPack); if(!SUCCEEDED(hResult)) _SafeRelease(ppObjUnk); } _SafeRelease(pEnumVdsObject); _SafeRelease(ppObjUnk); hResult = pVdsPack->QueryVolumes(&pEnumVdsObject); pEnumVdsObject->Reset(); hResult = E_INVALIDARG; ulFetched = 0; BOOL bDone = FALSE; while(!SUCCEEDED(hResult)) { hResult = pEnumVdsObject->Next(1, &ppObjUnk, &ulFetched); //hResult = ppObjUnk->QueryInterface(IID_IVdsVolume, (void**)&pVdsVolume); if(!SUCCEEDED(hResult)) _SafeRelease(ppObjUnk); } _SafeRelease(pEnumVdsObject); _SafeRelease(ppObjUnk); _SafeRelease(pVdsPack); _SafeRelease(pVdsSwProvider); // hResult = pVdsVolume-AddAccessPath(TEXT("G:\")); if(SUCCEEDED(hResult)) AfxMessageBox(L"Add Access Path Successfully"); else AfxMessageBox(L"Unable to Add access path"); //UUID of IVdsVolumeMF {EE2D5DED-6236-4169-931D-B9778CE03DC6} static const GUID GUID_IVdsVolumeMF = {0xEE2D5DED, 0x6236, 4169,{0x93, 0x1D, 0xB9, 0x77, 0x8C, 0xE0, 0x3D, 0XC6} }; hResult = pService->GetObject(GUID_IVdsVolumeMF, VDS_OT_VOLUME, &ppObjUnk); if(hResult == VDS_E_OBJECT_NOT_FOUND) AfxMessageBox(L"Object Not found"); if(hResult == VDS_E_INITIALIZED_FAILED) AfxMessageBox(L"Initialization failed"); // pVdsVolume = reinterpret_cast(ppObjUnk); if(SUCCEEDED(hResult)) { // hResult = pVdsVolume-AddAccessPath(TEXT("G:\")); if(SUCCEEDED(hResult)) { IVdsAsync* ppVdsSync; AfxMessageBox(L"Formatting is about to Start......"); // hResult = pVdsVolume-Format(VDS_FST_UDF, TEXT("UDF_FORMAT_TEST"), 2048, TRUE, FALSE, FALSE, &ppVdsSync); if(SUCCEEDED(hResult)) AfxMessageBox(L"Formatting Started......."); else AfxMessageBox(L"Formatting Failed"); } else AfxMessageBox(L"Unable to Add Access Path"); } _SafeRelease(pVdsVolume); } else { AfxMessageBox(L"VDS Service Cannot be Loaded"); } } } _SafeRelease(pService);

    Read the article

  • Xcode: view references for a variable?

    - by David.Chu.ca
    I am new to Xcode. I am not sure if there is a way to view a variable's references just like "Find all references" in Visual Studio by right click on a var? For example, in my .h file, I would like to know or view all the references for property isSet: @interface MyInterface { ... BOOL isSet; // view all references to this var? ... }

    Read the article

  • HTML / CSS autonumber headings?

    - by Technical Bard
    Is there a way (ideally easy) to make headings and sections autonumber in HTML/CSS? Perhaps a JS library? Or is this something that is hard to do in HTML? I'm looking at an application for a corporate wiki but we want to be able to use heading numbers like we always have in word processors.

    Read the article

  • Xap file contents changes if built in Visual Studio or build server

    - by arch
    I'm using MEF with my Silverlight 4 app to dynamically load xap files. To optimize this process, I've removed various assemblies from my xaps since I know they've already been loaded by the base xap. This reduces the size of my dynamically loaded xaps. I accomplished this by setting the "Copy Local" flag for each assembly reference to "false". This all seems to work fine when I build in Visual Studio 2010 - my xaps are much smaller. However, when the same projects are built by the build server, all the excluded references are once again in the xap file hence tripling the size of the xap. I've read several blogs/articles regarding similar experiences but no resolution. Very frustrating - any help is appreciated.

    Read the article

  • The SaveAs method is configured to require a rooted path, and the path <blah> is not rooted.

    - by Jen
    OK I've seen a few people with this issue - but I'm already using a file path, not a relative path. My code works fine on my PC, but when another developer goes to upload an image they get this error. I thought it was a security permission thing on the folder - but the system account has full access to the folder (though I get confused about how to test which account the application is running under). Also usually running locally doesn't often give you too many security issues :) A code snippet: Guid fileIdentifier = Guid.NewGuid(); CurrentUserInfo currentUser = CMSContext.CurrentUser; string identifier = currentUser.UserName.Replace(" ", "") + "_" + fileIdentifier.ToString(); string fileName1 = System.IO.Path.GetFileName(fileUpload.PostedFile.FileName); string Name = System.IO.Path.GetFileNameWithoutExtension(fileName1); string renamedFile = fileName1.Replace(Name, identifier); string path = ConfigurationManager.AppSettings["MemberPhotoRepository"]; String filenameToWriteTo = path + currentUser.UserName.Replace(" ", "") + fileName1; fileUpload.PostedFile.SaveAs(filenameToWriteTo); Where my config settings value is: Again this works fine on my PC! (And I checked the other person has the folder on their PC). Any suggestions would be appreciated - thanks :)

    Read the article

  • Looking for an object database

    - by saille
    I'm looking for an object database for .NET that is open source and free for commercial use. I need something that is available as assemblies and/or source code to embed into a project, i.e. not a stand alone database in its own process. I am aware of db4o, and it would be perfect except for the commercial license coming at a price.

    Read the article

  • Using fields from an association (has_many) model with formtastic in rails

    - by pduersteler
    I searched and tried a lot, but I can't accomplish it as I want.. so here's my problem. class Moving < ActiveRecord::Base has_many :movingresources, :dependent => :destroy has_many :resources, :through => :movingresources end class Movingresource < ActiveRecord::Base belongs_to :moving belongs_to :resource end class Resource < ActiveRecord::Base has_many :movingresources has_many :movings, :through => :movingresources end Movingresources contains additional fields, like "quantity". We're working on the views for 'bill'. Thanks to formtastic to simplify the whole relationship thing by just writing <%= form.input :workers, :as => :check_boxes %> and i get a real nice checkbox list. But what I haven't found out so far is: How can i use the additional fields from 'movingresource', next or under each checkbox my desired fields from that model? I saw different approaches, mainly with manually looping through an array of objects and creating the appropriate forms, using :for in a form.inputs part, or not. But none of those solutions were clean (e.g. worked for the edit view but not for new because the required objects were not built or generated and generating them caused a mess). I want to know your solutions for this! :-)

    Read the article

  • application: didFinishLaunchingWithOptions doesn't execute, but RootViewController: viewDidLoad does

    - by BeachRunnerJoe
    I'm playing around with the iPad SplitView template and it was working fine before I started swapping out view objects in my RootViewController. When it was working fine, the application:didFinishLaunchingWithOptions method would be called and would setup my persistant store objects, then the RootViewController:viewDidLoad method would be called to populate my rootView with data from my store. I opened up IB and started swapping out view objects in my RootView and now the application:didFinishLaunchingWithOptions method never gets called, but the RootViewController:viewDidLoad method still does. Obviously, the app crashes because the viewDidLoad method depends on the successful execution of the didFinishLauchingWIthOptions method to setup the persistent store objects. Does anyone have any thoughts on what is causing this or how I can go about investigating what's causing this? I'm obviously new to iPhone OS development, so I apologize if this questions is absurd in any way. Thanks so much in advance for your help!

    Read the article

  • What tasks aren't easy for PHP, ColdFusion and ASP?

    - by boost
    PHP, ColdFusion, and ASP (among many others) are usually sold on their strengths. What are their weaknesses? If one were to develop a niche product to handle the things that these products weren't so good at, what should it focus on? EDIT I'm trying to figure out what things PHP etc are bad at. They're all good at doing the nuts and bolts stuff, if one is looking with a bottom-to-top mindset. I'm thinking a little more globally, more top-to-bottom; what's difficult to achieve in PHP/ASP/CF without thousands of lines of code and twenty minutes of server time? EDIT Suppose company A comes up to you and says, "We want you to do x in PHP." What values of x will cause you to say, "Forget it, buddy, no one in their right mind would use PHP for that"? (swap PHP in the above quote for your favourite tool) EDIT Have we got to the point where everyone's needs can be met with PHP frameworks, Rails and ... er ... Java?

    Read the article

  • VB.NET GroupBy LINQ statement

    - by Jason
    I am having a bear of a time getting this to work. I have a List(Of MyItem) called Items that have a OrderId property on them. From those items, I want to create a list of Orders. Some items will have the same OrderId so I want to try to group by OrderId. I then want to sort by date. Here's what I have so far: Public ReadOnly Property AllOrders() As List(Of Order) Get Return Items.Select(Function(i As MyItem) New Order(i.OrderID)) _ .GroupBy(Function(o As Order) New Order(o.OrderID)) _ .OrderBy(Function(o As Order) o.DateOrdered).ToList End Get End Property This, of course, doesn't compile, and I get the error: Value of type 'System.Collections.Generic.List(Of System.Linq.IGrouping(Of Order, Order))' cannot be converted to 'System.Collections.Generic.List(Of Order))' I've bolded the part where I think the problem is, but I have no idea how to fix it. Also, it used to work fine (except there were duplicate values) before I added the .GroupBy statement. Anyone have any ideas? Thanks

    Read the article

  • Help with google maps api, user allowed marker map

    - by Exilekiller
    Without telling everyone too much about my new idea for a website, Pretty much I need help, maybe someone can help write it up, with a site that has a simple map that allows any user to double click the map and make a marker. When the marker comes up I just want Title and Description available for edit(only once, so others cant change it). I have been trying to figure this out myself but computer science isnt my major so its killing me. Thanks for the help

    Read the article

  • How do I automatically add icons to windows 7 task bar?

    - by Nick
    Hi, I use the Microsoft Deployment Toolkit to install images and applications using a Lite-touch installation method. I would like to automatically add the icons to the "superbar" after installation so the users will be more inclined to use the improved task bar, rather than continuing to use desktop icons. I understand that there is no programmatic access to the task bar to prevent applications from adding themselves to the task bar, filling it with unwanted applications. Is there a way to use MDT, or even GPO to add icons to the task bar, or shall I use a VBS to add the Start menu shortcuts to the task bar?

    Read the article

  • Linux Directory Access Problem: Permission Denied """In Root"""

    - by RBA
    Hi, When login through root on HP-tru Unix server, I am trying to access a directory, it is saying "Permission Denied".. Also, an sh file is also not able to execute through same root access.. I have checked the permission of the directory as well as for sh file through ls-ltr.. It is also fine.. Root System rwx-rwx-rwx-- What could be the possible cause, and how to correct it.. Thanks.

    Read the article

  • Monitor does not work past certain resolution.

    - by Steve Stifler
    I have a Macbook 5.1 with Snow Leopard, and a Samsung SyncMaster 2253BW that I use for an external monitor. I connect it to my laptop via a DVI-to-MiniDisplayPort adapter. Whenever I try to set the resolution of the monitor to 1680x1050, its maximum resolution (at least the only one that fills the entire screen), the screen flickers once or twice before claiming there is no source attached. I've had this issue since the first time I tried to connect the two, however for some reason for a brief period in time the monitor would successfully display at full resolution. All lower resolutions work fine too, it's just at 1680x1050 that the problems occur. Any ideas as to why this is happening? Thanks.

    Read the article

  • Jquery click bindings are not working correctly when binding multiple copies

    - by KallDrexx
    I seem to have an issue when creating copies of a template and tying the .click() method to them properly. Take the following javascript for example: var list; // Loop through all of the objects var topics = data.objects; for (x = 0; x < objects.length; x++) { // Clone the object list item template var item = $("#object_item_list_template").clone(); // Setup the click action and inner text for the link tag in the template var objectVal = objects[x].Value; item.find('a').click(function () { ShowObject(objectVal.valueOf(), 'T'); }).html(objects[x].Text); // add the html to the list if (list == undefined) list = item; else list.append(item.contents()); } // Prepend the topics to the topic list $("#object_list").empty().append(list.contents()); The problem I am seeing with this is that no matter which item the user clicks on in the #object_list, ShowObject() is called with the last value of objectVal. So for example, if the 3rd item's <a> is clicked, ShowObject(5,'T'); is called even though objects[2].Value is successfully being seen as 2. How can I get this to work? The main purpose of this code is to take a variable number of items gotten from a JSON AJAX request, make copies of the item template, and insert those copies into the correct spot on the html page. I decided to do it this way so that I can keep all my HTML in one spot for when I need to change the layout or design of the page, and not have to hunt for the html code in the javascript.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >