Setting textbox text to current url in Firefox?

  • Thread starter Thread starter Chris Lincoln
  • Start date Start date
C

Chris Lincoln

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>
 
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!
 
Back
Top