473,382 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Trapped on IE Data Island


I have an XML document containing 400+ quotations, in the format:

quotes
qtnum
title
author
comment
quotes
...400+ more
XML file size 156Kb
The tag <xml id="quotes" src="qtsxml_br.xml"></xml> is on the htm page.
The "quotenum" is obtained from a form on the html page.

The code snippet:
var numOfQuotes = 402; // needs to be changed manually as quotes are added
//numQuotes needs to be global for both functions
function FindQuote()
{

var qutNum = parseInt(quotenum.value);

while (!quotes.recordset.eof)
{
//script is working to this point - it is the next line that is problem
var findNum = quotes.recordset("qtnum");// always bombs out!!
if (findNum.indexof(qtNum) >= 0)
{
ResultHTML +=" ...

I have a "random quote" script that bombs out at the same line.

The page is at http://www.bishfish.co.nz/quotes/fishquotes2.htm if it helps.

Any help would be appreciated, so would pionting me to a cross-browser
script to
get me out of IE's Data Island clutches.

--
Tony Bishop
www.bishfish.co.nz
New Zealand
Jul 23 '05 #1
3 1587
Bishfish wrote:
I have an XML document containing 400+ quotations, in the format:

quotes
qtnum
title
author
comment
quotes
...400+ more
XML file size 156Kb
The tag <xml id="quotes" src="qtsxml_br.xml"></xml> is on the htm page.
The "quotenum" is obtained from a form on the html page.

The code snippet:
var numOfQuotes = 402; // needs to be changed manually as quotes are added
//numQuotes needs to be global for both functions
function FindQuote()
{

var qutNum = parseInt(quotenum.value);
parseInt() should always be used with a radix (I'll presume you want
base 10):

var qutNum = parseInt(quotenum.value, 10);

Some reading:
<URL:http://developer-test.mozilla.org/docs/Core_JavaScript_1.5_Reference:Functions:parseInt>

An alternative is:

var qutNum = +quotenum.value;

while (!quotes.recordset.eof)
{
//script is working to this point - it is the next line that is problem
var findNum = quotes.recordset("qtnum");// always bombs out!!
var findNum = quotes.recordset["qtnum"];

Complete guess as I can't access your site - classified entertainment
for internet monitoring [i.e. blocking!!] purposes.

It is probably more efficient to not initialise findNum on each
iteration:

var findNum;
var qutNum = parseInt(quotenum.value);
while (!quotes.recordset.eof)
findNum = quotes.recordset["qtnum"];

Any help would be appreciated, so would pionting me to a cross-browser
script to
get me out of IE's Data Island clutches.


<URL:http://www.xml.com/pub/a/2005/02/23/sarissa.html>
--
Rob
Jul 23 '05 #2
Thanks Rob,

will make the changes and do some reading.

Can't understand why you cannot access the site, works this end, maybe try
going in via the home page www.bishfish.co.nz.

Thanks again
Jul 23 '05 #3
Bishfish wrote:
Thanks Rob,
Please quote what you are replying to (there's been a bit of discussion
on that recently ...)

Since you seem to be using a reasonable UA, that should not be
difficult.

will make the changes and do some reading.

Can't understand why you cannot access the site, works this end, maybe try
going in via the home page www.bishfish.co.nz.
from my post:
I can't access your site - classified entertainment for internet
monitoring [i.e. blocking!!] purposes.


In other words, my employer blocks anyone on the network from accessing
sites with certain classifications - your site is classified as
"entertainment", so I can't get access to it.

Presumably I don't need entertainment at work.

--
Rob
Jul 23 '05 #4

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

Similar topics

2
by: Simon | last post by:
Hi, I am having a little problem with my PHP - MySQl code, I have two tables (shown below) and I am trying populate a template page with data from both. <disclaimer>Now I would like to say my...
3
by: Nicole Schenk | last post by:
I need to know the code I must write to respond xml to a data island as a result from a src request from the data island. Thanks so much
2
by: Dnna | last post by:
I have a table which is bound to an Internet Explorer XML data island. I'm using ASP.NET's client-side validators for an input field in the table. The problem is that if the input fields are in...
1
by: Mark Goldin | last post by:
Is there a control that would act as an xml data island? Another words, it can store static xml data and deliver it to the client side? Thanks
3
by: Pat Alessi | last post by:
I want to use an XML data island to display editable records to a user on the cleint side. The user should be able to scroll through the records, modify any or all fields in any or all records, add...
2
by: adolf garlic | last post by:
I have an aspx which has some client side script. The client side part of the page also features an xml data island What I want to be able to do is to get at the data island from the server...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
0
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.