Adding A Variable To A Pre-existing Script

Mar 6, 2005

The script below is configured as an onmouseover & out fad-in url script. It's been configured it so that the fading of links only occurs in areas with the class name "fade". My first and simplest request is that someone has a quick look and changes the code from class name "fade" to class name "descriptions". i would do it myself but the word fade is also used for other variable names within the script (etc) and i'm not 100% sure which names to change and which to leave

The second aspect I need help with may be somewhat more challenging.
The script currently fades the TEXT of the link from one color to another. I need it to fade something else. luckily i think the modifications to the script might not neet to be that extensive. Here's what I need.

Instead of the color of the text fading in & out, i need the color of the boder to fade in & out. Here's an example:
i need the properties of the link to go from
text-decoration:none; border-bottom:1px solid FFFFFF;
to finish at
text-decoration:none; border-bottom:1px solid FFB903;

the only change is the color... so i figure all we need to do is create a color variable and place it in the code, like so:
text-decoration:none; border-bottom: Ƈpx solid' + 'color'
and then simply have that color variable increment using the startColor and endColor variables found below Code:

View 16 Replies


ADVERTISEMENT

Adding To Existing Obj Using JSON

Jul 16, 2006

There's an object:

foo = new Object();

and a property called 'bar' with a value of 1 is to be added to it using
JSON. If I try the following it only demonstrates my ignorance:

var str = "{foo:{bar:1}}";
eval(str);
alert(foo.bar) // gives undefined

Could someone please explain what I'm doing wrong here?

View 1 Replies View Related

Adding Code To Existing Document

Oct 25, 2005

I've site that is divided into two frames

Frame 1 Frame 2
???????????????????????
? ? ?
? ? ?
???????????????????????

At the first frame reside my site content.
At the second frame I'm hosting other (random) site from the net.

the question is:
How do I ** add ** code into the other site html document in order to add it
functionality that I need?

View 6 Replies View Related

Adding Fadeout To Existing Function?

Jun 26, 2009

I'm using a script I've found that adds a bullet to links on a page:

