473,397 Members | 1,960 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,397 software developers and data experts.

Firefox testing

Please I need some help, I have this function that I need to test it in Firefox 2.0.
I am a JavaScript beginner, so I don't know how to test this. I just need someone to show me how I can create a function in HTML to check if this function stretchHV(......) works good in Firefox.

//Gradually resize a DIV (both vertically and horizontally)

function stretchHV(divName,initVSize,finalVSize,initHSize,f inalHSize,steps)
{
var curEl=document.getElementById( divName );
if (steps>0)
{
var diffV=(finalVSize-initVSize)/steps;
var diffH=(finalHSize-initHSize)/steps;
curEl.style.height='' + eval(initVSize + diffV) + 'px';
curEl.style.width='' + eval(initHSize + diffH) + 'px';

setTimeout("stretchHV('" +divName +"'," +eval(initVSize+diffV)+ "," +finalVSize+ "," +eval(initHSize+diffH)+ "," +finalHSize+ "," +eval(steps-1)+ ")",1);

// setTimeout("stretchHV('" +divName +"'," +eval(initVSize+diff)+ "," +finalVSize+ +"'," +eval(initHSize+diff)+ "," +finalHSize+ "," +eval(steps-1)+ ")",1);
}
}


Thank you in advance.
Mar 29 '07 #1
4 1382
acoder
16,027 Expert Mod 8TB
Changed thread title.
Mar 30 '07 #2
acoder
16,027 Expert Mod 8TB
Welcome to TSDN.

It depends how you want to test it. Do you want it to run when you click on a button or when the page loads?

There should be a div on the page:
[HTML]<div id="yourid">some text</div>[/HTML]
Mar 30 '07 #3
Welcome to TSDN.

It depends how you want to test it. Do you want it to run when you click on a button or when the page loads?

There should be a div on the page:
[HTML]<div id="yourid">some text</div>[/HTML]

Hey Acoder, It doesn't say anything about a button in the whole script, so I'm just going to test it when the page loads. About the div, Yes there should be a DIV there. The thing is that this javaScript file is an external file. So I have to create a HTML file to test it, which means I have to call the JS file. And the problem I'm having is sending the DIV into the function and then getting the right vertical and horizontal value to see if it works in Firefox. Also what type of properties should I give the DIV for this test, just width and height or something else.

Thank you in advance.
Mar 30 '07 #4
acoder
16,027 Expert Mod 8TB
Hey Acoder, It doesn't say anything about a button in the whole script, so I'm just going to test it when the page loads. About the div, Yes there should be a DIV there. The thing is that this javaScript file is an external file. So I have to create a HTML file to test it, which means I have to call the JS file. And the problem I'm having is sending the DIV into the function and then getting the right vertical and horizontal value to see if it works in Firefox. Also what type of properties should I give the DIV for this test, just width and height or something else.

Thank you in advance.
You can run the function on the click of a button, e.g.
Expand|Select|Wrap|Line Numbers
  1. <input type="button" onclick="functionname(parameters)">
Give the div a width, height and an id.
Apr 2 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Geoff | last post by:
When trying to focus a field in Firefox, I get the following error: Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::...
5
by: code_wrong | last post by:
Hi Firefox does not support the IE specific 'event' identifier and just quits running the script. ..... even though the identifier only turns up in code marked for IE only ... Does this seem...
3
by: TJS | last post by:
I am finding that the serverside requiredvalidator doesn't fire in the firefox browser, and user request proceeds through to my updateProfile method. Validation is working correctly in the IE...
5
by: John Abbler | last post by:
I'm currently testing doing some testing with other browsers and have found that my custom field validators aren't firing with Firefox or Netscape, but they work fine with Ie. Here's the code...
4
by: DamonChong | last post by:
Hi, Thanks alot in advance. I got the following two functions in my javascript which work fine in Firefox 1.5 but not in IE6. Can someone please help? Thank you again. ...
3
by: Jim | last post by:
I had Firefox set as my default browser, but I wanted to change back to IE when testing my webservices. Easy enough....(in IE) Tools>Internet Options>Programs then check "Internet Explorer...
9
by: WebMatrix | last post by:
I've been developing ASP.NET 1.1 application, testing it in IE 6.0 on my development machine. Of course, everything looks normal in IE as it should. Well, since it's going to be released to...
9
by: =?Utf-8?B?Sm9obiBCYWlsZXk=?= | last post by:
I have a ASP .Net page that allows moving around items on the page through javascript. This page works fine in IE. In FireFox however, I have found that if the page is using XHTML 1.0...
13
by: Gretsch | last post by:
Re XML, Javascript, IE, Firefox Hi, I have a very simple & small XML file (only 7 variables). The code works for IE, but not for Firefox. I've search around and found lots of alternatives, but...
6
by: dmorand | last post by:
I'm having a little trouble with my ajax. I can see my results in IE, but not firefox. I'm assuming I'm missing some syntax somewhere. alert("Test " + results + testing); returns the values in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.