473,785 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why can't I get a large jump list to work?

Is there a limit to how many items can be in a jump list?

My script worked fine with 126 items, but at 152 items it just doesn't
work. When I select a page from the drop down menu it will only bring
me to one particular Web page among the 152, a page I haven't
selected. It's the same page all the time.

The alternative reason why it doesn't work is that I've munged up some
part of the javascript. I've had to adjust all 152 items by hand, so I
may well have screwed something up. Does anyone know of a piece of
software or some technique that will allow me to just highlight a list
of file names and turn them into a jump list? The way I'm doing it is
tedious.

Here's a truncated version of my javascript, the file names have been
changed to protect the guilty.

<!--Here's where the javascript begins.-->
<script language='JavaS cript'>
<!--
function jump()
{
jval=document.j oform.jsel.sele ctedIndex;
if (jval==0)
{
loc='foobar_12-22-03.html';
}
if (jval==1)
{
loc='foobar_12-08-03.html';
}
if (jval==2)
{
loc='foobar_11-24-03.html';
}
if (jval==3)
{
loc='foobar_11-10-03.html';
}
if (jval==4)
{
loc='foobar_10-27-03.html';
}
.....
if (jval==150)
{
loc='foobar_02-23-98.html';
}
if (jval==151)
{
loc='foobar_02-09-98.html';
}
window.open(loc ,'_top')
}
// End JavaScript -->

</script>

And of course there's a form.

<form name="joform" size=1>
<select name="jsel">
<option selected>Web page for December 21/22, 2003
<option>Web page for December 7/8, 2003
<option>Web page for November 23/24, 2003
<option>Web page for November 9/10, 2003
<option>Web page for October 26/27, 2003
.....
<option>Web page for February 22/23, 1998
<option>Web page for February 8/9, 1998
</select>
<a href="javascrip t:jump()"><img src="graphic.jp g" width="44"
height="28" align="Absmiddl e" border="0" alt="click here to see the
page"></a>
</form>

Any hints would be appreciated. I may just be too tired by this time
to be able to see the obvious.
Jul 20 '05 #1
4 2217
In article <1o************ *************** *****@4ax.com>,
no****@nospam.i nvalid enlightened us with...

The alternative reason why it doesn't work is that I've munged up some
part of the javascript. I've had to adjust all 152 items by hand, so I
may well have screwed something up. Does anyone know of a piece of
software or some technique that will allow me to just highlight a list
of file names and turn them into a jump list? The way I'm doing it is
tedious.


It sure is. Do you have a server-side language available? All you would
have to do would be to make a server-side generated list with all the
file names in the directory.
PHP, ASP, even Perl...?

I've got a PHP script around here somewhere that lists files in a
directory and writes them out. That's easy to make into a jump menu.

--
--
~kaeli~
Once you've seen one shopping center, you've seen a mall.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2
In article <1o************ *************** *****@4ax.com>,
no****@nospam.i nvalid enlightened us with...