<script type="text/javascript">
/***********************************************
* Bullet Link script- � Dynamic Drive DHTML code library (www.dynamicdrive.com)

[code]....

View 7 Replies View Related

Adding If/else To Existing Function For Js Menu?

Sep 18, 2011

modifying an existing function which controls the highlighted states of a multi level js accordion menu. I have had to use javascript due to certain css elements not working in safari browsers.My problem is due to the multi level aspect as when a sub link is clicked, the parent link above it then deselects. I need the parent link to stay active when its sub links are clicked and only deselects when a link outside of that list is clicked upon.I understand the theory of adding a conditional statement but simply don't know how to apply it correctly within the functionHere is the existing function which tells a link to be active or selected:var Lst;

function CngClass(obj){
if (Lst) Lst.className='.topnav';
obj.className='selected';

[code]....

View 1 Replies View Related

JQuery :: Adding More Objects To Already Existing Object?

Oct 15, 2011

I have a set of div elements cached inside var divs = $('#myDivs'). Suppose another div comes along that i want to add (push) to the group. is there a simple method for doing this without selecting ones already in the group for a second time?

View 3 Replies View Related

Adding Mouseover Properties To An Existing Image

Mar 26, 2010

i have a image around 995x700. and i'm about to change up a couple things on a site i'm working on and want to add a mouseover event (or something like that) to it. i certain areas, i would like the user to mouse over and see a new image rise up in front of the existing image, and then go away when they "mouse off" (i guess that's the term). i know there is a possible way through jscript or ajax.

View 4 Replies View Related

Adding Onclick Event To Existing <th> Element?

Jun 30, 2010

I'm trying to add a onclick event that will sort an two dimensional array to a existing element that I can not change. The error I keep getting is User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) Timestamp: Wed, 30 Jun 2010 20:15:48 UTC

[Code]...

View 3 Replies View Related

Keep On Adding A Existing Table Whenever The Use Clicks Addtables() Button?

Nov 19, 2009

Is it possible to keep on adding a existing table whenever the use clicks addtables() button using javascript?for example I have a table like below.. whenever user clicks the addtable button. It should keep ona dding tables.

Code:
Empno dept city
111 IT ny

[code]....

View 2 Replies View Related

Adding Scrolling Text To An Existing Jscript File?

May 6, 2009

I inherited a site that has jscript and html content. The site frame (top and left nav) are controlled by the jscript file. Most all of the content that is displayed when links or topics are selected is placed in the center of the page. I need to put some scrolling text in one of the top frame blocks, (the section that is java script file).

function buildMenus(){
var headerString = "";
var leftnavString = "";
var footerString = "";

[code]....

I have a couple of jscripts that do the scrolling I want, I just need to know how to insert it in the above section.

View 3 Replies View Related

Adding A Variable To A URL

Jul 24, 2007

I have been working on a script to integrate into my firefox addon that i'm working on. I'm trying to utilize nwtools website which has a lot of network tools whois/trace/dns lookup etc..

I'm currently working on the whois portion. As you can see below, I am trying to make a function that will pass a variable to the ending of the URL. In this case it would be cnn.com.

View 4 Replies View Related

Adding A Variable To A URL?

Mar 31, 2011

I am adding a feedburner url into an html page, but need to make it so you can increase the amount of posts you want to see. Ex. The default amount of posts on the page starts at three, but then I would have a button called more where you would click it to view say 3 more, and then if you clicked it again 3 more, ect.This button would have to call a javascript function correct?

<script type="text/javascript">
var i=3;
function more()

[code]...

The nItems declares how many posts are on the page, so I would want it to equal a variable that can be changed via the button. Also if someone knows how to add ajax so you don't have to refresh the page, that would be a nice extra.

View 4 Replies View Related

JQuery :: Adding A Variable

Sep 8, 2011

This is a bit longwinded, bear with me, I'm thinking it through. Here's the html structure:

<p class="a1">this text</p>
<p class="b1">that text</p>
<p class="a2">this text</p>
<p class="b2">that text</p>
<p class="a3">this text</p>
<p class="b3">that text</p>...and more like these.

the objective: if the p class name starts with "a", append <span class="add"> A</span> if it starts with "b", append <span class="add"> B</span>

[Code]....

View 6 Replies View Related

JQuery :: Adding Variable To Selector Id?

Dec 10, 2010

Basically I have a carousel, and when an item is hovered on, it's corresponding titles needs to show up below. I've managed to get a very inefficient version this working by repeating the function with the explicit id for the list item, but I'd like to get this working in a more automated fashion by assigning a variable that can be used with both the list item id and the paragraph id. I'm not sure if index() is the best way to go about this, or how to actually add the variable to the id's.

The HTML --
<div id="carousel_holder">
<ul id="carousel">

[code]....

View 1 Replies View Related

Adding IF Statement To Variable Message?

Oct 22, 2010

I have been assigned the old Pizza Form tutorial. My form asks for customer info, select size with radio button, and select toppings with checkboxes.I created a ValidateForm() function to check if these are filled in and output a message for each field saying "please fill in field."My problem now is that on Submit I need to print out a message with customer info, selected size, and selected toppings.I have the customer info done with a var message:

var message = "Name: " + name + "
";
message += "Address: " + address + "

[code]...

View 3 Replies View Related

Adding A Variable To Url When Page Loads -only Once!

Mar 8, 2006

This is for an ASP submission form. User creates a record, Access assigns a unique ID by Autonumber, I want to then pull that ID and insert into URL.

This is my code:

var addID
addID = '<%=(rsResults.Fields.Item("ID").Value)%>'

location.href=('?ID='+addID);

It adds the ID to my url fine, but it doesn't stop!
I've tried making a loop by this method:

var addID, looper;
looper=1;
while (looper < 2) {
addID = '<%=(rsTestResults.Fields.Item("ID").Value)%>'
looper=2;
location.href='results.asp?ID='+addID;

}

View 1 Replies View Related

Adding Alert Feature With PHP Variable?

Mar 25, 2010

I am pretty new to javascript, I've made a php game and I am adding the last touches. Ive got. When I press m it goes to your mailbox. Now what I want is the alert feature. Now I have that. I want it to say. You have COUNT new message(s). How do I get my php variable into that javascript.

View 1 Replies View Related

JQuery :: Adding Element HTML To Variable?

Jul 11, 2011

I'm trying to create a function which shows a hidden response when a button is clicked on.I also want to add the response to a variable which lists all the users responses.Here is my code now...

$(".yes").click(function () {var feedback = feedback + $(this).html();
$(this).parent().next("p").show("fast"); });
$(".no").click(function () { $(this).parent().next("p").next("p").show("fast"); });
$("#email").click(function () { alert(feedback) });

The bolded line is the part which isn't working.

View 2 Replies View Related

JQuery :: Adding $(this).html To A Variable Not Working?

Jul 12, 2011

$(function() {
window.resizeTo(925,10000);
$('input').removeAttr('checked')

var feedback = "Your Results: ";
$(".yes").click(function () {var feedback = feedback + $(this).html();
$(this).parent().next("p").show("fast"); });
$(".no").click(function () { $(this).parent().next("p").next("p").show("fast"); });

[Code]...

View 3 Replies View Related

JQuery :: Adding A Click Event To A Variable?

Apr 23, 2010

I have a setting where I construct an image reference which I then append somewhere in the DOM, like so for instance:

var one = "<img src = "test.jpg" ";
var two = "/>";
var my_img = one + two;

and then I add it to DOM using after() function. It works fine. However, I also need to add a click event to it. I tried to do this:

my_img.click(function(){
});

and then append it using after(), but it doesn't seem to work. One thing I can think of is append it after a certain ID, then look for it as a child of that ID and add click to it this way. I haven't tried this, but it'll probably work.

View 1 Replies View Related

Button Passwords - Adding Number To Variable

Dec 18, 2009

I want to create a script where when you hit a button it adds a number to a variable and when you click another button it shows you the amount you have so far. Also I am having trouble with the clear() function where it was suppose to clear the variable. When my var is equal to a certain number (not there yet) I want it to goto another page (I can do this on my own).

Here is my code
<html><head>
<title> Buttons</title>
<body style="background-color:#000000">
<center>
<p style="Font-Family:Curlz MT;color: #CC3333;Font-size:40px;">Click the buttons to test my script
</p></center>
<script type="text/javascript">
var x = 0;
blue
function mouseOver() {
document.getElementById("b1").src ="Hi_h.png";
} function mouseOut() { .....
(The button are images so you want be able to see them if you don't download them).

View 5 Replies View Related

Adding An Incrementing Variable To A Script To Create Different Class Names

Feb 12, 2009

Last evening I ran across this script which I think will address a need I have; replacing my radio buttons with images. The one difference I have is that I need to use a different button image for each of the 5 buttons in my group.Unfortunately, the script dose not apply unique classnames within the generated mark-up so if I'm to use this I need to apply some sort of counting variable that increments and use this variable to append the classname with.Around line 52/53 of jquery.checkbox.js is

Code JavaScript:

/* Wrapping all passed elements */
return this.each(function()
{

[code]....

View 2 Replies View Related

Iframe And Existing Id Within

Apr 13, 2010

I have an iframe. I load a page within it. The page I load is a php page that I build with a table with the id of 'readmail_table'. My iframe is 'readmail_frame'. Someone clicks on a message title outside of the iframe and I load the contents of the message in the iframe from the database in my table. Sometimes this takes longer than others depending on how large the message is. What I am doing here is letting the contents load then calculating the width and height of the table and then increasing the iframe's size so there are no scrollbars. This works 98% of the time but I ran into an issue where the table does not exist yet in the iframe and the JS code errors out. So what I did then was add a local var, set it to false then had a while loop check for the table and once it finds it, set the var to false and run my code. Again, mixed results. Sometimes this works then others I get that the table id I am looking for is null but my if statement in the while loop is checking to see if != null

[Code]...

Like I said, most of the time this works exactly how I need it. I just need a fool proof way to determine that this table is in fact on the page. I am not sure why it works sometimes and not others since I am looping until it is there

View 4 Replies View Related

Check For Existing Window

Apr 7, 2006

I need to check for a particular window which I opened as a popup,
already exists, before I try to open the same again. I achieved that
with the following code. So this is fine.

var myWin = null;
function openPopup(aURL){
if (( myWin==null) || myWin.closed) {
myWin = open(aURL,"myWin");
}

/* Window is already opn, thus maps the url to the same window
and give focus */
else {
myWin.location = aURL;
myWin.focus();
}
}

Now my problem is I need to do a similar check for a page thats been
href to the top.location
top.location=aURL;

In this situation if this same code runs again, i need to check if this
window is already open, and if so not to open it. Can it be done in a
similar way like the above.

View 1 Replies View Related

JQuery :: Get New Value Instead Of Existing Value In Text Box?

Sep 13, 2010

I'm trying to validate a newly typed value in the textbox instead of the existing value it has when the page load, unfortunately, whenever I get the .val() I kept getting the existing value in the text box instead of the newly typed value.

[Code]...

View 1 Replies View Related

Create Var Named With Value Of Other Existing Var?

Oct 28, 2010

As title says I need to create variable named with value of other variable! So is that possible?

What exactly I need is something like this:

for(var i=0; i<11; i++){
var Img[i] = ""
}

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved