element

Put icon inside input element in a form

How do I put an icon inside a form's input element? Tidal Force theme Got me? ...

Checking if no elements in IEnumerable(Of T) - Linq element and quantifier operators

For my function public static IEnumerable<CallbackListRecord> LoadOpenListToProcess(CallbackSearchParams usp){} This line errors when the sequence contains no elements (as it should) CallbackListRecord nextRecord = CallbackSearch.LoadOpenListToProcess(p).First(); I have changed it to the following CallbackListRecor...

How to use YUI to locate an Input by Name and insert content after

How can I use YUI to locate a text input by name and insert a div after it? For example, this doesn't work: <input name="some_name" type="text"> <script> var el = new YAHOO.util.Element(document.createElement('div')); var some_element = document.getElementsByName('some_name'); // doesn't work .... replacing 'some_element' with 'docum...

"element.dispatchEvent is not a function" js error caught in firebug of FF3.0

Hi All, i am getting the following error while loading my index page in FF3.0. Sorry, i am unable to paste the script here as it is 2030 lines of code. element.dispatchEvent is not a function on expansion it gives me below things, fire()()prototype.js?1 (line 3972) _methodized()()prototype.js?1 (line 246) fireContentLoadedEvent()prot...

Block certain html element from getting indexed by search engines

For styling purposes i want to insert some dummy text on the page, but it shouldn't be getting linked to the actual content. Is there a way to block it for search engines, or do i have to use good old images for that? Or would it be possible to load it dynamically via javascript? because i heard that google will read certain amounth of...

How to center html element in browser window?

How to place some html element, say div, in a middle of a browser window (not page, not screen)? Not depend on browser window size, screen resolution, toolbar layout, etc. E.g. I want it to be in the middle of the browser window. Thanks ...

jquery selector can't read from hidden field

(answers aggregated into another question) The following jquery 1.3.2 code works: <input type="select" value="236434" id="ixd" name='ixd' /> <script> console.log( $('#ixd') ); console.log( $("input[name='ixd']") ); </script> Console shows: [input#ixd 236434] [input#ixd 236434] However setting the input to "hidden" preven...

jquery hidden field not accessible until $(document).ready() called

(aggregated from another question) Jquery 1.3.2 test code, run in FF3: <input type="hidden" value="236434" id="ixd" name='ixd' /> <script> console.log( $('#ixd').val() ); console.log( $('#ixd') ); console.log( $("input[name='ixd']") ); console.log( $("input:hidden") ); console.log( $("input[name='ixd'][type='hidden']") ); console.lo...

jQuery.. pulling a string before current element

HTML.. <div class="row"> <div> <b>Title A</b> <a href="#">Link 1</a> <a href="#">Link 2</a> </div> Content A </div> <div class="row"> <div> <b>Title B</b> <a href="#">Link 1</a> <a href="#">Link 2</a> </div> Content B </div> <div class="row"> <div> <b>Title C</b> <a href="#">Link 1</a> <a href="#">...

Access Controls which are written by Response.WriteFile("Sample.htm")

My aim is to stream a .htm file via Response.WriteFile("Sample.htm"); and then access a specific html element (ex. <a runat="server" id="myAnchor" /> ) from the Response which happened in the Page_PreInit Event. I tried it already with ((HtmlGenericControl)myAnchor) but it doesn't work. It only works, if the anchor tag is inside the .as...

XML element hierarchy referencing

I'm looking through possible representations for what can be considered a finite depth graph in XML format for data exchange purposes. The problematic point is how to reference nodes in edge tags. Two strategies I see are a) using unique identifiers or b) using paths. Unique IDs: <graph id="g0"> <node id="n0"/> <node id="n1"/> <...

Jquery - Outline top element while hovering

Hi, I'm trying to outline the top element being hovered. $(function() { var ElementSelector = null; var SelectedElement = null; $("*:not(div#ElementSelector)").hover ( function() { SelectedElement = ($(this).length > 1 ? $(this).find("*:last") : $(this)); if(ElementSel...

jquery- how to detect element value when onclick?

how do i bring the tr value into .click event? i want to be able to pass the tr id into updatedb.php as well- for sql updating enter <head> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script src="jquery.jeditable.mini.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(fu...

How do I select a random key from an NSDictionary?

When I was using an NSArray, it was easy: NSArray *array = ... lastIndex = INT_MAX; ... int randomIndex; do { randomIndex = RANDOM_INT(0, [array count] - 1); } while (randomIndex == lastIndex); NSLog(@"%@", [array objectAtIndex:randomIndex]); lastIndex = randomIndex; I need to keep track of the lastIndex because I want the feeling o...

JQuery - Copy dimensions and absolute position of element

I'm trying to copy a element's dimensions and the position(relative to the document) onto another element. Ex: var SelectedElement = $("div#MyTargetElement"); // The CopiedButEmpty element is a div with absolute position that is meant to hover/float above the selected element. $("div#CopiedButEmpty").css("width", SelectedElement...

Why Can't I Reference a TextBox by ID When it's in a CreateUserWizard Control?

Hi all.. I got a wierd problem here. Inside an asp.net CreateUserWizard, I got some elements, but I can't seem to access them from my code-behind. Here's a code snippet: Markup: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CreateUserWizard.ascx.cs" Inherits="Web.UserControls.CreateUserWizard" %> <asp:CreateUserWizard ...

How do I change the title and link colors of a Google Custom Search Element?

The situation: Take a look at this page and search "photo" on both: http://dev.womenandlogistics.com/testsearchengine.html The top search engine refreshes the page and displays results with orange link titles and blue links. The bottom search engine displays tabbed results with blue link titles and blue links. I found an answer to thi...

Jquery- Modify Element Value after ajax call

enter scenario: I want to do an ajax call to update the image shown. Example: click to activate, click again to deactivate. Now, image can change correctly when click for first time. After that, if I click the img again, changes won't reflect anymore. Reason, the onclick status still= yes How do I access the hyperlink element to rew...

Show child element above parent element using CSS

I have two divs, one nested inside of the other. The parent element has a defined width/height. How can I show the child div above the parent (outside of it) using only CSS? EDIT: Sorry, maybe I should clarify that I mean "above" as along the z axis. And yes, I already tried z-index. My problem is that when the child element is larger ...

How can I get the element the caret is in with Javascript, when using contentEditable?

Hi, Let's say I have some HTML code like this: <body contentEditable="true"> <h1>Some heading text here</h1> <p>Some text here</p> </body> Now the caret (the blinking cursor) is blinking inside the H1 element, let's say in the word "heading". How can I get the name of the element the caret is in with JavaScript? Here I would li...