Setting textbox text to current url in Firefox?

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>
 
C

Chris Lincoln

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top