In Zend Framework how can I set the title properties of option elements within a select?
Desired output:
<option value="foo" title="bar">option</option>
I am wanting to use the Facebox plugin for JQuery but am having a few issues getting it running how I want. The div that houses the facebox content is created outside of the tag so even though I am loading up some web controls none of them are firing back to the server.
Has anyone dealt with this that can give me some pointers?
Hey,
In a MonoRail app I have an add/edit view. On add if I don't pick a value for a dropdown I get a validation error and am forced to pick a value. However, if I then edit that same item and reset the dropdown back to the first item ("Select an Item", "0"), it saves and doesn't say it was invalid. Debugging the entity sent back to the server, I can see that it's sending the original value for the dropdown instead of the new value of "0".
What's going on here? The first thing I would expect is that it would trigger the validation since the dropdown value isn't set. The second thing I would expect is that it would send the new value I send, not the original. It does send the new value if I change it to another value, but it's as if it has internal logic that says - "I'm updating this entity and a new value was not passed, just don't change the entity value."
Thanks,
Justin
Is there a simpler way to use uniqueness validation with Django Forms in AppEngine?
I understand that performance would be problem if we keep an uniqueness constraint but since the amount of data being added is very small performance is not a big concern, rather development time is a concern here.
Any help is appreciated.
I plan to create an interactive golf score card for my website (XHTML). (Btw. thats how such a scorecard looks like: ScoreCard). So at the end one should be able to insert a score for each hole in the appropriated input field in the virtual scorecard on the website. For me it is very important that the interactive scorecard really looks the same as the original (paper-) scorecard does and so my first approach was to scan and slice the scorecard image to reach that appearance.
Here you can see the way I sliced the image:
The idea was to insert HTML text input for each score field ending up with something like this:
After I sliced the image I reconstructed it using the HTML . To do that I put the image slices as the cell background.
<table>
<tr>
<td style="background: url("slice1.jpg") width="58px" height="25px">
<input type="text"></inputText>
</td>
</tr>
...
</table>
At the first moment this worked fine (as Gimp offers quite a nice feature for this). Then the problem was that I had to create a HTML table to create the exact layout. As you can see the lower part of the layout is split up into 3 columns. The middle column is split up into several (for each hole) rows. So the left and right column have to be spanned over those rows. Ok finally that worked, but it lead to some kind of scaling problem. If I zoom in or out on the table the middle column (and only that one) is not scaled the right way. Iam not able to fix this, and so I start doubting if this is the right technique for html image virtualization. Iam really no specialist in the area of creating websites, so I would really appriciate any help on this. Maybe there is a complete other and better technique to do that, as I think it is a common job in webcreation. I couldnt find any nice examples or tuts on that.
how to convert YUY2,YUV, RGB565 and More Video subtype into RGB24 Subtype Video in DirectShow + VC++
can u understand my question?
I have a Upstream filter its output is in YUY2 Format but i need to convert it into RGB24 Format.
Is there any inbuilt Filters in DirectShow or we have to convert it through my code.
i have already added ColorSpaceConverter But it is not Connecting with Smart Tee Input Pin.
I get this response from a web service call. Something like this
<Response>
<Control1 type = "DropdownList" value= "USA,UK,Sweden,UAE"/>
<Control2 type = "Textbox" value= "Contries"/>
<Control3 type = "Button" value= "None">
</Response>
Based on this I de-serialize it into List<Controls>.
Now I need to be able to dynamically create a winform based on these controls. My problem is the layout. I want to be able to create them nicely separated (If possible vertically aligned) in batches of lets say 5.So If I need 15 controls I have 3 columns and 5 rows.
What would be best way to achieve this? I know that I can use the inbuilt positioning properties like top, width etc., but maybe someone out there has done something similar in a better way.
what is the code if you want that only number should be inputted in an html textbox.
If you input letters there will be no letter that would show. If you input numbers, the numbers would show, please help
Hi all,
maybe my design is not good, or I don't see the obvious solution, but I want to subscribe to a buttonClick EventHandler of Form1 from outside form1.
For example I have a Controller and Form1 who are both instanced in the main function.
Now I want to subscribe a function from Controller to the buttonClick event from Button1_Click in Form1. But the button1 is declarded private, so i can't do
form1->Button1->Click += gcnew EventHandler(controller->function)
Is there any way to get around this?
Ok I could write a setter or something in Form1, but is there any other solution?
I read some examples, but they are all calling events from within the same class so they don't address my specific problem.
I have grid control
select
<%--Select--%
</ItemTemplate>
</asp:TemplateField>
</columns>
<pagersettings mode="NumericFirstLast" position="Top" pagebuttoncount="5" />
<pagerstyle backcolor="Pink" />
</cc:AppEngineGridView>
my code on row create
protected override void OnRowCreated(GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.ID = this.ID + "_" + e.Row.RowIndex;
e.Row.Attributes.Add("onmouseover", "this.style.cursor='pointer';this.style.font.weight='bolder';");
e.Row.Attributes.Add("onclick", "DoNav('" + ((LinkButton)e.Row.FindControl("lbtn1")).ClientID + "');");
}
}
protected void grduser_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
grdview_RowClickCommand(sender, e);
}
Javascript :
function DoNav(id)
{
$("#"+id).click();
}
Now my question is when i click on the row it do post back but it didnt call rowupdate event
How can do this i.e using javascript to call row update command of the grid.
Is it possible (and if so how) to redirect the url from a forms get variables into something more url friendly using IIS 7's URL Rewrite module. An example would be
/Catalog/Search/Title=Something&Order=Price
into
/Catalog/Search/Title/Something/Order/Price
Thanks for any suggestions
i tired and was unable to find the answer i am looking for an answer. my problem is that i am unable to update the values enterd in the form. I have attached all the files i'm using MYSQL database to fetch data.
what happens is that i'm able to add and delete records from form using jquery and PHP scripts to MYSQL database, but i am not able to update data which was retrived from database. the file structure is as follows
index.php is a file with jquery functions where it displays form for adding new data to MYSQL using save.php file and list of all records are view without refrishing page (calling load-list.php to view all records from index.php works fine, and save.php to save data from form)
- Delete is an function called from index.php to delete record from mysql database (function calling delete.php works fine)
- Update is an function called from index.php to update data using update-form.php by retriving specific record from mysql tabel, (works fine)
Problem lies in updating data from
update-form.php to update.php (in
which update query is wrriten for
mysql)
i had tried in many ways at last i had figured out that data is not being transfred from update-form.php to update.php there is a small problem in jquery ajax function where it is not transfering data to update.php page. some thing is missing in calling update.php page it is not entering into that page
I am new bee in programming i had collected this script from many forums and made this one.So i was limited in solving this problem i cam to know that this is good platform for me and many where we get a help to create new things..
please guide me with your help to complete my effors !!!!! i will be greatfull to all including ths site which gave me an oppurtunity to present my self..... please find the link below to download all files which is of 35kb (virus free assurance)
download mysmallform files in ZIPped format, including mysql query
thanks a lot in advance, May GOD bless YOU and THIS SITE
I'm in the process of making some improvements to a live Drupal site that's using the Domain Access module to run a number of microsites. I'm trying to find a way of restricting the menus a user can post content to from the node edit screen. A user on one of the domains should only be able to post content to menus associated with that domain.
Is there a simple way of achieving this? I'm guessing there are some hooks I could use, but so far I have been unable to identify them. I'd prefer not to have to install further modules to achieve this and to be able to add some code to the current site to alter the forms. The site is struggling with the large number of modules we've had to install on it already.
hi iam working on asp.net using c# project...iam facing a problem...the problem is,i had a master page in which iam using collapse pannel(ajax control)...
in collapse pannel i had folders like:-
xyz
abc
def
ghi....
and in xyz folder i had some forms....
nw the problem is that i had a search menu in my main page(comes after login)...after searching a grid view is open and in that there is a column name (suppose) XYZ...so when i click on items in that column then only i want xyz folder to be enable or viewed so that i acess forms in that folder....hw cud i do that..i search alot but didn't get the solution..plz help me go through this...
I want to load the image URL from my NSMutableArray.
Here is my Code:
id path = (NSString *)[[stories objectAtIndex: storyIndex] objectForKey: @"icon"];
NSURL *url = [NSURL URLWithString:path];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data cache:NO];
If I use: id path = @"http://www.xzy.de/icon.png"; it´s all right, but not if I want to extract the imageURL from my Array
Anyone who can help me?
Thanks!
Hey guys..
I basically have several links on the left side of the screen and on the right is a preview window. Below the preview window is another box for the affiliate link code. So what I am trying to do is create an affiliate page where you choose the banner size on the left by clicking on the link and on the right you see it dynamically change to the banner size and the code changes accordingly as well. So far I have the following code and it works but it seems very very cumbersome and bloated. Can you see if I can trim this down?
jQuery(".banner-style li").click(function() {
jQuery(".banner-style li").removeClass("selected");
jQuery(this).addClass("selected");
var $banner = jQuery(this).attr("class");
$banner = $banner.replace(" selected","");
jQuery(".preview img").fadeOut('fast',function() {
jQuery(".preview img").attr("src",
"http://localhost/site/banners/"+$banner+".jpg")
.fadeIn('slow');
});
jQuery(".code p").removeClass('hide').hide();
jQuery(".code p."+$banner).show();
});
Also to note the funny thing is in FF, when you click for the first to on any link, the original image on the right fades out and in real quick and then it loads the "clicked" image. This does not happen in other browsers...
Ii looks like this has been asked and answered in all the simple cases, excluding the one that i'm having trouble with. I've tried using a recursive CTE to generate this, however maybe a cursor would be better? or maybe a set of recursive functions will do the trick?
Can this be done in a cte?
consider the following table
PrimaryKey ParentKey
1 NULL
2 1
3 6
4 7
5 2
6 1
7 NULL
should yield
PK
1
-2
--5
-6
--3
7
-4
where the number of - marks equal the depth, my primary difficulty is the ordering.
I have a SQL 2008 table with a field called RecDate of type DateTimeOffset.
For a given record the value is '2010-04-01 17:19:23.62 -05:00'
In C# I create a DataTable and fill it with the results of "SELECT RecDate FROM MyTable".
I need to get the milliseconds, but if I do the following the milliseconds are always 0:
DateTimeOffset dto = DateTimeOffset.Parse(dt.Rows[0][0].ToString());
What is the proper way to get the value in the RecDate column into the dto variable?
Thanks!
Darvis
I'm using Zend_Navigation to create my nav. I want the URL to be domain.com/me and not domain.com/index/me. What is wrong with my config XML:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<nav>
<home>
<label>Home</label>
<controller>index</controller>
<action>index</action>
<pages>
<me>
<label>Me</label>
<module>default</module>
<controller>index</controller>
<action>me</action>
<resource>user</resource>
<privilege>logout</privilege>
</me>
</pages>
</home>
</nav>
</config>
I need to develop a simple form (intended only for printing) to be filled in by arbitrary end users (i.e. no specialized software). Ideally, I'd like the end-user to be able to save their inputs to the form and update it periodically. It seems that (at least without LiveCycle Enterprise Suite) Adobe Reader won't save data input in a PDF form. Aside from just distributing the form as a Word document, does anyone have any suggestions?
Background:
I do some work for a volunteer ambulance corps. They have a lot of elderly patients who don't know (or can't remember) their medical history. They want to develop a common form with personal information (name, address, DOB, medications list, etc.) for elderly residents to hang on their refrigerators (apparently a common solution to this problem). As some of them (or their children/grandchildren) are computer literate, it would make most sense to provide a download-able blank form that can be filled in, saved, updated, and re-printed as needed. Due to worries about privacy, HIPAA, etc. anything with server-side generation is out, it needs to be 100% client-side, and in a format that the majority of non-technical computer users can access without additional software.
Thanks for any tips... at this point, I'm leaning towards just using a .doc form.
Hi, I can connect to the access database and run functions etc from c#, I can even get a hold of the button I need to click, but I can't make it think it's been clicked.
nonManagedDb.DoCmd.OpenForm("frmMaintenance", Access.AcFormView.acNormal, MissingVal, Access.AcFormOpenDataMode.acFormReadOnly, Access.AcWindowMode.acWindowNormal, MissingVal);
var RunRep = (CommandButton)nonManagedDb.Forms["frmMaintenance"].Controls["btnDailySheetsReport"];
That's as afar as I've gotten with this, I've tried reflection to grab it's event and invoke it but it's classed as a COM object only so that's out.
I have the following in an initializer in a rails app that uses Twitter bootstrap so that it removes the div.field_with_errors that rails applies when validation fails on a field but also the initializer adds the help/validation text after the erroneous input field:
require 'nokogiri'
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe
form_fields = [
'textarea',
'input',
'select'
]
elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css("label, " + form_fields.join(', '))
elements.each do |e|
if e.node_name.eql? 'label'
html = %(#{e}).html_safe
elsif form_fields.include? e.node_name
if instance.error_message.kind_of?(Array)
html = %(#{e}<span class="help-inline"> #{instance.error_message.join(',')}</span>).html_safe
else
html = %(#{e}<span class="help-inline"> #{instance.error_message}</span>).html_safe
end
end
end
html
end
This works fine but I also need to apply the .error class to the surrounding div.control-group for each error.
My initializer currently gives the following output:
<div class="control-group">
<label class="control-label" for="post_message">Message</label>
<div class="controls">
<input id="post_message" name="post[message]" required="required" size="30" type="text" value="" /><span class="help-inline"> can't be blank</span>
</div>
</div>
but I need something adding to my initializer so that it adds the .error class to the div.control-group like so:
<div class="control-group error">
<label class="control-label" for="post_message">Message</label>
<div class="controls">
<input id="post_message" name="post[message]" required="required" size="30" type="text" value="" /><span class="help-inline"> can't be blank</span>
</div>
</div>
The solution will probably need to allow for the fact that each validation error could have more than one label and input that are all within the same div.control-group (eg radio buttons / checkboxes / 2 text fields side by side).
I assume it needs some sort of e.at_xpath() to find the div.control-group parent and add the .error class to it but I'm not sure how to do this.
Can anyone help?
PS This may all be possible using the formtastic or simple_form gems but I'd rather just use my own html if possible.
EDIT
If I put e['class'] = 'foo' in the if e.node_name.eql? 'label' section then it applies the class to the label so I think I just need to find the parent tag of e and then apply an .error class to it but I can't figure out what the xpath would be to get from label to its div.control-group parent; no combination of dots, slashes or whatever seems to work but xpath isn't my strong point.
Can Any One explain this Language how we converted to CFG
Give a CFG for the CFL: {ai bj ck | i ? j or j ? k } //ai mean a^i
I have the answer but I need an explaination (Step By Step)
The answer :
S --> S1|S2
S1 --> A Eab|Eab B|S1 c
A --> a|aA B--> b|bB
Eab --> Q|a Eab b
S2 --> Eac C|A Eac
C --> c|cC
Eac --> Q|B|a Eac c
My send mail task works fine for email ids like [email protected] but it throws error for email ids like [email protected].
is there any way i can make it work for such ids also?
Thanks.