fix this to be more cross-browser...
<!--Here's where the javascript begins.-->
<script language='JavaS cript'> <script language="javas cript" type="text/javascript"> <!--
function jump()
{
jval=document.j oform.jsel.sele ctedIndex;
jVal=document.f orms["joform"].elements["jsel"].selectedIndex;

And of course there's a form.

<form name="joform" size=1>
<select name="jsel">
<option selected>Web page for December 21/22, 2003
</option> is required for any non-IE browser. Might be munging up IE,
too.
<a href="javascrip t:jump()"><img src="graphic.jp g" width="44"
height="28" align="Absmiddl e" border="0" alt="click here to see the
page"></a>


How about something a little better for non-JS folks like people with
disabilities?
<a href="graphic.j pg" onClick="jump() ;return false;"><img
src="graphic.jp g" width="44" height="28" align="Absmiddl e" border="0"
alt="click here to see the page"></a>
--
--
~kaeli~
Murphy's Law #2030: If at first you don't succeed, destroy
all evidence that you tried.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #3
kaeli <ti******@NOSPA M.comcast.net> writes:
</option> is required for any non-IE browser. Might be munging up IE,
too.


While I highly recommend including it, it is not required by HTML 4.
The HTML 4.01 specification says about the option element:
Start tag: required, End tag: optional

It is, ofcourse, required by XHTML, but that's a different beast to
begin with.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #4
JRS: In article <1o************ *************** *****@4ax.com>, seen in
news:comp.lang. javascript, Sleepless on the Web <no****@nospam. invalid>
posted at Mon, 9 Feb 2004 11:50:13 :-
function jump()
{
jval=document.j oform.jsel.sele ctedIndex;
if (jval==0)
{
loc='foobar_12-22-03.html';
}
if (jval==1)
{
loc='foobar_12-08-03.html';
}
if (jval==2)
{
loc='foobar_11-24-03.html';
}
if (jval==3)
{
loc='foobar_11-10-03.html';
}
if (jval==4)
{
loc='foobar_10-27-03.html';
}
....
if (jval==150)
{
loc='foobar_02-23-98.html';
}
if (jval==151)
{
loc='foobar_02-09-98.html';
}
window.open(loc ,'_top')
}


Or something like

function jump() {
var jval=document.j oform.jsel.sele ctedIndex;
var ASDF = [
'12-22-03',
'12-08-03',
...
'02-09-98']
loc = "foobar_" + ASDF[jval] + ".html"
window.open(loc , '_top')
}
If that lot is for public use, rather than merely in the USA, change
those dates to standard form, 2003-12-22 etc.

However, you may be able to access the value of the selected element and
compute the URL from that -

S = "Web page for December 7/8, 2003"
S = S.replace(/(.*) (\w+) \d\d?\/(\d\d?), (\d{4})/, "$4 $2 $3")
gives 2003 December 8 which can be read by new Date

But you may have an end-of-month problem in labelling.
Those dates appear to be alternate Sunday/Monday; therefore both the
option string and the URL string can be computed from the index.

A drop-down of that length is too long for comfort anyway; have a drop-
down for years, then maybe one for months, then one for events therein.

Read the newsgroup FAQ.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1874
by: michaaal | last post by:
How can I get a list of the date of every friday of the year? I realize this code is wrong, but maybe you'll see what I am after... Sub GetFridayList() For x = 1 to len(Date(2004)) if Date(2004,x)="Friday" then msgbox (Date2004) Next End Sub
0
1177
by: sonu | last post by:
I have created a list like... row1item1 row1item2 row1item3 row2item1 row2item2 row2item3 row3item1 row3item2 row3item3 ......... ..... ...... can we indexing in List control in window application.
1
2707
by: SenthilVel | last post by:
Hi We use System.ServiceProcess.ServiceController class is used to get the list of windows services installed in a particular machine. Also we use System.ServiceProcess.ServiceController.GetServices("IIS") to get the control on the IIS .. In the same way can we get the List of services which are part of the COM+ applications.
6
4902
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
0
828
by: Hexman | last post by:
Hello All, Where can i get a list of ALL ERR.Numbers and Descriptions??? Including ADO, VB, etc.... Thanks, Hexman P.S. Sorry about my last post on this without a subject.
1
2209
by: Maxwell2006 | last post by:
Hi, How can I get a list of AppDomains under the current process? Thank you,
1
1524
by: Alexander Vasilevsky | last post by:
Can I get a list of ALL the fields and methods of class? http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas discount
0
727
by: madankarmukta | last post by:
Hi All, I have a doubt regarding "How can I access the List of software in the control panel's add and remove program utility programatically in .Net.? "
1
2533
by: Fluffy654 | last post by:
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making a really obvious mistake. To test this, I have successfully installed apache and have read the official documentation on how to get SSI functionality working. Unfortunately, I can't get it to work at all. After reading tons of threads on this...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8978
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.