mycoolknot
Junior Member
Posts: 2
Registered: 8/6/2007
Location: USA
Member Is Offline
|
| posted on 8/6/2007 at 09:13 PM |
|
|
Multiple forms on same page??
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,
Mike
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Tigra Slider Control - Demo #2 (Multiple Sliders)</title>
<script language="JavaScript" src="slider.js"></script>
</head>
<body>
<form method="get" name="test">
</form>
<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);
</script>
<input name="Submit" type="Submit" value="Submit">
</form>
</body>
</html>
|
|
|
mycoolknot
Junior Member
Posts: 2
Registered: 8/6/2007
Location: USA
Member Is Offline
|
| posted on 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.
Mike
|
|
|
tigra
Administrator
Posts: 1990
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/7/2007 at 03:39 AM |
|
|
If the slider in the second form then change
's_form' : 0,
to
's_form' : 1,
or better give form a name i.e. <form name="myForm" ...>
and then you can reference it as:
's_form':'myForm'
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).
|
|
|
|