Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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>

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

  • Author

HI Martin, I will give both your suggestions a whirl when I return to work tomorrow, many thanks........... Ray

====================================

  • Author

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)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.