SoftDivScroll Adds #anchorname?
Mar 25, 2010
SoftDivScroll (http://scripterlative.com/files/softdivscroll.htm) adds #anchorname if clicked from a different page yet it doesn't on the same page
-home.php
--#anchor1
services.php
[code]....
View 1 Replies
ADVERTISEMENT
May 15, 2006
i need to add another "li" element to a list. The "li" should be with 0 indentation.
When I statically write it (HTML/CSS), with ul/li margin/padding 0 - it
looks great. When I dynamically add it (Javascript) - in IE (and not FF) it's ALWAYS
indented, no matter what!!
This is my javascript code:
var newLiElement = document.createElement('li');
newLiElement.style.padding = Ɔpx'
newLiElement.style.margin = Ɔpx'
List.appendChild(newLiElement);
newLiElement.parentNode.style.padding = Ɔpx' //even tried to update
the "ul" father node
newLiElement.parentNode.style.margin = Ɔpx'
Even though - the div in IE looks like this:
List Header
first li
second li
But in FF the div looks like this (and this is the right scenario):
List Header
first li
second li
I event tried to define a new class with padding and margin 0 and use
newLiElement.className = 'no-padding-maring-class-name'
but it's still indented in IE.
View 3 Replies
View Related
Jun 21, 2010
javescript program that adds all even integers between 1 to 100
View 5 Replies
View Related
Feb 1, 2010
I have a three textboxes in a form. Using OnBlur, I am attempting to call a function to add one to an input textbox to add 1 to the cost.As the user enters text into textbox01, the number 1 appears in the input box about cost, as the user enters text into textbox02, the input box displays 2 and the user enters text into textbox03, the input box displays 3.
My JavaScript is as follows:
<script type="text/javascript">
//copies contents of first textbox to second textbox
[code]....
View 5 Replies
View Related
Feb 10, 2009
I have a google script i paste in my web page. But when users click on the adds, it redirects the same page to the adds.How do i enable them as popups ?Here is my script below
<script type="text/javascript"><!--
google_ad_client = "pub-7975590523545723";
/* 728x90, created 06/01/09 */
[code]....
View 2 Replies
View Related
Feb 5, 2010
For some reason, when i split a basic string in IE I'm getting an extra value in the array which is something like this:
function(v,n){n = (n==null)?0:n; var m = this.length;for(var i = n;
That's the actual value. Here's the call I use:
var value = "test@test.com, test1@test1.com";
[code]....
View 2 Replies
View Related
Feb 11, 2010
I have been trying to write a script that allows a user to click on a button like a plus sign to add an additional field for a phone number when they have more than one phone number to enter. I have created a script that sort of does this. It doubles up what is already there, so, the first time, everything is fine, but after that I get a lot more fields than I want. I am a php programmer and not familiar enough with javascript to get to what I want. My script is included below. What I am doing here is retrieving the html content and then adding it to what is already there. In php I would use an if conditional test to see if the data has been retrieved. The first time it would retrieve the data into a variable. After that it would not retrieve it. I think I am getting into some scope and sequence issues here. Javascript is a bit different than php in these regards.Also there is a commented line in the code that asks another question about the use of variables that I don't understand.I also tried using appendChild() here to no avail. I couldn't get that to work at all.
<html>
<head>
<script type="text/javascript">
[code]....
View 2 Replies
View Related
Aug 13, 2011
I am trying to use a code snippet fromthe code works fine however what I want to do is modify it so that when the user clicks the link to add another entry their would be a drop down <select> box to the left of the text input box. Which I have working but each time the link is clicked to add a new <select> and text input box row the previous <select> dropdowns seem to loose their values and only the text input boxes keep their values. So I am not sure where/how to edit my below code to work properly
Code:
below javascript controls the functionalty of the script
var arrInput = new Array(0);
[code]....
View 2 Replies
View Related
Mar 10, 2009
To put things short, I just started with Ajax and was abel to update categories without reloading whole page. I even was abel to add the new categori to the drop down menu of categories. The problem comes when I try useing the new option.Now to expand on this. I have something like.
Code:
var optn = document.createElement("OPTION");
optn.text = document.categoryForm.category.value;
[code]....
View 5 Replies
View Related
Mar 23, 2011
I'm working on an event driven app, which currently adds a listener to each of the relevant elements directly. I am planing on changing this to use a delegated event method but this raised the following question...Which is more expensive navigating the DOM, or adding event listeners?[code]I need to handle the click event of buttons 'b1', 'b2' & 'b3', a set of these buttons can be found in each 'a1' container but not always in the same nested position. To handle the events I need to know the class of the button clicked and the id of its 'a1' container. Would it be more efficient to:
A ) Add just one listener to the 'main' div, having to find the 'a1' containers id by inspecting each parentNode of srcElement until an 'a1_*' match is found.
B ) Add a listener to each 'a1' container, the id of the container can be easily passed as an argument.
View 4 Replies
View Related
Aug 12, 2011
I am trying to write a script that allows a button in an iframe to change the value of a variable that is in the parent page. I then want to have an if statement in the parent that will change the url of the iframe ( or even change the url of the parent)Here's what I have for the parent:
HTML Code:
<html>
<head>
[code].....
View 12 Replies
View Related
Mar 9, 2010
My page is not displaying correctly in Internet Explorer. Its displays properly in all other browsers.
The issue: Internet Explorer
When the page is loaded-- Internet Explorer places DIV tags between the the <LI> elements on my page and in other areas of the controls which have been dynamically added to a placeholder on the child form during page load. The first <UL> element on the list has an ID assigned. The java-script functions correctly on the first <LI> element but does not get to the rest as <DIV> tags have been placed between them breaking up the nodes.
Opera, Safari, Chrome and Firefox load these controls without separating the elements with additional DIV tags. They remain grouped together and display as intended. As they remain in the proper UL container my Java-Script can collapse the list as designed by getting the child elements of the UL.
View 2 Replies
View Related
Nov 30, 2011
I have a function where it add rows into a table. For the example below it adds a row under the Question column, (I have not included whole function as there is a lot of code so instead I have just posted the relevant code.
Code:
//This is inside a function
var row = document.createElement("tr");
[code]....
View 1 Replies
View Related
Nov 26, 2009
Not sure how easy this is, but I would like to have 4 checkboxes that effect the items shown in a drop down menu.
For example:
[x] School #1
[x] School #2
[code].....
View 11 Replies
View Related
Jan 28, 2010
I am trying to rotate adds that are from tradedoubler!
I have created a mysql db as follows
And i can succesfully connect via a php include and rotate my query to show a different add each time the page loads
The problem im having is that add itself is not showing,
Is there anyone here that could help with successfully calling a java script from a mysql database.
The format of the add from TD is as follows
I have tried using just the [url]
View 1 Replies
View Related
Jun 15, 2011
I have a website with five links, each with its own id. onClick I would like to create a cookie for the user that adds the link id that they have clicked.I am planning to do this using an array, however, I am a bit confused about the theroy behind a cookie.It is just a text file that can hold any data correct? So I could store an array with
array[0] = hi.html
array[1] = hello.html
and later on pull up what is in array[0] to diplay it on the page? Can I do this with one cookie or would I need a new cookie for each link?
View 2 Replies
View Related
Feb 11, 2010
I have been trying to write a script that allows a user to click on a button like a plus sign to add an additional field for a phone number when they have more than one phone number to enter. I have created a script that sort of does this. It doubles up what is already there, so, the first time, everything is fine, but after that I get a lot more fields than I want. I am a php programmer and not familiar enough with javascript to get to what I want. My script is included below. What I am doing here is retrieving the html content and then adding it to what is already there. In php I would use an if conditional test to see if the data has been retrieved.
The first time it would retrieve the data into a variable. After that it would not retrieve it. I think I am getting into some scope and sequence issues here. Javascript is a bit different than php in these regards. Also there is a commented line in the code that asks another question about the use of variables that I don't understand. I also tried using appendChild() here to no avail. I couldn't get that to work at all.
[Code]...
View 3 Replies
View Related
Aug 6, 2011
I have a small script which adds a class to the current menu item selected.
Currently on the page load (this menu is within one page) the first menu item which is loaded does not have this .mywork_active class. Its not until you click it or another item that the class is added.
What would I need to do make the script add this class to the first item on load.
The menu looks like so:
View 1 Replies
View Related
Jan 5, 2010
I have links in my tab panels. Those links are broken because (from what I can figure) the remote tab section in the ui.tabs.js file adds #ui-tabs-(some number) to those links.
var id = self.tabId(a);
a.href = '#' + id;
What can I put in my tab function:
jQuery(document).ready(
function() {
jQuery("#tabs").tabs();
[code]....
View 2 Replies
View Related
Mar 19, 2011
When the user clicks the remove link it properly adds a new option to the dropdown however it adds it 3 times meaning 3 option tags. Why is that?
Code:
// Add a click handler to each anchor tag in the characterList <ul> element
$('#characterList a').click( function(evt) {
evt.preventDefault();[code].....
View 1 Replies
View Related
Oct 18, 2005
Can someone tell me how to make a javascript that will add a shipping price ($5.00) to any price that is listed as a value for a select menu on multiple drop downs?
<select name="shirt">
<option value="10.00">s-l</option>
<option value="12.00">xl-xxl</option>
</select>
Price: <input type="text" name="total" value="$0.00" /> (would show this without touching the drop down)
Price: <input type="text" name="total" value="$15.00" /> (would show this if selecting s-l)
Price: <input type="text" name="total" value="$17.00" /> (would show this if selecting xl-xxl)
<select name="shorts">
<option value="14.00">s-l</option>
<option value="16.00">xxl-xxl</option>
</select>
Price:
<input type="text" name="total" value="$0.00" /> (would show this without touching the drop down)
Price: <input type="text" name="total" value="$19.00" /> (would show this if selecting s-l)
Price: <input type="text" name="total" value="$21.00" /> (would show this if selecting xl-xxl)
View 5 Replies
View Related
Mar 10, 2010
I am trying to build a site , classified adds.
And one of the features is selecting/making ads that you want to see in a separate page later on(something like a shopping cart) BUY way simpler
after a user search for something he gets a LIST of numbered ads(different ID for each) and a button SELECT/MARK this ad.
This select/mark button suppose to add the specific ad ID to a coockie and then when the user clicks "go to see my ads" its will pass ALL the ID numbers to aPHP page that will print what it should.
what I was trying to do is try to use a "shopping cart" script and just use the part that each product has a "add to cart" button and in the "my cart" page it will show the selected products, but as I have no clue about javascript in this way I was willing to pass the variables(ID numbers) with JS and $_GET them with PHP and from there I can continue
so what I need is : Asimple <form> that when u submit it , it sends a variable(ID) to a coockie and STAYS ON THE SAME PAGE then when you decide to see the selected list it will pass all the ID variables to the page with the link it self and I can GET it with PHP.
View 2 Replies
View Related
Sep 10, 2010
I have two js scripts running on my project at the moment, one is uses mootools and the other uses jquery-1.2.3min, both work but not if they are on the same page.The mootool adds the pop out effect to a form box and the jquery enables the nav switch for 2 boxes that contain different form fields for a search engine. Now I've been reading up on the two and have decided to favour jquery which means I have to reproduce the same effect in mootool but with my limited knowledge it's proven rather hard.The mootool code:
var isExtended = 0;
var height = 165;
var width = 240;
[code]....
View 3 Replies
View Related
Jul 16, 2009
had this in browsers areas but people told me I should put it here in Javascript because more people here would probably have seen it before and know why it happens. I have basic Javascript that rotates images. I've noticed any kind of Javascript code that rotates images has this same problem only in Mozilla. When the images rotate in Mozilla in between the rotations, Mozilla browser adds a little colored square that represents a blank image that are able to be seen does anyone know why Mozilla Browser adds that? For example when looking at this page in Mozilla can see it. if you know if this is some Mozilla problem with Javascript and images. Doesn't happen with IE and other browsers shows the images only and nothing else.
View 2 Replies
View Related
Jan 26, 2010
I'm experienceing some problems with jQuery 1.4(.1) with the "new" ajax param serialization. My code does basically this:
[Code]....
so I'm creating an array within the "ajaxparams" object, which I fill with some data. So far so good. Problem here is, the $.post request creates a string like this:
[Code]...
Release Notes Snippet: jQuery 1.4 adds support for nested param serialization in jQuery.param, using the approach popularized by PHP, and supported by Ruby on Rails. For instance, {foo: ["bar", "baz"]} will be serialized as “foo[]=bar&foo[]=baz”. since I'm working with perl and not php, this issue is getting a little bit annoying.
View 6 Replies
View Related
Nov 22, 2010
I have a text field (field1) already displayed on the HTML page. However, there's a link where you can add additional text fields to the page as well. When the link is clicked, the second text field is added successfully (field2), and when the link is clicked again, the third text field (field3) is added successfully. However, the third field does not add itself to the page, and the text for anything greater than a third field also isn't displayed after. This obviously means that my "fields" variable is not working right
<script language="javascript">
fields = 1;
function addMore() {
if (fields = 1) {
document.getElementById('addedMore').innerHTML = "<input type='text' name='field2' size='25' /> <span>Field 2.</span>";
[Code]....
View 2 Replies
View Related