I'm trying to create a querystring in my aspx page. I need to pass in 2 variables as parameters. The end goal is something like this:
Popup.aspx?paramOne={0}¶mTwo={1}
I have a function that needs this string.
$("#<%=FindButton.ClientID %>").click(function() { var paramOne = $("#<%=ParamOneDDL.ClientID %>").eq(0).val(); var paramTwo = $("#<%=ParamTwoDDL.ClientID %>").eq(0).val(); var queryString ='<%= string.Format(Constants.MyPopupQuerystring, paramOne,
[Code]....
That doesn't work. It doesn't recognise paramOne and paramTwo with that syntax, so i tried to use the DDL.SelectedValue directly and that doesn't work either as it doesn't find a value for some reason. I can manually set up the string as follows: queryString = "MyPopup.aspx?paramOne=" + paramOne + "¶mTwo=" + paramTwo);
which works but is not good coding practice as I don't want to hard code stuff. What is the correct notation to do this?
I'm building a comment system modeled after Tumblr's, where each post will have it's own comments. I've modded a system from 9lessons and am having an issue implementing it for multiple instances on a page. Each post has its own ID, so I'm trying to set this up using the post's ID. It works fine for a single post, but when there's more than one on a page it doesn't work.
I have a script that controls the backgroundcolourof a page by clicking on the respective linkassociatedwith that background colour ie background color 1=> click link 1 etc
However i want to change the script so that a single universal button/link can replace the need for having a dedicated link to load itsassociatedbackground colour. Heres is the current code which uses a link to change the background;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>[CODE]...
Can someone explain to me the best way to loop through the geocode and marker (google maps) part of this code for all of the elements with the "address" class using jQuery (or javascript if need be). I tried wrapping the contents of the codeAddress function in $(".address").each(function () {... and replacing the getElementById with a jquery selector, but I still seem to be lost.
I've been beating my head against a wall for a few days trying to get this working. I'm trying to create a dynamic menu where a user selects one item and another select list is shown, then another and another (and so on). Here is my JS, it *should* be taking the ID of the div, comparing it to the selected value and then showing another div by settings it's class property to visible:
Having a tough time integrating the 2. Trying to create 2 loops, the inner one I had working as below, until I tried to add the outer loop which iterates through the tables
<script type="text/javascript"> // <![CDATA[ var i=0;
I am trying to arrange 15 divs into a 5x3 grid.The divs have an id of piece1, piece2, piece3 etcI figured I could run a loop wherein each div is positioned to the right of the last.For each div, I'm trying to store the current position and width into variables then move it to the right by the number of pixels the div measures widthwise.This would position 5 divs horizontally and I am still unsure of how to get the next row of 5 divs positioned under the first and so on.This is what I have so far:
JQuery for (var i=0; i<x; i++) { var pos = $("#piece" + i).offset();
I am trying build tripple drop down list using JQUERY .still i can't do it.1st drop down menu(click option )---->load 2nd drop down in to same page----->load 3rd drop down in to same page(1st menu selected value go to jquery function and it is parsed to
I am trying to create Dynamic TextBox using JQuery. What i am trying to create is when I enter a number in a textbox say "5" then 5 new text box will appear below it with labels. But not able to make it.
On my site, I have some click-able spans (will be referred to as toggle spans) that show or hide other spans (that contain the content I want on my site; will be referred to as content spans). The layout of these spans is like this:
I'm developping an ASP.net web page using JQuery Accordeon . the text inside the Accordeon changes so I'd like to create dynamic divisons that support those changes.
Does anyone know of a Javascript slider that can function like Adobe's gradient creator?I'm not actually making gradients, I just need similar slider capabilities.I have a defined date range, let's say it's January 1 to Januaray 31. I want to make a slider that allows my user to split this date range into multiple ranges. So one person can do:
Jan 1 to Jan 5, Jan 6 to Jan 12, Jan 13 to Jan 31 Another person can do: Jan 1 to Jan 21, Jan 22 to Jan 31. How many regions they create doesn't matter to me. The goal is to pull it off with a Javascript slider that works similar to Adobe's gradient creator. Handle's can be added by clicking and removed by pulling it away from the slider. Handle's can also slide around fairly liberally.
What about if I had something like this where a for loop creates all the variables for you...rather than having to write them out on individual lines like so:
for(i = 0; i < myForm.elements.length; i++) { tempControl = myForm[i]; var e = tempControl.name; var [e] = document.myForm[e].value; }
I am trying to create portlets that dynamically load their content (usinq jQuery). My first approach was to leave the header + footer + decorations of the portlet OUTSIDE of the dynamically loadable content. It worked just fine but I had to abandon that approach so that I could use the same code both for statically- and dynamically-loaded content (e.g. when no AJAX support was available). So far so good.
Now to my problem: I use the following code for loading my dynamic content
The loading works fine, but after the dynamic content has been loaded I can not seem to get access to it using jQuery!
Short description: Line 3 clears the content (I know! There are better solutions!) Line 4 loads the content Line 6 dumps the data on the console; this is for debuging only, so that I can establish that the correct content is loaded
After the data is properly loaded I did expect to be able to find it by traversing the DOM tree in traditional jQuery fashion (like in Line 10). However, dumping the contents of the 'tag' shows it containing no content at all; it is empty even though the browser renders the expected new result. I thought: Well! The browser holds two copies of the DOM tree; one that is the original page and one that is the modified content used for rendering". Therefore I attempted to manipulate the loaded content within the function (Line 8). The content is visible there, that I have established in Line 6. But I do not know how to access it jQuery-style.
(Why am I trying to modify the loaded content? I want to inject a title row with various decorations and clickable content.)
I'm trying to add <option> elements to a <select> list. It isn't going too well! The option elements are years from 2004-2013. My code below successfully increments my year variable, but I'm obviously going awry with how I'm writing to the document. At the moment I get 10 separate select boxes instead of the single select list containing the 10 options for each year.
I am working on a project where I need to redo the same thing with new variable names
Code JavaScript: var paper1 = new Raphael('img1', 500, 500); c1 = paper1.rect(0, 0, 50, 20, 5); var paper2 = new Raphael('img2', 500, 500); c2 = paper2.rect(0, 0, 50, 20, 5);
I would like to be able to do this with a for loop. So in the above example I would want paper+i, img+i, and c+i was trying eval("paper"+i) but didn't work.
Is it possible to create a loop using code to play a song on a webpage? Or does the while statement have to produce numbers like 1, 2, 3? I don't really understand what types of things I am allowed to use when creating a loop.
Basically, i have a CSS/jQuery keyboard from NETTUTS; however my problem is trying to select multiple inputs. Everything works as it should, however i want to select the input, store it in hidden field (which input is current), then when i start to type, it can enter the characters into that input field (that is selected). Currently, it just allows me to enter inputs into a single textarea. I want to onfocus, set as "Focusedfield", and when i type it goes into that field.
Here is my JS code to select/store the "focusedField". Triggered by onFocus. to make the textArea i select, be the one i type into.
Code:
Here is the jQuery
The issue is with this first $write variable. I cannot for the life of me, get it to detect the dynamic variable. When i hardcode the inputs name, it works, but when i try something dynamic - it doesn't. Line 2 of that function is where my issue is (i believe).
Code:
I've tried to replace
Code:
With
Code:
And
Code:
As well as plain old JS var "current_form".
I think its just 1 or 2 lines where this issue is.