|
Home > Archive > Microsoft Content Management Server > October 2006 > Can't Redirect in CMS Site
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Can't Redirect in CMS Site
|
|
|
| On my MCMS template page with 'Switch To Edit' showing I have an input button
with this code.
<input type="text" onkeypress=GoToSearch(event) class="search" />
Now in my incldued javascript code I have this but the browser only blinks
back at me and does not redirect me.
Can anyone assist?
function GoToSearch (e)
{
if (e.keyCode == 13)
{
window.location.href = "http://www.yahoo.com";
}
}
Thanks
Tom
| |
| Stefan [MSFT] 2006-10-17, 7:31 pm |
| Hi Tom,
does the GoToSearch code get executed?
Did you double check this?
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
"Tom" <Tom@discussions.microsoft.com> wrote in message
news:D40D8363-9CCF-48F6-A096-17DFC243E256@microsoft.com...
> On my MCMS template page with 'Switch To Edit' showing I have an input
> button
> with this code.
>
> <input type="text" onkeypress=GoToSearch(event) class="search" />
>
> Now in my incldued javascript code I have this but the browser only blinks
> back at me and does not redirect me.
>
> Can anyone assist?
>
>
> function GoToSearch (e)
> {
> if (e.keyCode == 13)
> {
> window.location.href = "http://www.yahoo.com";
> }
> }
>
>
> Thanks
>
> Tom
| |
|
| Stefan:
Yes, the GoToSearch Javascript code gets called because I set an alert('in
here'); just before the redirect. It just simply does not work in CMS land.
I ended up making it a server control and doing a Response.Redirect but I'd
like to know why the redireciton window.location.href =
"http://www.yahoo.com"; doesn't filre. THe only think that I see is the
browser blinking like a postback has occurred, which it has but it should not
have as the redirection should happen.
So is this unique to CMS and are there any special settings in web.config or
otherwise. BTW>>>I do have the console showing too.
Thanks
om
"Stefan [MSFT]" wrote:
> Hi Tom,
>
> does the GoToSearch code get executed?
> Did you double check this?
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
>
> "Tom" <Tom@discussions.microsoft.com> wrote in message
> news:D40D8363-9CCF-48F6-A096-17DFC243E256@microsoft.com...
>
>
>
| |
| Stefan [MSFT] 2006-10-18, 1:23 pm |
| Hi Tom,
if I remember right (I don't have access to a CMS system at the moment)
there is an onunload event registered that would interact with your code.
And there should be a javascript variable that needs to be set to prevent
this from happening.
You might want to search the html/javascript code of MCMS for this to
implement a workaround.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
"Tom" <Tom@discussions.microsoft.com> wrote in message
news:5557B1AE-A24A-44CD-BAE2-EC2BAE0AE3CF@microsoft.com...[vbcol=seagreen]
> Stefan:
>
> Yes, the GoToSearch Javascript code gets called because I set an alert('in
> here'); just before the redirect. It just simply does not work in CMS
> land.
> I ended up making it a server control and doing a Response.Redirect but
> I'd
> like to know why the redireciton window.location.href =
> "http://www.yahoo.com"; doesn't filre. THe only think that I see is the
> browser blinking like a postback has occurred, which it has but it should
> not
> have as the redirection should happen.
>
> So is this unique to CMS and are there any special settings in web.config
> or
> otherwise. BTW>>>I do have the console showing too.
>
> Thanks
>
> om
>
> "Stefan [MSFT]" wrote:
>
| |
|
| Stefan:
I did a quick search in CMS doc and did not find anything. I can move on
for now and wait until you have CMS access so you can better direct me, OK?
Thanks
Tom
"Stefan [MSFT]" wrote:
> Hi Tom,
>
> if I remember right (I don't have access to a CMS system at the moment)
> there is an onunload event registered that would interact with your code.
> And there should be a javascript variable that needs to be set to prevent
> this from happening.
> You might want to search the html/javascript code of MCMS for this to
> implement a workaround.
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
>
> "Tom" <Tom@discussions.microsoft.com> wrote in message
> news:5557B1AE-A24A-44CD-BAE2-EC2BAE0AE3CF@microsoft.com...
>
>
>
| |
|
| Stefan:
I also searched your blogs too. So please remember this thread and when you
get CMS back up, please post me back, OK?
Tom
"Tom" wrote:
[vbcol=seagreen]
> Stefan:
>
> I did a quick search in CMS doc and did not find anything. I can move on
> for now and wait until you have CMS access so you can better direct me, OK?
>
> Thanks
>
> Tom
>
> "Stefan [MSFT]" wrote:
>
| |
| Stefan [MSFT] 2006-10-18, 7:28 pm |
| Hi Tom,
will be next week.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
"Tom" <Tom@discussions.microsoft.com> wrote in message
news:EDD00B4F-174C-4B89-8039-2D8B53087AA5@microsoft.com...[vbcol=seagreen]
> Stefan:
>
> I also searched your blogs too. So please remember this thread and when
> you
> get CMS back up, please post me back, OK?
>
> Tom
>
> "Tom" wrote:
>
|
|
|
|
|