Search Results

Search found 4084 results on 164 pages for 'contact'.

Page 21/164 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • ASP.NET MVC2 - specific fields in form pass via a specific object?

    - by ile
    In database I have Contacts table: ContactID (int) FirstName (varchar) LastName (varchar) ... XmlFields (xml) // This field is xml type To create a new contact, I created two classes - one for regular fields and other to display fields from XmlFields field. In Controller, I have following: public ActionResult Create(Contact contact, FormCollection collection) ... Regular field I catch with contact object and those that need to be stored as xml in XmlFields I try to catch with collection object. Problem is that collection object catches all fields, so I wonder if it is possible to isolate xml fields when posting to a specific object so that I can easily manipulate with them. I need this in separated objects because these xml fields are going to be generated dynamically and will be different for every user. Thanks in advance, Ile

    Read the article

  • anonymous ASP.net form with SSL

    - by user307852
    Hi I want to create contact form with SSL I have anonymous webapplication and won't be any login usecase, so whole webapplication must work via http:// but when user go to contact form, it must work via https:// I know how to do the redirect to https:// programatically, I've been searching how to configure SSL on IIS but it seems to not be the case?? I don't wont whole webappliation to work via https, only my contact form - how to do that and how o onfigure that? The data from my form will be passed to database, but it is not important here.

    Read the article

  • A beginner's JSF question about form validation

    - by Nitesh Panchal
    Hello, I am having a form and many input elements in that. I want certain fields to be validated, so i keep validateLenth etc on those. And i want some fields to not be validated. For example, i have contact information and address information both on the same page. I want to treat contact information as one group. So if some fields are invalid they should not be submitted and address information to be independent of contact information. Thus, if address information is corrected it should be submitted. I have one form only on the page but two buttons, one for address and one for contact. Simply put :- What is the equivalent of validationGroup of Asp.Net in JSF?

    Read the article

  • jQuery: Main nav items selected depending on URL or page name

    - by Ricardo
    Ok, I've looked all over for a solution for this but so far I'm unable to find anything related to what I need to accomplish. What I need is very simple as far as logic goes. I have a nav bar like this one: <nav> <ul> <li><a href="download.shtml">Download</a></li> <li><a href="documentation.shtml">Documentation</a></li> <li><a href="contact.shtml">Contact</a></li> <li><a href="about.shtml">About</a></li> </ul> </nav> And the URLs of the site are straightforward: http://domain.net/download.shtml http://domain.net/documentation.shtml http://domain.net/contact.shtml http://domain.net/about.shtml Question: How can I detect which page/URL I'm on and add a class of .active to the corresponding nav item? The end result would be, for example if I'm in the Download page: <nav> <ul> <li><a href="download.shtml" class="active">Download</a></li> <li><a href="documentation.shtml">Documentation</a></li> <li><a href="contact.shtml">Contact</a></li> <li><a href="about.shtml">About</a></li> </ul> </nav> Thanks in advance for any help on this matter.

    Read the article

  • How do I correctly use generics?

    - by ninjasense
    I basically am making webrequests and recieving a JSON response. Depending on the request, I am parsing JSON request into objects I have created. The parsing is pretty much the same no matter what the object Im parsing into looks like. So I have a bunch of methods doing the same work only with different objects, I was wondering how I could accomplish this with generics? Here is an example public static ArrayList<Contact> parseContacts(String responseData) { ArrayList<Contact> Contacts = new ArrayList<Contact>(); try { JSONArray jsonContacts = new JSONArray(responseData); if (!jsonContacts.isNull(0)) { for (int i = 0; i < jsonContacts.length(); i++) { Contacts.add(new Contact(jsonContacts.getJSONObject(i))); } } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { } return Contacts; }

    Read the article

  • How do I create a collection_select in the View of a model that belongs_to another?

    - by Angela
    In the _form for creating a new Contact, I want to be able to create a drop-down which allows the User to select the Campaign the Contact will belong to. In the controller, I created a collection called @campaigns. And I tried to use the following but not getting it to work: <p> <%= f.label :campaign_id %><br /> <%= f.collection_select(:contact, :campaign_id, @campaigns, :id, :name) %> </p> Basically, I want to display the available :name of the campaigns, and then submit the campaign_id associated with the selected campaign to the Contact model when it gets saved.

    Read the article

  • Programmatically filtering contacts in Outlook 2010 Add-In

    - by Leon Havin
    I am trying to programmatically filter Outlook contacts in the Contacts folder in Outlook 2010. I followed DASL filter rules, but it seems working for Find function and throws exception when I assign this filter to view.Filter = FilterString. Any ideas what I am doing wrong? The correct result would display filtered contacts in the existing contacts view. Outlook.Application myApp = ThisAddIn.myApp; Outlook.NameSpace myNamespace = ThisAddIn.nSpace; Outlook.MAPIFolder myContactsFolder = ThisAddIn.contactsFolder; if (myContactsFolder == null) { Log.Verbose("Contacts folder not found"); return null; } Outlook.Items contactItems = ThisAddIn.contactItems; //use filter to take only contact and not DistListItem Outlook.Items outlookContacts = contactItems.Restrict("[MessageClass] = 'IPM.Contact'"); Outlook.ContactItem contact = null; int iOutlookContacts = contactItems.Count; if (iOutlookContacts > 0) { string FilterString = "[FullName]='" + param + "'"; // Find works with this filter contact = (Outlook.ContactItem)outlookContacts.Find(FilterString); if (contact != null) { // need to display in contacts search window Outlook.View currentView = myApp.ActiveExplorer().CurrentView; currentView.Filter = FilterString; // cannot parse exception occurs here currentView.Save(); currentView.Apply(); } }

    Read the article

  • Getting an non-object error in my php script

    - by Disowned
    Hey I was trying to call a script to made some changes to an html file, however when I run the script it tells me that it's making a call to a non-object. Obviously I did something wrong, but what? Here's the script. /*Dom controllers*/ $dom = new DOMDocument(); $dom->loadHTML('index.html'); $id = $dom->getElementById('contact_us'); $p = $dom->appendChild(new DOMElement('p')); $op = $dom->getElementsByTagName('p'); /* Dem POST vars used by dat Ajax mah ziggen, yeah boi*/ if (isset($_POST['Home']) && isset($_POST['About']) && isset($_POST['Contact']) && isset($_POST['sexyText'])){ $home = $_POST['Home']; $about = $_POST['About']; $contact = $_POST['Contact']; $text = $_POST['sexyText']; trim($home); trim($about); trim($contact); trim($text); } function post(){ global $dom, $id, $home, $about, $contact, $text, $textp, $p, $op; $textp = $dom->createTextNode($text); $p->appendChild($textp); $id->replaceChild($p, $op); $dom->saveHTMLFile('index.html'); } post(); echo 1; ?> The error happens at the replaceChild function.

    Read the article

  • Trying to created a tabled layout won't work with CSS

    - by ct2k7
    Hello, I'm trying to recreate a sort of table layout of a contact form. Here's the current form: http://www.radonsystems.net/contact-us and this is what the work-in-progress is like http://www.radonsystems.net/newsite/?do=contact-us As you can see, there is an issue with the second form - I just don't know how to fix it. Any ideas on what I'm doing wrong? The style (CSS) for that part, is nearly 100% copied over, only that I've changed the font, but kept within same family.

    Read the article

  • not able to register sip user on red5server, using red5phone

    - by sunil221
    I start the red5, and then i start red5phone i try to register sip user , details i provide are username = 999999 password = ** ip = asteriskserverip and i got --- Registering contact -- sip:[email protected]:5072 the right contact could be --- sip :99999@asteriskserverip this is the log: + SipUserAgent - listen - Init... Red5SIP register [SIPUser] register RegisterAgent: Registering contact (it expires in 3600 secs) RegisterAgent: Registration failure: No response from server. [SIPUser] SIP Registration failure Timeout RegisterAgent: Failed Registration stop try. Red5SIP Client leaving app 1 Red5SIP Client closing client 35C1B495-E084-1651-0C40-559437CAC7E1 Release ports: sip port 5072 audio port 3002 Release port number:5072 Release port number:3002 [SIPUser] close1 [SIPUser] hangup [SIPUser] closeStreams RTMPUser stopStream [SIPUser] unregister RegisterAgent: Unregistering contact SipUserAgent - hangup - Init... SipUserAgent - closeMediaApplication - Init... [SIPUser] provider.halt RegisterAgent: Registration failure: No response from server. [SIPUser] SIP Registration failure Timeout

    Read the article

  • CodeIgniter Form Validation

    - by mmcglynn
    I am trying to set up validation on a simple contact form that is created using the form helper. No validation at all occurs. What is wrong? In the code below, the “good” keyword always shows, regardless of what is entered into the form, and the saved values set via set_value are never shown. Controller // Contact function contact() { $data['pageTitle'] = "Contact"; $data['bodyId'] = "contact"; $this->load->library('form_validation'); $config_rules = array ('email' => 'required','message' => 'required'); $this->form_validation->set_rules($config_rules); if ($this->form_validation->run() == FALSE) { echo "bad"; $data['include'] = "v_contact"; $this->load->view('v_template',$data); } else { echo "good"; $data['include'] = "v_contact"; $this->load->view('v_template',$data); } } View echo validation_errors(); echo form_open('events/contact'); // name echo form_label('Name', 'name'); $data = array ( 'name' => 'name', 'id' => 'name', 'maxlength' => '64', 'size' => '40', 'value' => set_value('name') ); echo form_input($data) . "\n<br />"; // email address echo form_label('Email Address', 'email'); $data = array ( 'name' => 'email', 'id' => 'email', 'maxlength' => '64', 'size' => '40', 'value' => set_value('email') ); echo form_input($data) . "\n<br />"; // message echo form_label('Message', 'message'); $data = array ( 'name' => 'message', 'id' => 'message', 'rows' => '8', 'cols' => '35', 'value' => set_value('message') ); echo form_textarea($data) . "\n<br />"; echo form_submit('mysubmit', 'Send Message'); echo form_close();

    Read the article

  • Getting contacts when ids are known

    - by frieza
    Hi, I have a list of 'n' contact ids corresponding to which I need to obtain the contact details. One simple way to make n queries using the contact ids and retrieve those contacts. But this will be very time-consuming especially if n is large. I would like to know if there is any simpler way to obtain these results (like batch query etc).

    Read the article

  • Bind Child table data on View field- MVC ASP.Net

    - by Tassadaque
    I have two tables Contact and Addresses. Addresses is the child table of Contact. When i create view for Contact. i also want to get addresses for user as many as user wants. For contact table i bind the textbox and add validation like this <%= Html.TextBoxFor(model => model.ContactName) %> <%= Html.ValidationMessageFor(model => model.ContactName) %> Now my question is that how can i bind address field on create view screen. Regards Tassadaque

    Read the article

  • How to send complete POST to Model in Code Igniter

    - by Constant M
    Hi there, What would be the best way to send a complete post to a model in Code Igniter? Methods I know are as follow: Name form elements as array, eg. <input type="text" name="contact[name]"> <input type="text" name="contact[surname]"> and then use: $this->Model_name->add_contact($this->input->post('contact')); The other would be to add each element to an array and then send it to the model as such: <input type="text" name="name"> <input type="text" name="surname"> and $contact_array = array('name' => $this->input->post('name'), 'surname' => $this->input->post('surname')); $this->Model_name->add_contact($this->input->post('contact')); Which one of these would be best practice, and is there a way to directly send a whole POST to a model (or a whole form maybe?)

    Read the article

  • anonymous ASP.net form with SSL, sharepoint

    - by user307852
    Hi I want to create contact form with SSL. I have created simple asp.net contact form without ssl and now i must add it. It is in Sharrepoint project but seems to be the same case as in asp.net form. I have anonymous webapplication and won't be any login usecase, so whole webapplication must work via http:// but when user go to contact form, it must work via https:// I know how to do the redirect to https:// programatically, I've been searching how to configure SSL on IIS but it seems to not be the case?? I don't wont whole webappliation to work via https, only my contact form - how to do that and how o onfigure that? The data from my form will be passed to database, but it is not important here.

    Read the article

  • Hibernate mapping to manage bidirectional relationship using intermediate table

    - by shikarishambu
    I have an object hierarchy that is as follows. Party inherited by Organization and Person Organization inherited by Customer, Vendor Person inherited by Contact In the database I have the following tables Party, Customer, Vendor, Contact. All of them have a corresponding row in Party table. Contact belongs to either Vendor or Customer. I have a field on the Contact table for org_party_id. However, since the organization can be either a Customer or Vendor I need to be able to look at different tables. Is there a way to map this in hibernate? Or, a better way to manage it in DB/ hibernate?

    Read the article

  • How to select "child" entities in subview?

    - by Andy
    I am trying to manage a drill-down list of data. I've got an entity, Contact, that has a to-many relationship with another entity, Rule. In my root view controller, I use a fetched results controller to manage and display the list of Contacts. When a Contact is tapped, I push a new view controller onto the stack with a list of the Contact's Rules. I have not been able to figure out how to use a second fetched results controller to display the Rules, so I'm using the following: // create a set of the contact's rules rules = [NSMutableSet set]; rules = [self.contact mutableSetValueForKey:@"rule"]; // create an array of rules from the set arrayOfRules = [NSMutableArray arrayWithCapacity:[rules count]]; for (id oneObject in rules) [arrayOfRules addObject:oneObject]; // sort the array of rules NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"phoneLabel" ascending:YES]; [arrayOfRules sortUsingDescriptors:[NSArray arrayWithObject:descriptor]]; [descriptor release]; I create a set of Rules, then use that to create an array of Rules for sorting. I then use these two collections to populate the grouped table view. All of this appears to be working correctly. Here's my problem: There are several different actions a user can take in this view, and most of them require that I know which Rule was tapped. But I can't figure out how to get that. For instance, say a user wants to delete a Rule. It seems to me the proper approach is something like... [rules removeObject:ruleObjectToBeRemoved] ...but I can't figure out how to specifiy ruleObjectToBeRemoved. I hope all of this makes sense. As usual, thanks in advance for any advice you can offer.

    Read the article

  • Can I add a custom method to Core Data-generated classes?

    - by Andy
    I've got a couple of Core Data-generated class files that I'd like to add custom methods to. I don't need to add any instance variables. How can I do this? I tried adding a category of methods: // ContactMethods.h (my category on Core Data-generated "Contact" class) #import "Contact.h" @interface Contact (ContactMethods) -(NSString*)displayName; @end ... // ContactMethods.m #import "ContactMethods.h" @implementation Contact (ContactMethods) -(NSString*)displayName { return @"Some Name"; // this is test code } @end This doesn't work, though. I get a compiler message that "-NSManagedObject may not respond to 'displayName' " and sure enough, when I run the app, I don't get "Some Name" where I should be seeing it.

    Read the article

  • Rewrite only URLs that don't exist

    - by PeterBelm
    I'm looking for a way to rewrite URLs only if the path doesn't exist. This isn't to handle 404s, but to redirect page URLs to a shared PHP file (ie: '/contact-us/' - '/show_page.php?page=contact-us'). The basic redirect is easy enough to achieve, however I want to be able to override the default page by adding '/contact-us/index.php' in the site root. Is this achievable with mod_rewrite or would I have to do something else?

    Read the article

  • Backbone.js Model validation fails to prevent Model from saving

    - by Benjen
    I have defined a validate method for a Backbone.js Model. The problem is that even if validation fails (i.e. the Model.validate method returns a value) the post/put request is still sent to the server. This contradicts what is explained in the Backbone.js documentation. I cannot understand what I am doing wrong. The following is the Model definition: /** * Model - Contact */ var Contact = Backbone.Model.extend({ urlRoot: '/contacts.json', idAttribute: '_id', defaults: function() { return { surname: '', given_name: '', org: '', phone: new Array(), email: new Array(), address: new Array({ street: '', district: '', city: '', country: '', postcode: '' }) }; } validate: function(attributes) { if (typeof attributes.validationDisabled === 'undefined') { var errors = new Array(); // Validate surname. if (_.isEmpty(attributes.surname) === true) { errors.push({ type: 'form', attribute: 'surname', message: 'Please enter a surname.' }); } // Validate emails. if (_.isEmpty(attributes.email) === false) { var emailRegex = /^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,6}$/i; // Stores indexes of email values which fail validation. var emailIndex = new Array(); _.each(attributes.email, function(email, index) { if (emailRegex.test(email.value) === false) { emailIndex.push(index); } }); // Create error message. if (emailIndex.length > 0) { errors.push({ type: 'form', attribute: 'email', index: emailIndex, message: 'Please enter valid email address.' }); } } if (errors.length > 0) { console.log('Form validation failed.'); return errors; } } } }); Here is the View which calls the Model.save() method (see: method saveContact() below). Note that other methods belonging to this View have not been included below for reasons of brevity. /** * View - Edit contact form */ var EditContactFormView = Backbone.View.extend({ initialize: function() { _.bindAll(this, 'createDialog', 'formError', 'render', 'saveContact', 'updateContact'); // Add templates. this._editFormTemplate = _.template($('#edit-contact-form-tpl').html()); this._emailFieldTemplate = _.template($('#email-field-tpl').html()); this._phoneFieldTemplate = _.template($('#phone-field-tpl').html()); // Get URI of current page. this.currentPageUri = this.options.currentPageUri; // Create array to hold references to all subviews. this.subViews = new Array(); // Set options for new or existing contact. this.model = this.options.model; // Bind with Model validation error event. this.model.on('error', this.formError); this.render(); } /** * Deals with form validation errors */ formError: function(model, error) { console.log(error); }, saveContact: function(event) { var self = this; // Prevent submit event trigger from firing. event.preventDefault(); // Trigger form submit event. eventAggregator.trigger('submit:contactEditForm'); // Update model with form values. this.updateContact(); // Enable validation for Model. Done by unsetting validationDisabled // attribute. This setting was formerly applied to prevent validation // on Model.fetch() events. See this.model.validate(). this.model.unset('validationDisabled'); // Save contact to database. this.model.save(this.model.attributes, { success: function(model, response) { if (typeof response.flash !== 'undefined') { Messenger.trigger('new:messages', response.flash); } }, error: function(model, response) { console.log(response); throw error = new Error('Error occured while trying to save contact.'); } }, { wait: true }); }, /** * Extract form values and update Contact. */ updateContact: function() { this.model.set('surname', this.$('#surname-field').val()); this.model.set('given_name', this.$('#given-name-field').val()); this.model.set('org', this.$('#org-field').val()); // Extract address form values. var address = new Array({ street: this.$('input[name="street"]').val(), district: this.$('input[name="district"]').val(), city: this.$('input[name="city"]').val(), country: this.$('input[name="country"]').val(), postcode: this.$('input[name="postcode"]').val() }); this.model.set('address', address); } });

    Read the article

  • Alternate value of "FeedUri" for contacts entry .

    - by Preeti
    Hi, I am trying to create a contact on Google Apps. I am using Admin credential to create contact in other users in same domain. Problem i am facing is when i use: Uri feedUri = new Uri(ContactsQuery.CreateContactsUri("default")); ContactEntry createdEntry = (ContactEntry)service.Insert(feedUri, ContactEntry[0]); It is adding contact in Admin account but i a want to put contact in other user's account. How can i do that? I am using Google Apps API version 2 for .NET. Thanx

    Read the article

  • PHP parameter without value using for navigation

    - by somewalri
    Hello, I am trying to set up a navigation system that uses GET parameters with no value, example: http://foo.bar/?mainPage takes the visitor to the main page. So I am using if statements and I am wondering if there is a way I can do this without a bunch of if statements? I don't think switch statements would work for this. This is currently what I have: $mainPage = $_GET['mainPage']; $contact = $_GET['contact']; if(isset($mainPage)) { // go to main page } if(isset($contact)) { // go to contact page } I don't want to have to end up writing a ton of if statements, though. Any ideas? Thanks.

    Read the article

  • How do you find local fellow programmers?

    - by Pepijn
    I'm a self-tought programmer living in a small town. Except for the occasional meetups at the other end of the country, I rarely talk face-to-face with other programmers. I'm well aware of the merits of pair programming, feedback, discussion with other programmers and all... What do you do to get in contact with other local programmers? p.s. If you live near Loenen (gld), Netherlands, I'd like to have contact ;)

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >