Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Problem with execution of location.href...........


This topic is 7089 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am using the javascript properties, history.go and location.href in the following code.

The history.go works fine, the location.href partially works. It sends the user back to the confirm_events.xsl page but does not execute the rest of the string. Any help will be much appreciated.......Ray

<xsl:attribute name="onload">

<xsl:choose>

<xsl:when test="$current-action = 'new'">history.go(-1)</xsl:when>

<xsl:otherwise>

location.href = &apos;confirm_events.xsl?-db=Web_TA_Pre_Reg_DB&amp;-lay=Registration Evaluation Form-2&amp;-error=confirm_events.xsl&amp;-token=<xsl:value-of

select="$request-query/fmq:query/fmq:parameter[@name = '-token']"

/>&amp;-token.1=<xsl:value-of

select="$request-query/fmq:query/fmq:parameter[@name = '-token.1']"

/>&amp;-token.2=<xsl:value-of

select="$request-query/fmq:query/fmq:parameter[@name = '-token.2']"

/>&amp;-token.3=<xsl:value-of

select="$request-query/fmq:query/fmq:parameter[@name = '-token.3']"

/>&amp;ParticipantIDQ=<xsl:value-of

select="$request-query/fmq:query/fmq:parameter[@name = '-token.3']"

/>&amp;-sortfield.1=EventDate&amp;-max=40&amp;-find&apos;;

</xsl:otherwise>

</xsl:choose>

</xsl:attribute>

Posted

I see two things:

- replace the spaces in your layout parameter with %20

- all tokens must be named now: -token.something . The very first is not.

Another question:

Why do you use JavaScript for that? What happens if the client has not turned on JavaScript in his browser?

You could also use server-side redirects. Look at my example in this thread: http://www.fmforums.com/threads/showflat.php?Cat=0&Number=151616&an=0&page=1#151616

Posted

Hi Martin, I have a rather captive audience and provide user support for those having problems using our database online. Javascript has not been a problem to date.

I had posted this same question to a Javascript forum and received a response (via an informative link) that resolved the problem. I used an unescaped " instead of the invalid HTML entity reference "&apos;" and it worked fine.

Thanks again for your input.........roadrunner(Ray)

This topic is 7089 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.