Board Logo

Multiple forms on same page??
mycoolknot - 8/6/2007 at 09:13 PM

HI, first off I want to thank the developer's of the slider app, it's amaaaaaaaaazing!

I am having an issue though. Whenever I add another form to the page, actually only when I add it above the form the form, below works fine, I get a cannot locate variable error. Below is a simple example of this problem Is there an issue solution for this? Anyway to make the slider.js script just look at a certain form name?

In my example below, if I take out the first blank form it works fine, but with any form above the slider form it doesn't work.

Thank you in advance,


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<title>Tigra Slider Control - Demo #2 (Multiple Sliders)</title>
<script language="JavaScript" src="slider.js"></script>


<form method="get" name="test">


<form action="multiple_sliders_demo.html" method="get" name="demoForm">

<input name="sliderValue" id="sliderValue1" type="Text" size="3">
<script language="JavaScript">
var A_TPL = {
'b_vertical' : false,
'b_watch': true,
'n_controlWidth': 120,
'n_controlHeight': 16,
'n_sliderWidth': 16,
'n_sliderHeight': 15,
'n_pathLeft' : 1,
'n_pathTop' : 1,
'n_pathLength' : 103,
's_imgControl': 'img/blueh_bg.gif',
's_imgSlider': 'img/blueh_sl.gif',
'n_zIndex': 1

var A_INIT1 = {
's_form' : 0,
's_name': 'sliderValue1',
'n_minValue' : 0,
'n_maxValue' : 100,
'n_value' : 20,
'n_step' : 1
new slider(A_INIT1, A_TPL);

<input name="Submit" type="Submit" value="Submit">



mycoolknot - 8/6/2007 at 09:35 PM

I am willing to pay for a solution to this, I need it to work with other forms on the same page.


tigra - 8/7/2007 at 03:39 AM

If the slider in the second form then change
's_form' : 0,
's_form' : 1,

or better give form a name i.e. <form name="myForm" ...>
and then you can reference it as:


PS: if you want to support the development of the product please consider purchasing the commercial version of the script (you'll also get additional features).

Back to forum: