Assume that int array arrayName is a member of class className, How can I access its element in my main program?? className.arrayName[0] doesn't seem to work
Hi,
How would I reset my asp:DropDownList element (which has a runat="server") to index 0 every time the page is "reloaded" in firefox (F5 is pressed).
If you suggest using javascript...please note that A: I am not using a form and B: I don't know how to access elements that have a runat="server" with javascript
If this can be done using script on the .aspx page....please explain things you think an ASP newb would not know (ie. me, lol)
thanks,
Andrew :)
I'd like to use css pseudo-selectors ( parent > child, element:first-child ) in my stylesheet but IE6 doesn't seem to recognize those. Is there any plugin (jQuery preferably) that would allow me to use pseudo-selectors freely without worrying about the damned IE6?
Thanks
Hi
I would like to insert multible sliders in one page. I have a block of code I would like to reuse but it will insert 2 DIV's with the id=slider...
Is it possible to find second element with id=slider and rename to id=slider01?
BR. Anders
Hello,
I'm using the CKEditor 3.1, and find that whereever there is a box on the page, the ckeditor causes a new empty select box to appear next to it (although it has not been applied to that specific element.)
This seems to be a known issue : http://dev.fckeditor.net/ticket/4528
Has anyone been able to get around that?
Is there any other good fckeditors you can suggest?
Thanks!
Just a thought, but would using an IFRAME over a DIV essentially make that element isolated from the window in a way that slow scripts running in the IFRAME wouldn't affect the other frames/window?
I have this code i am working on but every time i call init method I keep getting an error
this.addElement is not a function
is it because i can't call methods from event handlers ?
function editor () {
this.init = function () {
$("#area").bind('click' , this.click_event );
}
this.addElement = function () {
console.log("adding element");
}
this.click_event = function(event) {
this.addElement();
console.log("click event in x : "+event.data);
}
}
I'm using jquery-ui's draggable for drag-and-drop, and jeditable for inline editing.
When I drag and drop an element that's also editable, right after it's dropped jeditable kicks in and pops into 'edit mode'.
How can I disable this behavior?
Not sure if you can do this, but I want to select the first of two classes of an element with jQuery and return it's first class only.
<div class="module blue">
I want to return 'module'.
tried this:
var state = $('body').attr('class').first();
but none of that seems to work, thanks for any advice.
I know that there are certain "special" methods of various objects that represent operations that would normally be performed with operators (i.e. int.__add__ for +, object.__eq__ for ==, etc.), and that one of them is list.__setitem, which can assign a value to a list element. However, I need a function that can assign a list into a slice of another list.
Basically, I'm looking for the expression equivalent of some_list[2:4] = [2, 3].
My question is exactly that but in context I want to examine the selection object, compare the anchorNode and focusNode and if they are different then find the first common parent element.
var selected = window.getSelection();
var anchor = selection.anchorNode;
var focus = selection.focusNode;
if ( anchor != focus ) {
// find common parent...
}
There are a lot of questions about formatting forms so that labels align, and almost all the answers which suggest a pure CSS solution (as opposed to using a table) provide a fixed width to the label element.
But isn't this mixing content and presentation? In order to choose the right width you basically have to see how big your longest label is and try a pixel width value until "it fits". This means that if you change your labels you also have to change your CSS.
I'm writing a bunch of Linux shell scripts with complex selections. For now I use zenity for prompts. I'd rather use something where I can show more than one UI element at a time and query it in a script (e.g. a list and some checkboxed and a file picker and an entry field.
What are my options?
This is a quick syntax question...
I need to block out an HTML element if two SQL statements are true w/ php.
If the status = 'closed', and if the current user is logged in. I can figure out the calls, I just need to see an example of the syntax. :)
So, If SQL status=closed, and if current_user=is_logged_in()...something like that.
I am trying to insert NULL value in Sql Server if I have null value in corresponding C# String object like below :
String Residence = xmlDoc.Descendants("Appointment").Single().Element("StateOfResidence") == null ? null : xmlDoc.Descendants("Appointment").Elements("StateOfResidence").Single().Value;
I am using Entity framework for Database access. So if Residence is null, 'NULL' gets inserted into Database instead of NULL. How can insert NULL for null ?
Firebug is an excellent tool to to show a screen media CSS for some HTML element, but is there a way to look at the print media CSS too? Or is there any other tool to see the print media CSS?
I try to read an xml file as input for spring batch:
Java Class:
package de.example.schema.processes.standardprocess;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Process", namespace = "http://schema.example.de/processes/process", propOrder = {
"input"
})
public class Process implements Serializable
{
@XmlElement(namespace = "http://schema.example.de/processes/process")
protected ProcessInput input;
public ProcessInput getInput() {
return input;
}
public void setInput(ProcessInput value) {
this.input = value;
}
}
SpringBatch dev-job.xml:
<bean id="exampleReader" class="org.springframework.batch.item.xml.StaxEventItemReader" scope="step">
<property name="fragmentRootElementName" value="input" />
<property name="resource"
value="file:#{jobParameters['dateiname']}" />
<property name="unmarshaller" ref="jaxb2Marshaller" />
</bean>
<bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>de.example.schema.processes.standardprocess.Process</value>
<value>de.example.schema.processes.standardprocess.ProcessInput</value>
...
</list>
</property>
</bean>
Input file:
<?xml version="1.0" encoding="UTF-8"?>
<process:process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:process="http://schema.example.de/processes/process">
<process:input>
...
</process:input>
</process:process>
It fires the following exception:
[javax.xml.bind.UnmarshalException: unexpected element (uri:"http://schema.example.de/processes/process", local:"input"). Expected elements are <<{http://schema.example.de/processes/process}processInput]
at org.springframework.oxm.jaxb.JaxbUtils.convertJaxbException(JaxbUtils.java:92)
at org.springframework.oxm.jaxb.AbstractJaxbMarshaller.convertJaxbException(AbstractJaxbMarshaller.java:143)
at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshal(Jaxb2Marshaller.java:428)
If I change to in xml it work's fine. Unfortunately I can change neither the xml nor the java class.
Is there a possibility to make Jaxb2Marshaller map the element 'input' to the class 'ProcessInput'?
Hi all,
I am developing a firefox extension which needs to add some html on the page it runs.
This element I will be writing needs to be decorated with css and also load some images.
I have both the css file and the images in the plugin, but I do not know how to reference them.
Do I need to insert the css file to the page I want to modify?
In the css file how can I reference the images that are in the extensions?
Thanks
I have several javascripts at the head of my document, as well as at the bottom, near the body closing tag. I use jQuery to call an ajax element into place and the elements that are called, require these javascripts to function. How can I include these javascripts to work with the ajax call?
Hi,
I have strange problem with sharepoint and ajax functionality. We have an UpdatePanel placed inside webpart. When partial postback occurs, page title gets missing.
We have found that temporary partial solution is to write title element into one line and not use any spaces or controls inside it..not even a literal control.
But we need some way to provide sommon title for all pages, so title would look like this:
My default title - Current page title
Any ideas how to solve this?
I'm looking for a Java class with the characteristics of C++ std::map's usual implementation (as I understand it, a self-balancing binary search tree):
O(log n) performance for insertion/removal/search
Each element is composed of a unique key and a mapped value
Keys follow a strict weak ordering
I'm looking for implementations with open source or design documents; I'll probably end up rolling my own support for primitive keys/values.
This question's style is similar to: Java equivalent of std::deque, whose answer was "ArrayDeque from Primitive Collections for Java".
Using VHDL i want to have a some registers that store 16 bit in each one.
So i found that VHDL have a built in array,and i want to use it to store 16 bit in each element in iy so i want to know if VHDL map this array to actual registers or not?
Take a model with an attribute that is an array of strings. This attribute is serialized to the database.
class MyModel < ActiveRecord::Base
serialize :str_array
end
In the edit view I would like to display a text field for each element of the array allowing the user to view and modify the attributes elements.
Given a Sorted Array which can be rotated find an Element in it in minimum Time Complexity.
eg : Array contents can be [8, 1, 2, 3, 4, 5]. Assume you search 8 in it.
How does Google Toolbar determine the language of a page to offer translation from it?
Google is mis-identifiying a simple login page on our site as Filipino and offering to translate it into English. I've tried added a lang="en" attribute to the <html> element of the page, but that seems to have made no difference.
Anyone know why this is happening?