elements

swap or move DOM elements with jQuery through different containers

Hi, guys, I have the next HTML: <div id="Dummy" class="video"> <div class="videoDummy">Video Dummy</div> </div> <div class="bd"> <ul class="items"> <li class="video"> <a href="#" class="launch-video vid_{{VAR:vid_contentId}}"> {{module:video_imagethumbnail/contentId={VAR:contentId}}·clippingWidth=68}} </a...

Resize a set of HTML element.

Hi, I have HTML code similar to <div id="resizeThis"> <div style="background: url(...)">...text...images...</div> ... </div> I want to resize the div with all its contents to arbitrary size. For example, I could use JavaScript to get the div width and then resize all elements accordingly, but what's the simplest way to do this? I ca...

How to put flash uploader between Zend Framework Form Elements

I need to put flash uploader between form elements. Could you please tell me how to do it? ...

Why am I getting array elements with "0"? (See pastie inside)

Hey there. Java beginner here :) Well, I'm having a few troubles with this program: http://pastie.org/private/sfqqnqwxtpgtuhswpqepw 1) I want my program to split up the "input" array into an oddList, evenList and negativeList set of arrays. However, when splitting it up, it is adding a bunch of elements as "0". 2) 0 needs to be added o...

Match elements between 2 collections with Linq in c#

Hi, i have a question about how to do a common programming task in linq. lets say we have do different collections or arrays. What i would like to do is match elements between arrays and if there is a match then do something with that element. eg: string[] collection1 = new string[] { "1", "7", "4" }; string[] collecti...

How can i include the clicked element's id in an ajax call?

I'm trying to bring over the IDs of the input elements "submit" and "skip" and do some logic based on which button was pushed. It doesn't appear to be coming over in the Request object. How can I do this??? <div id="modal"> <% using (Ajax.BeginForm("Promo", new AjaxOptions { UpdateTargetId = "modal" })) { %> <div id="mo...

Newlines between HTML element attributes?

Greetings, I'm doing some template work on a personal project and I'm trying very hard to keep my lines under 80 characters wide. This is difficult to do with HTML, especially when adding code for dynamic content as well. There are a lot of cases where it would be helpful to put line breaks inside the elements themselves, between attrib...

Map a 2D array onto a 1D array C

I want to represent a 2D array with a 1D array. A function will pass the two indicies (x,y) and the value to store. These two indicies would represent a single element of a 1D array, and set it accordingly. I know the 1D array needs to be (arrayWidth *arrayHeight) in size, but I don't know how to set each element. For example if I passed...

jQuery: Problem with submission of dynamic form elements

Hello, I'm trying to submit a form which contains dynamic elements that were added to the DOM by jQ after the page has completed loading. When I run a serialize() on the form, it's grabbing the data for all fields that are hardcoded into the page - but not the dynamic fields. Here are some code snippets of the same.. HTML <form ...

How to encrypt multiple copies of an XML element within a single XML document

Hi again everyone. I have an XML encryption routine based on the MSDN article http://msdn.microsoft.com/en-us/library/sb7w85t6.aspx My code is here public static void Encrypt(XmlDocument Doc, string ElementName, SymmetricAlgorithm Key) { //////////////////////////////////////////////// // Check the argum...

Correct way to leave empty elements in xhtml?

Hello. I've been experimenting with xhtml and now I'm wondering that is there a valid/correct way to add empty elements. Short question, but here's the two ways I've been using: <div> </div> <div>&#32;</div> <!-- Same as space --> Hope someone knows an answer for this. Thanks. ...

How to modify HEAD element by using HttpModule

I want to add html meta data dynamically to the HEAD element of an aspx-page by using a HttpModule. When I hook to the PreRequestHandlerExecute event the Header property of the page is null. When I hook to the PostRequestHandlerExecute event the Header property is available but adding controls to it doesn't seem to work. When debugging...

How to get length in Javascript of an array of Form text fields...

I have this HTML code: <form id="form1" name="form1" method="post" action=""> a <input type="text" name="item[]" value="1" /> <br /> b <input type="text" name="item[]" value="1" /> <br /> c <input type="text" name="item[]" value="1" /> </form> I can't seem to pro grammatically pull the length out of the text fields array , is there so...

Adding and removing multiple elements in javascript

Hello everyone, I am trying to populate a list of images dynamically using javascript. I have the following code, but it is not working. If you see any errors, or know of a better way of doing this, any help will be appreciated. code is as follows: <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <script type="text/javascript"> ...

Reordering list of jQuery objects to columns

Hello, I'm working on function, that takes a select from html and replaces it with multi-column ul - it's one list, but has float:left; on li children, so the number of columns is based on calculations (if ul width is 600 and li width is 200, i will obviously have 3 columns). That's theory - the easy part. Example: 5 items, 2 columns ...

load part of the page

hi i have 2 pages one is the main and the other is the sub-main main,html : <A href="sub-main.html#post5>go and load just post 5</a> sub-main.html : <DIV class=posttop id="post4"> here you can write anything ;) </div> <DIV class=posttop id="post5"> here you can write anything ;) </div> <link type="text/css" href="post.css" rel=...

create a new option and inject into select box using mootools 1.2

Hi i have one AJAX function which return the list of countries. It works fine. My problem is that want to load that countries in on select box which is already in HTML and is empty means no option value in it. I want to know that how can i create a new option element and inject into the select box using moo tools 1.2 I have used be...

Working with many interface elements in Cocoa.

Hi, My app requires an interface that has many buttons, text fields and matrixes. And they need to change from time to time. Right now I do this by having all elements in IB already and hiding/showing/moving them when needed. What would others recommend? Should I do that? Should I use an NSTabView? NSView? Should create the elements pro...

Using jQuery selectors with normal Javascript?

I'd like to be able to do: if ($("cheese_tag") == document.getElementsByTag("cheese_tag")[0]){ alert("success!"); } Is this possible? Basically what I'm wanting to do is use the ease and power of jQuery selectors to manipulate elements. Is what I'm talking about possible? REVISION: Sorry, a better way to state my question would be "C...

Disallow an element to be a child of itself in XML Schema

Hi! Im writing a XML schema for a project. I cannot solve following problem: A element cannot be nested by itself, ex: <document> <text> <b> <i> <a link="http://wikipedia.org"&gt; <b /> </a> </i> </b> </text> </document> This example shouldn't be allow becaus...