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

Setting textbox text to current url in Firefox?

Hello,

I can't quite seem to figure out this issue; it is specific to Firefox,
as it works fine in IE.

I have an iFrame within an aspx page that is passed a value in the
query string (e.g. [address]/index.aspx?query=about%20us). What
happens (in IE at least!) is that upon load, a textbox is filled with
the querystring and a search function is executed (search function is
not an issue).

For some reason, the textbox is not being modified... Does anyone know
why this is occuring? I'm guessing it is a matter of Firefox not
understanding one of the controls?

Thank you very much!

-Chris
Please find below the code for my script being used:

<script language="jscript">
var textBox = document.getElementById('txtSearch');
var searchButton = document.getElementById('btnSearch');
var currentUrl = new String();
//convert to string
currentUrl = String(window.parent.location);
var queryString = GetQueryString(currentUrl);
if(queryString == "")
{
}
else
{
if(textBox.value != "")
{
}
else
{
var queryStringValue = GetValue(queryString);
textBox.value = queryStringValue;
}
}
....
</script>

Jul 21 '06 #1
1 1836
Sorry for posting this in the wrong group; I have posted it in
microsoft.public.scripting.jscript

if you know of a solution though, any help would be greatly
appreciated!

Chris Lincoln wrote:
Hello,

I can't quite seem to figure out this issue; it is specific to Firefox,
as it works fine in IE.

I have an iFrame within an aspx page that is passed a value in the
query string (e.g. [address]/index.aspx?query=about%20us). What
happens (in IE at least!) is that upon load, a textbox is filled with
the querystring and a search function is executed (search function is
not an issue).

For some reason, the textbox is not being modified... Does anyone know
why this is occuring? I'm guessing it is a matter of Firefox not
understanding one of the controls?

Thank you very much!

-Chris
Please find below the code for my script being used:

<script language="jscript">
var textBox = document.getElementById('txtSearch');
var searchButton = document.getElementById('btnSearch');
var currentUrl = new String();
//convert to string
currentUrl = String(window.parent.location);
var queryString = GetQueryString(currentUrl);
if(queryString == "")
{
}
else
{
if(textBox.value != "")
{
}
else
{
var queryStringValue = GetValue(queryString);
textBox.value = queryStringValue;
}
}
...
</script>
Jul 21 '06 #2

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

Similar topics

21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
6
by: joe | last post by:
Hi Everyone, could anyone comment on the following problem: I have a textbox being appended to a cell in a table, and am trying to call focus() on like this: <snip> c01.removeChild(answerbox);...
1
by: clickon | last post by:
For testing purposes i have got a 2 step WizardControl. Eqach step contains a text box, TextBox1 and TextBox2 respectively. If i put the following code in the respective activate event handlers...
18
by: Academia | last post by:
I let the use modify the text of a combobox and then I replace the selected item with the new text (in Keyup event). But if he sets the Text property to an empty string ("") that sets the...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.