Reusing A Script

Jul 23, 2005

I have a function sililar to the one below on one of my pages. It puts
the value of a field on a form into a variable called FieldName:

function checkSomething() {
var FieldName = document.frmFormName.FieldName.value
}

I'd like to reuse the function on a different page (instead of writing
another almost identical script on that page), but I need to change the
name of the field in the script depending on the page that the script is
used on.

How do I change the script so that I can put the script in an includes
file and then pass the name of the field to the script according to the
page that the script is being used?

View 2 Replies


ADVERTISEMENT

Reusing A Frameset Page With Js?

Jul 21, 2011

I would like to use a single page (say linkout.html) as a branding/linkback frameset for a set of links from a site. (Think Digg or StumbleUpon). My intuition is that this is a Javascript thing and that I should be able to access the frame src= from the DOM,

View 1 Replies View Related







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