xavier romea

Ranch Hand
+ Follow
since Jun 28, 2001
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by xavier romea

probably in the IE preferences... I don't think it's possible with a javascript function.
give a parameter (i.e. formElement) to your function which will receive a reference to this form element.
and put "this" as parameter when onClick calls a function like this: onClick="functionName(this)"
this is a reference to the current form element.
In the body of your function, you get the name of the element like this:
var nameElement = formElement.name;
In netscape, you can use the property parent of a frame.
parent is the frameset containing the current frame and to access the other frames: parent.frameName or parent.frames[index]
it should be event.target
There is no way to access to hard drive using Javascript.
But you could use cookies to save some data...
The problem with netscape is when you set the selected property of any option, netscape refreshes the display of the select box, which scrolls back to the top. The solution is ot not set this property of any option.
I tried my code and it works... (for information, i tried it on netscape 4.7)
This code should work:
function selectDeselectAllQuarters(){
// set listbox to the select item of the form
var listbox = document.report_form.quarter;

// get the index of the selected option
var selectedOption = listbox.selectedIndex;

// if the selected option is the first one (which value is "ALL")
if (selectedOption == 0){
// unselect all others options
listbox.selectedIndex = 0;
However, if the first option is selected and you try to select another question by holding down a control key like Ctrl or Shift, only the first option remains selected (which seems to be logical).
why not put your second javascript function in a second page (the target of the first page)? The second function'll compute the response string when the browser loads the second page
Normally, you can't dispath a form on several layers or div.
I'm afraid you cannot call an exe by a javascript function.
When netscape loads a file, netscape looks for the file extension in the preferences -> Navigator -> Applications (quite similar to the base register in Windows) and asks the user if he wants to download the file onto the hard drive or open it with the application (plugin or standalone software) netscape has found in the preferred applications.
The size of an input textbox is set in character so it depends of the size of the font of the page.
The replace function is a special funciton used with a regular expression. As i'm a bit sleepy, i'll give a simplier way to replace a single quote:
function replaceQuote(str){
var tmp = "";
for(var i = 0;i < str.length;i++){
tmp += (str[i] == "'" ? "" : str[i]);
document.formName.textareaName.value = tmp;
Moreover, the value of a textarea seems to be quite readonly:
you cannot modify it, bu you can replace it entirely by another value.
I already have had this kind of problem. Here the code I used
for(var i = 0;i < formName.selectBoxName.length;i++){
if ( formName.selectBoxName.options[i].value == sessionVariableValue){
formName.selectBoxName.selectedIndex = i;
I don't know how you get the session variable but this code should help a little bit.
But if you don't set any value to the options of the selectBox, replace in the code formName.selectBoxName.options[i].value by formName.selectBoxName.options[i].text.
For information, options of a selectbox have 2 principal properties: text, which is displayed in the page, and value, which is sent to the url set in the property "action" of the form.
I can see only one error. It's:
if (Trim(rsLogin.fields.getValue("password"))=Trim(password)
you use a single = instead of a double == and the parenthesis ending the condition. A single = is the symbol of affectation and a double = the symbol of equality
the function replace is used with regular expressions,isn't it?
the function should be more basic like:
function removeCharacter(str){
for(var i = 0;i < str.length;++){
str[i] = (str[i] == '\"' ? "" : str[i])