Simple URL redirection not working - please help!!

D

demontraitor

Ok, I have the script below...

<script language="javascript">
function submitit() {
var url;
url = '../system/messageObject.asp?' + qry + '?' +
myform.fullname.value + '?' + myform.comments.value';
alert (url);
document.location = url;
}
</script>


When I display the URL using ALERT, the URL is exactly how I want it.
But the document.location (or any other function I use) does not load
the page! All I want to do is load the page the URL is pointing to.

What have I done wrong?

Thanks - this is killing me. I have tried all types of examples in
VBScript and Javascript, but they do not work :eek:(

Demon
 
O

Otto Lang

Ok, I have the script below...

<script language="javascript">
function submitit() {
var url;
url = '../system/messageObject.asp?' + qry + '?' +
myform.fullname.value + '?' + myform.comments.value';
alert (url);
document.location = url;
}
</script>


When I display the URL using ALERT, the URL is exactly how I want it.
But the document.location (or any other function I use) does not load
the page! All I want to do is load the page the URL is pointing to.

What have I done wrong?

Change

document.location = url;

to

window.location.href = url;

Then it should work.

HTH
../otto
 

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

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top