I want to use a validator to ensure 2 password fields match in Flex. I want the validator to highlight form fields like a normal flex validation control. Thanks.
System.Windows.Forms.Form has only one scroll event-Scroll, but it is necessary to recognize scrolling up and scrolling down.Could you tell me,how to do this?
Hi, can I use cookie information in flex? Suppose a user logs in first time in login form (designed in flex) and when he logs in again I need to show users name in dropdown from cookies, is it possible in flex? Is there any way I can do please suggest me Thanks in Advance.
hi
i am trying to set up a home page with an email form, where i can fill out email address and subject and comments and the php page will run
mail -s [email protected] $comments
how can I do this via php to call the linux command?
thanks in advance
I'm developing a form with PHP and jQuery.
Here is the link:
http://www.yamaha-motor.com.pe/extreme/php/yamaha/registro/FrmRegistro01.php
It works fine on Firefox but not on IE.
What can you advise me??
Thanks
I found this snippet of code here that allows you to log into a website and get the response from the logged in page. However, I'm having trouble understanding all the part of the code. I've tried my best to fill in whatever I understand so far. Hope you guys can fill in the blanks for me. Thanks
string nick = "mrbean";
string password = "12345";
//this is the query data that is getting posted by the website.
//the query parameters 'nick' and 'password' must match the
//name of the form you're trying to log into. you can find the input names
//by using firebug and inspecting the text field
string postData = "nick=" + nick + "&password=" + password;
// this puts the postData in a byte Array with a specific encoding
//Why must the data be in a byte array?
byte[] data = Encoding.ASCII.GetBytes(postData);
// this basically creates the login page of the site you want to log into
WebRequest request = WebRequest.Create("http://www.mrbeanandme.com/login/");
// im guessing these parameters need to be set but i dont why?
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
// this opens a stream for writing the post variables.
// im not sure what a stream class does. need to do some reading into this.
Stream stream = request.GetRequestStream();
// you write the postData to the website and then close the connection?
stream.Write(data, 0, data.Length);
stream.Close();
// this receives the response after the log in
WebResponse response = request.GetResponse();
stream = response.GetResponseStream();
// i guess you need a stream reader to read a stream?
StreamReader sr = new StreamReader(stream);
// this outputs the code to console and terminates the program
Console.WriteLine(sr.ReadToEnd());
Console.ReadLine();
Hi, I'm writing a POS application for the iPhone/iPod combination, using the same exact hardware used in Apple Stores:: EasyPay.
Ok, my hurdle is this: how do I identify which credit card type is being used as text is entered in the uitextfield?
I assume I've to use textField:shouldChangeCharactersInRange:replacementString:? However, I've got ideas floating around, but I simple cannot put them together to form code :/
Any help is appreciated!
Thanks in advanced :D
Hi
I have image upload form, user attaches aimage file, and selects image size to resize the uploaded image file(200kb, 500kb, 1mb, 5mb, Original). Then my script needs to resize image file size based on user's optional size, but im not sure how to implement this feature,
For example, user uploads image with one 1mb size, and if user selects 200KB to resize, then my script should save it with 200kb size.
Does anyone know or have an experience on similar task ?
Thanks for you reply in advance.
Does the calendar application in android maintains a cache of its database??
Whenever i edit and mark some events via tha calendar app it is stored in the database but if i edit the calendar.db from some outside source the changes made are not reflected in the calendar app. so my question is does the calendar app maintains a cache or some other form of database?? if yes then where and how??
i am developing a video player for a local tv channel, which is working well but the main problem is a 1-2 seconds pause between changing one video to second video how can i control that pause so that the video comming next should be played right after the currnet video finished with not any pause or stoping or blank screen effect......
i am using windows media player in my vb.net form for video playback...
I am trying to create a file upload field that has a little bit of style to it, but I seem to be having problems finding examples of this. I know part of the reason is that the field itself varies from browser to browser.
Any ideas how to do this? Or is there a way to do this without using a file element of a form that can be styled?
How do I reset an asp.net validation control via JavaScript? The current code sample clears the error message text but does not reset the validation control for the next form submission.
var cv= document.getElementById("<%= MyValidationContorl.ClientID %>");
cv.innerHTML = '';
Hello,
I know it's not really a programming question but I don't know where to ask it.
Should i use a captcha in my sign up form ?
Facebook, twitter, foursquare, gowalla etc... don't use one (or not a visible one). Is there an invisible catpcha on theses sites ?
Thank you
How do I configure Ruby on Rails to output standard HTML code instead of XHTML when using helpers (form, javascript, css, etc.)?
I don't want to have the slash at the end:
<input name="email" type="text" />
Does anyone have a no JavaScript way to make HTML checkbox still submit a value? As in if you check it the form submission will include a value A but if it is uncheck it still contains a value B?
While I figure there isn't any way, I'm working on a site which needs to still be function when JS is off, and this would be ideal.
Hello,
I have a form (Rails) which allows me to load a .csv file using the file_field.
In the view:
<% form_for(:upcsv, :html => {:multipart => true}) do |f| %>
<table>
<tr>
<td><%= f.label("File:") %></td>
<td><%= f.file_field(:filename) %></td>
</tr>
</table>
<%= f.submit("Submit") %>
<% end %>
Clicking Submit redirects me to another page (create.html.erb). The file was loaded fine, and I was able to read the contents just fine in this second page. I am trying to show the number of lines in the .csv file in this second page.
My controller (semi-pseudocode):
class UpcsvController < ApplicationController
def index
end
def create
file = params[:upcsv][:filename]
...
#params[:upcsv][:file_length] = file.length # Show number of lines in the file
#params[:upcsv][:file_length] = file.size
...
end
end
Both file.length and file.size returns '91' when my file only contains 7 lines. From the Rails documentation that I read, once the Submit button is clicked, Rails creates a temp file of the uploaded file, and the params[:upcsv][:filename] contains the contents of the temp/uploaded file and not the path to the file. And I don't know how to extract the number of lines in my original file. What is the correct way to get the number of lines in the file?
My create.html.erb:
<table>
<tr>
<td>File length:</td>
<td><%= params[:upcsv][:file_length] %></td>
</tr>
</table>
I'm really new at Rails (just started last week), so please bear with my stupid questions.
Thank you!
I have a Rails (2.3.5) application where there are many groups, and each Group has_many People. I have a Group edit form where users can create new people. When a new person is created, they are sent an email (the email address is user entered on the form).
This is accomplished with an observer on the Person model. The problem comes when ActionMailer throws an exception - for example if the domain does not exist. Clearly that cannot be weeded out with a validation.
There would seem to be 2 ways to deal with this:
A begin...rescue...end block in the observer around the mailer.
The problem with this is that the only way to pass any feedback to the user would be to set a global variable - as the observer is out of the MVC flow, I can't even set a flash[:error] there.
A rescue_from in the Groups controller.
This works fine, but has 2 problems. Firstly, there is no way to know which person threw the exception (all I can get is the 503 exception, no way to know which person caused the problem). This would be useful information to be able to pass back to the user - at the moment, there is no way for me to let them know which email address is the problem - at the moment, I just have to chuck the lot back at them, and issue an unhelpful message saying that one of them is not correct. Secondly (and to a certain extent this make the first point moot) it seems that it is necessary to call a render in the rescue_from, or it dies with a rather bizarre "can't convert Array into String" error from webbrick, with no stack trace & nothing in the log. Thus, I have to throw it back to the user when I come across the first error and have to stop processing the rest of the emails.
Neither of the solutions are optimal. It would seem that the only way to get Rails to do what I want is option 1, and loathsome global variables. This would also rely on Rails being single threaded.
Can anyone suggest a better solution to this problem?
This is my code:
<html>
<head>
<title>scoreboard</title>
<script>
function calculate() {
var sum=0; var total=0;
for (var i=0; i < document.questions.group1.length; i++){
if (document.questions.group1[i].checked){
sum = parseInt(document.questions.group1[i].value)
total = parseInt(total + sum);}}
for (var i=0; i < document.questions.group2.length; i++){
if (document.questions.group2[i].checked){
sum = parseInt(document.questions.group2[i].value)
total = parseInt(total + sum);}}
for (var i=0; i < document.questions.group3.length; i++){
if (document.questions.group3[i].checked){
sum = parseInt(document.questions.group3[i].value)
total = parseInt(total + sum);}}
alert(total)
}
</script>
</head>
<body>
<form name="questions">
A:<br>
answer a1: <input type="radio" name="group1" value="0">
answer a2: <input type="radio" name="group1" value="1">
answer a3: <input type="radio" name="group1" value="2">
answer a4: <input type="radio" name="group1" value="3"><br>
B:<br>
answer b1: <input type="radio" name="group2" value="0">
answer b2: <input type="radio" name="group2" value="1">
answer b3: <input type="radio" name="group2" value="2">
answer b4: <input type="radio" name="group2" value="3"><br>
C:<br>
answer c1: <input type="radio" name="group3" value="0">
answer c2: <input type="radio" name="group3" value="1">
answer c3: <input type="radio" name="group3" value="2">
answer c4: <input type="radio" name="group3" value="3"><br><br>
<input type="button" value="total" onclick="calculate()">
</form>
</body>
</html>
How can I replace 'group[x]' in my code by a variable, so the three for-loops are replaced by one (because in reality there are a lot more questions and answers) ?
hello, I do not know about this but we have a vb.net application running in a good form. But now the top level management wants to access this application from their mobile and I do not know what to do . Is this possible ? please guide me on this...
What is the best way to take a string of html and turn it in to something useful?
Essentially if i take a url and go get the html from that url in .net i get a response but this would come in the form of either a file or stream or string.
What if i want an actual document or something I can crawl like an xmldocument object?
I have some thoughts and an already implemented solution on this but I am interested to see what the community thinks about this.
Cannot download the WMP 11 SDK. It is now included in the huge Windows SDK and I am not able to download it now.
I need to know the exact definition of WMP_PLUGINTYPE_DSP_OUTOFPROC in the form similar to WMP_PLUGINTYPE_DSP in the WMP 9 version of wmpservices.h which is:
EXTERN_GUID( WMP_PLUGINTYPE_DSP, 0x6434baea, 0x4954, 0x498d, 0xab, 0xd5, 0x2b, 0x7, 0x12, 0x3e, 0x1f, 0x4 );
Thanks in advance,
Andrea
Im using c#.net windows form application. I have a xml file. I have loaded the node names of that xml file into a treeview. Now my task is , when I select a particular node from the treview, I should be able to display its attributes in a combo box. Please help.
I have to set a select date field with the month and day discarded. So Month and day are hidden in the form which caused a "undefined method `options' for # (NoMethodError)" when executing the cucumber scenario.
How can i solve this issue and get the year correctly into the cucumber step ?